mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/3] This series adds support for Texas Instruments OPT4041 Ambient light sensor
@ 2026-10-23  7:48 Jesper X Nilsson
  2026-10-23  7:48 ` [PATCH 1/3] dt-bindings: iio: light: opt4001: add opt4041 Jesper X Nilsson
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Jesper X Nilsson @ 2026-10-23  7:48 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, Nuno Sá,
	Andy Shevchenko, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Stefan Windfeldt-Prytz
  Cc: linux-iio, devicetree, linux-kernel, Jesper X Nilsson, kernel

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>
---
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                          |   2 +-
 drivers/iio/light/opt4001.c                        | 144 ++++++++++++++++-----
 3 files changed, 121 insertions(+), 34 deletions(-)
---
base-commit: a3b3580713f3ac5a32dc2874ee546828977a1d68
change-id: 20261007-opt4041-18315d8510df

Best regards,
--  
Jesper X Nilsson <jesper.x.nilsson@axis.com>


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-10-23 10:23 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-23  7:48 [PATCH 0/3] This series adds support for Texas Instruments OPT4041 Ambient light sensor Jesper X Nilsson
2026-10-23  7:48 ` [PATCH 1/3] dt-bindings: iio: light: opt4001: add opt4041 Jesper X Nilsson
2026-10-23  7:48 ` [PATCH 2/3] iio: light: opt4001: refactor driver to prepare to support more devices Jesper X Nilsson
2026-10-23  9:07   ` Andy Shevchenko
2026-10-23 10:07     ` Jesper X Nilsson
2026-10-23  9:10   ` Joshua Crofts
2026-10-23  9:16     ` Joshua Crofts
2026-10-23 10:22       ` Jesper X Nilsson
2026-10-23  7:48 ` [PATCH 3/3] iio: light: opt4001: add support for opt4041 Jesper X Nilsson
2026-10-23  9:14   ` Andy Shevchenko
2026-10-23 10:19     ` Jesper X Nilsson
2026-10-23  9:17 ` [PATCH 0/3] This series adds support for Texas Instruments OPT4041 Ambient light sensor Andy Shevchenko
2026-10-23 10:20   ` Jesper X Nilsson

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®