Skip to content

iio: light: add support for Broadcom APDS9999

Jose A. Perez de Azpillaga linux-devicetree linux-iio 4 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 3 repliesIn review
  2. v32 patches 4 repliesSuperseded
  3. v2 RFC2 patches 7 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v1 RFC4 patches12 repliesSuperseded

Changes in v4 from the cover letter

- Renamed vled-supply to vcsel-supply (matches VVCSEL pin name)
- Expanded Kconfig description (ALS, RGB, proximity)
- Clarified mutex lock comment
- Replaced magic number in scale formula with
54ULL * NSEC_PER_SEC * USEC_PER_MSEC
- Updated TODO to just proximity (color channels now exposed)

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: iio: light: add Broadcom APDS9999Documentation/devicetree/bindings/iio/light/brcm,apds9999.yaml MAINTAINERS+60 -01 reply
2/2iio: light: add support for APDS9999 sensorMAINTAINERS drivers/iio/light/Kconfig drivers/iio/light/Makefile +1 more+353 -02 replies

Reviews trailers per patch

1 of 2 patches has a Reviewed-by or Acked-by.

PatchConor Dooley
1/2R-b
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH v4 0/2] iio: light: add support for Broadcom APDS9999

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 IR so userspace can compute its own weighted lux.

v4:
- Renamed vled-supply to vcsel-supply (matches VVCSEL pin name)
- Expanded Kconfig description (ALS, RGB, proximity)
- Clarified mutex lock comment
- Replaced magic number in scale formula with
54ULL * NSEC_PER_SEC * USEC_PER_MSEC
- Updated TODO to just proximity (color channels now exposed)

v3:
- Dropped RFC
- Fixed MAINTAINERS entry alphabetical order (B section)
- Changed IIO_MOD_LIGHT_CLEAR to IIO_MOD_LIGHT_IR
- Unified RAW read path via chan->address for all channels
- Switched enum gains/rates to #define (hardware field values)
- Used USEC_PER_MSEC for integration time table
- Removed redundant comments from resolution enum
- Added default rationale comment in _init()
- Added ALS rationale comment on IIO_LIGHT channel
- s/reg/regval/, fixed indent in poll loop, C99 .name for id table
- Moved iio_info right after read_raw function
- DT binding: expanded VCSEL acronym, explained separate binding
- Commit messages wrapped at 75 chars, clarified RGB vs raw status

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 v3: https://lore.kernel.org/linux-iio/[email protected]/
Link to v2: https://lore.kernel.org/linux-iio/[email protected]/
Link to v1: https://lore.kernel.org/linux-iio/[email protected]/

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     |  54 +++
 MAINTAINERS                                   |   7 +
 drivers/iio/light/Kconfig                     |  14 +
 drivers/iio/light/Makefile                    |   1 +
 drivers/iio/light/apds9999.c                  | 337 ++++++++++++++++++
 5 files changed, 413 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/light/brcm,apds9999.yaml
 create mode 100644 drivers/iio/light/apds9999.c