iio: light: veml6030: add support for veml7700
Get series with b4
b4 am [email protected] change-id 20241007-veml7700-83f54cf94262Versions newest first
- v1 Latest3 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | iio: light: veml6035: fix read_avail in no_irq case for veml6035drivers/ | +2 | 0 replies | |
| 2/3 | dt-bindings: iio: light: veml6030: add veml7700Documentation/ | +15 | 4 replies | |
| 3/3 | iio: light: veml6030: add support for veml7700drivers/ | +91 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Krzysztof Kozlowski |
|---|---|
| 1/3 | |
| 2/3 | R-b |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/3] iio: light: veml6030: add support for veml7700
This series adds support for the veml7700 ALS sensor, which is basically a vem6030 within a different package, with no pins for the interrupt and the I2C address. The changes introduced are meant to hide the event functionality in that case, while borrowing the rest from the veml6030.
In theory, the interrupt functionality would still be available as all the registers are the same, and some polling could be done to read the threshold indicators to generate events. I did not find examples in iio where the INIT_DELAYED_WORK() queue_delayed_work() mechanism is used for that (some drivers do it to read results), so I am not sure if that would be the desired approach. I am open for discussions about that, but probably to be applied later on.
While testing this "no_irq" device, I noticed that the veml6035 is still using dedicated structs for the iio_info, which were there to account for the device-specific attribute values before read_avail() was introduced in the driver in later versions of the patch series, and they managed to survive until v3 was applied.
Once read_avail() was introduced, the device-specific structs were not required anymore, and they are repetitive. Moreover, the initialization of the no_irq iio_info for the veml6035 was not updated to account for the new read_avail(), which is a bug if no irq is provided, as there is no callback to retrieve the available values.
---
Javier Carrasco (3):
iio: light: veml6035: fix read_avail in no_irq case for veml6035
dt-bindings: iio: light: veml6030: add veml7700
iio: light: veml6030: add support for veml7700
.../bindings/iio/light/vishay,veml6030.yaml | 16 ++- drivers/iio/light/veml6030.c | 130 ++++++++++++++------- 2 files changed, 106 insertions(+), 40 deletions(-)
---
base-commit: 96be67caa0f0420d4128cb67f07bbd7a6f49e03a
change-id: 20241007-veml7700-83f54cf94262
Best regards,
Signature · 1 line
Javier Carrasco <[email protected]>