[PATCH 0/4] iio: light: veml6070: add integration time and minor cleanups.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
---
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@xxxxxxxxx>





[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux