Home
last modified time | relevance | path

Searched hist:"22 eaca4283b216f5e1f7721e4ad0ecb3d23c6774" (Results 1 – 1 of 1) sorted by relevance

/linux/drivers/iio/light/
H A Dveml6030.cdiff 22eaca4283b216f5e1f7721e4ad0ecb3d23c6774 Mon Jan 27 20:30:23 CET 2025 Javier Carrasco <javier.carrasco.cruz@gmail.com> iio: light: veml6030: fix scale to conform to ABI

The current scale is not ABI-compliant as it is just the sensor gain
instead of the value that acts as a multiplier to be applied to the raw
value (there is no offset).

Use the iio-gts helpers to obtain the proper scale values according to
the gain and integration time to match the resolution tables from the
datasheet and drop dedicated variables to store the current values of
the integration time, gain and resolution. When at it, use 'scale'
instead of 'gain' consistently for the get/set functions to avoid
misunderstandings.

Fixes: 7b779f573c48 ("iio: light: add driver for veml6030 ambient light sensor")
Acked-by: Matti Vaittinen <mazziesaccount@gmail.com>
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20250127-veml6030-scale-v3-2-4f32ba03df94@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>