devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] iio: light: veml6030: add support for veml7700
@ 2024-10-07 20:36 Javier Carrasco
  2024-10-07 20:36 ` [PATCH 1/3] iio: light: veml6035: fix read_avail in no_irq case for veml6035 Javier Carrasco
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Javier Carrasco @ 2024-10-07 20:36 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Rishi Gupta
  Cc: Jonathan Cameron, linux-iio, linux-kernel, devicetree,
	Javier Carrasco

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.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
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,
-- 
Javier Carrasco <javier.carrasco.cruz@gmail.com>


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

end of thread, other threads:[~2024-10-12 14:11 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-07 20:36 [PATCH 0/3] iio: light: veml6030: add support for veml7700 Javier Carrasco
2024-10-07 20:36 ` [PATCH 1/3] iio: light: veml6035: fix read_avail in no_irq case for veml6035 Javier Carrasco
2024-10-07 20:36 ` [PATCH 2/3] dt-bindings: iio: light: veml6030: add veml7700 Javier Carrasco
2024-10-08  7:56   ` Krzysztof Kozlowski
2024-10-08  8:01     ` Krzysztof Kozlowski
2024-10-08  8:07       ` Javier Carrasco
2024-10-08 13:36   ` Krzysztof Kozlowski
2024-10-07 20:36 ` [PATCH 3/3] iio: light: veml6030: add support for veml7700 Javier Carrasco
2024-10-12 14:11 ` [PATCH 0/3] " Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).