From: Jesper X Nilsson <jesper.x.nilsson@axis.com>
To: "Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Stefan Windfeldt-Prytz" <stefan.windfeldt-prytz@axis.com>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>,
Jesper X Nilsson <jesper.x.nilsson@axis.com>, <kernel@axis.com>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v2 0/4] This series adds support for Texas Instruments OPT4041 Ambient light sensor
Date: Fri, 23 Oct 2026 14:30:27 +0200 [thread overview]
Message-ID: <20261023-opt4041-v2-0-ee320812804c@axis.com> (raw)
Extend the opt4001 driver to support OPT4041, since it is so similar to
OPT4001. The OPT4041 adds a second channel, a wide band channel ranging
from 380nm to 1000nm. The register map is almost the same for both
devices. OPT4001 has an internal fifo of size four, OPT4041 has two
fifos of size two, one for each channel.
Since OPT4041 has two channels it has one bit in register 0Bh to select
which channel is compared to the threshold register. The driver does not
support setting the threshold registers, so no new support has been
added for this.
The OPT4041 is pin compatible and has the same package as
opt4001-sot-5x3. Although the device id is different, I added a new
compatible string since the driver already had different compatible
strings to differentiate between the two OPT4001.
Datasheet: https://www.ti.com/lit/gpn/opt4041
Signed-off-by: Jesper X Nilsson <jesper.x.nilsson@axis.com>
---
Changes in v2:
- Drop tag Assited-by: LLM from commit messages
- Include patch from Andy: Re-use generic struct s32_fract
- Add trailing commas to structs where it was missing
- Sort variables in reverse xmas tree order in opt4001_read_raw_value()
- Return -ENODATA if i2c_get_match() returns NULL
- Update tristate summary and copy the string to MODULE_DESCRIPTION()
and to the comment in the top of the driver
- Change the help text to included OPT4001 and OPT4041 on seperate lines
- Link to v1: https://patch.msgid.link/20261023-opt4041-v1-0-45227f82d05c@axis.com
To: Jonathan Cameron <jic23@kernel.org>
To: David Lechner <dlechner@baylibre.com>
To: Nuno Sá <nuno.sa@analog.com>
To: Andy Shevchenko <andy@kernel.org>
To: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk+dt@kernel.org>
To: Conor Dooley <conor+dt@kernel.org>
To: Stefan Windfeldt-Prytz <stefan.windfeldt-prytz@axis.com>
Cc: linux-iio@vger.kernel.org
Cc: devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
Andy Shevchenko (1):
iio: light: opt4001: Re-use generic struct s32_fract
Jesper X Nilsson (3):
dt-bindings: iio: light: opt4001: add opt4041
iio: light: opt4001: refactor driver to prepare to support more devices
iio: light: opt4001: add support for opt4041
.../devicetree/bindings/iio/light/ti,opt4001.yaml | 9 +-
drivers/iio/light/Kconfig | 6 +-
drivers/iio/light/opt4001.c | 164 +++++++++++++++------
3 files changed, 133 insertions(+), 46 deletions(-)
---
base-commit: a3b3580713f3ac5a32dc2874ee546828977a1d68
change-id: 20261007-opt4041-18315d8510df
Best regards,
--
Jesper X Nilsson <jesper.x.nilsson@axis.com>
next reply other threads:[~2026-10-23 12:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 12:30 Jesper X Nilsson [this message]
2026-10-23 12:30 ` [PATCH v2 1/4] dt-bindings: iio: light: opt4001: add opt4041 Jesper X Nilsson
2026-10-23 12:30 ` [PATCH v2 2/4] iio: light: opt4001: Re-use generic struct s32_fract Jesper X Nilsson
2026-10-23 12:30 ` [PATCH v2 3/4] iio: light: opt4001: refactor driver to prepare to support more devices Jesper X Nilsson
2026-10-23 13:51 ` Andy Shevchenko
2026-10-23 12:30 ` [PATCH v2 4/4] iio: light: opt4001: add support for opt4041 Jesper X Nilsson
2026-10-23 13:53 ` Andy Shevchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261023-opt4041-v2-0-ee320812804c@axis.com \
--to=jesper.x.nilsson@axis.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=kernel@axis.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
--cc=stefan.windfeldt-prytz@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®