devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] iio: light: veml6070: add integration time and minor cleanups.
@ 2024-10-17 21:39 Javier Carrasco
  2024-10-17 21:39 ` [PATCH 1/4] iio: light: veml6070: use unsigned int instead of unsigned Javier Carrasco
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Javier Carrasco @ 2024-10-17 21:39 UTC (permalink / raw)
  To: Jonathan Cameron, Lars-Peter Clausen, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: linux-iio, linux-kernel, devicetree, Javier Carrasco

This series adds a missing feature in the veml6070 driver to select the
integration time, which also depends on an external restistor that has
been added to the corresponding bindings. Its name corresponds to the
one provided in the datasheet (Rset) and its units (kilo Ohms), but I am
open to more descriptive names if required.

The datasheet provides a Refresh time vs Rset graph (figure 7), which
does not clearly specify the minimum and maximum values for Rset. The
manufacuter has confirmed that no values under 75 kohms should be used
to keep linearity, and the graph does not go beyond 1200 kohms, which is
also the biggest Rset used in the application note. The default value of
300 kohms has been obtained from the datasheet, where this value is
given as an example (table 4).

When at it, two minor cleanups have been carried out:

- Unsigned int instead of plain unsigned.
- Use of a field for the integration time, which eases the handling of
  the available integration times turning them into a simple [0, 3]
  index.

Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
---
Javier Carrasco (4):
      iio: light: veml6070: use unsigned int instead of unsigned
      iio: light: veml6070: use field to set integration time
      dt-bindings: iio: light: veml6075: document rset-kohms
      iio: light: veml6070: add support for integration time

 .../bindings/iio/light/vishay,veml6075.yaml        |  16 +++
 drivers/iio/light/veml6070.c                       | 118 +++++++++++++++++++--
 2 files changed, 128 insertions(+), 6 deletions(-)
---
base-commit: 57573ace0c1b142433dfe3d63ebf375269c80fc1
change-id: 20241014-veml6070-integration-time-78daf4eaad2f

Best regards,
-- 
Javier Carrasco <javier.carrasco.cruz@gmail.com>


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

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

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-17 21:39 [PATCH 0/4] iio: light: veml6070: add integration time and minor cleanups Javier Carrasco
2024-10-17 21:39 ` [PATCH 1/4] iio: light: veml6070: use unsigned int instead of unsigned Javier Carrasco
2024-10-19 14:18   ` Jonathan Cameron
2024-10-17 21:39 ` [PATCH 2/4] iio: light: veml6070: use field to set integration time Javier Carrasco
2024-10-19 14:19   ` Jonathan Cameron
2024-10-17 21:39 ` [PATCH 3/4] dt-bindings: iio: light: veml6075: document rset-kohms Javier Carrasco
2024-10-18 13:29   ` Rob Herring
2024-10-19 14:16   ` Jonathan Cameron
2024-10-17 21:39 ` [PATCH 4/4] iio: light: veml6070: add support for integration time Javier Carrasco
2024-10-18 14:05   ` Javier Carrasco
2024-10-19 14:21   ` 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).