iio: light: veml6030: add support for triggered buffer
Subsystems (2)
Javier Carrasco
maintainerPATCH v3 1/1 iio: light: veml6030: add support for triggered buffer
All devices supported by this driver (currently veml6030, veml6035 and veml7700) have two 16-bit channels, and can profit for the same configuration to support data access via triggered buffers.
The measurements are stored in two 16-bit consecutive registers (addresses 0x04 and 0x05) as little endian, unsigned data.
---
Changes in v3:
- Ensure that the holes in the scan struct are initialized to zero.
- Link to v2: https://lore.kernel.org/r/[email protected]
Changes in v2:
- Use u16 instead of __le16 for the channels.
- Move scan struct from data to trigger_handler.
- Drop avail_scan_masks.
- Fix scan_type (IIO_CPU instead of IIO_LE, drop shift = 0).
- Link to v1: https://lore.kernel.org/r/[email protected]
--- drivers/iio/light/Kconfig | 2 ++ drivers/iio/light/veml6030.c | 76 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+)
drivers/iio/light/Kconfig +2 -0
@@ -683,6 +683,8 @@ config VEML3235 config VEML6030 tristate "VEML6030 and VEML6035 ambient light sensors" select REGMAP_I2C + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER depends on I2C help Say Y here if you want to build a driver for the Vishay VEML6030
drivers/iio/light/veml6030.c +76 -0
132 lines not on this page · raw message
---
base-commit: ab376e4d674037f45d5758c1dc391bd4e11c5dc4
change-id: 20241106-veml6030_triggered_buffer-a38886ca4cce
Best regards,
Signature · 1 line
Javier Carrasco <[email protected]>
Quoted 8 lines · On Sun, 24 Nov 2024 19:59:06 +0100 Javier Carrasco…
All devices supported by this driver (currently veml6030, veml6035 and veml7700) have two 16-bit channels, and can profit for the same configuration to support data access via triggered buffers.
The measurements are stored in two 16-bit consecutive registers (addresses
0x04and0x05) as little endian, unsigned data.Signed-off-by Javier Carrasco <[email protected]>
Applied.
Thanks for this and for fixing up the other cases where holes weren't initialized right!
Jonathan