summaryrefslogtreecommitdiff
path: root/drivers/iio/light/Kconfig
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2024-12-30 16:13:53 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-01-04 12:36:39 +0000
commit82e1cedeb8186cc019bad83d6bf06a9c475d7b13 (patch)
tree85810c7e18c554790d2af93ab473136280ab2a74 /drivers/iio/light/Kconfig
parent7716d085531bf797c882ed67eda184ac58a387a8 (diff)
iio: light: veml3235: 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. When at it, use 'scale' instead of 'gain' consistently for the get/set functions to avoid misunderstandings. Fixes: c5a23f80c164 ("iio: light: add support for veml3235") Reviewed-by: Matti Vaittinen <mazziesaccount@gmail.com> Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com> Link: https://patch.msgid.link/20241230-veml3235_scale-v3-2-48a5795e2f64@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/light/Kconfig')
-rw-r--r--drivers/iio/light/Kconfig1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iio/light/Kconfig b/drivers/iio/light/Kconfig
index 4897258e3da5..e34e551eef3e 100644
--- a/drivers/iio/light/Kconfig
+++ b/drivers/iio/light/Kconfig
@@ -669,6 +669,7 @@ config VCNL4035
config VEML3235
tristate "VEML3235 ambient light sensor"
select REGMAP_I2C
+ select IIO_GTS_HELPER
depends on I2C
help
Say Y here if you want to build a driver for the Vishay VEML3235