Linux IIO development
 help / color / mirror / Atom feed
* [RFC PATCH v2 0/2] iio: light: add support for Broadcom APDS9999
@ 2026-05-13  8:09 Jose A. Perez de Azpillaga
  2026-05-13  8:10 ` [RFC PATCH v2 1/2] dt-bindings: iio: light: add " Jose A. Perez de Azpillaga
  2026-05-13  8:10 ` [RFC PATCH v2 2/2] iio: light: add support for APDS9999 sensor Jose A. Perez de Azpillaga
  0 siblings, 2 replies; 3+ messages in thread
From: Jose A. Perez de Azpillaga @ 2026-05-13  8:09 UTC (permalink / raw)
  To: linux-iio; +Cc: Jonathan Cameron, David Lechner, Nuno Sá

Add IIO driver and DT binding for the Broadcom APDS9999 ambient light
and proximity sensor. The green channel uses optical coating technology
to approximate the human eye spectral response for ALS/lux measurements.
IIO_INTENSITY channels are also provided for red, green, blue, and
clear/IR so userspace can compute its own weighted lux.

Questions for reviewers:
  1. Is the green channel as an ALS/lux approximation acceptable given
     the datasheet's claim of optical coating to emulate V(lambda)?
  2. Is the IIO_INTENSITY channel layout correct? (red, green, blue,
     clear with modifiers, no scale)
  3. Should the binding be merged with avago,apds9300.yaml or kept
     separate given the extra vled-supply?

v2:
  - Added IIO_INTENSITY channels for R, G, B, clear
  - Switched to guard(mutex)(), devm_mutex_init(), dev_err_probe()
  - Replaced remove() with devm_add_action_or_reset()
  - Don't fail probe on PART_ID mismatch (fallback compatibles)
  - Replaced manual shifts with FIELD_PREP() / GENMASK
  - Used get_unaligned_le24(), sizeof(buf), NSEC_PER_SEC, fsleep()
  - Named gain register values, explicit resolution enum values
  - Removed section comments, grouped bit defines under registers
  - Squashed Kconfig/Makefile into driver patch
  - Split MAINTAINERS entry across patches
  - DT binding: added vled-supply, interrupts, required vdd-supply
  - DT binding: fixed title, added blank lines, full description
  - Dropped "DT binding" duplication from binding commit subject

Link to v1: https://lore.kernel.org/linux-iio/cover.1778491503.git.azpijr@gmail.com/

Jose A. Perez de Azpillaga (2):
  dt-bindings: iio: light: add Broadcom APDS9999
  iio: light: add support for APDS9999 sensor

 .../bindings/iio/light/brcm,apds9999.yaml     |  53 +++
 MAINTAINERS                                   |   7 +
 drivers/iio/light/Kconfig                     |  10 +
 drivers/iio/light/Makefile                    |   1 +
 drivers/iio/light/apds9999.c                  | 344 ++++++++++++++++++
 5 files changed, 415 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/light/brcm,apds9999.yaml
 create mode 100644 drivers/iio/light/apds9999.c


-- 
jose a. p-a

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

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

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13  8:09 [RFC PATCH v2 0/2] iio: light: add support for Broadcom APDS9999 Jose A. Perez de Azpillaga
2026-05-13  8:10 ` [RFC PATCH v2 1/2] dt-bindings: iio: light: add " Jose A. Perez de Azpillaga
2026-05-13  8:10 ` [RFC PATCH v2 2/2] iio: light: add support for APDS9999 sensor Jose A. Perez de Azpillaga

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox