summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJavier Carrasco <javier.carrasco.cruz@gmail.com>2025-01-27 22:30:23 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2025-02-08 18:16:29 +0300
commit22eaca4283b216f5e1f7721e4ad0ecb3d23c6774 (patch)
tree474e6e083ccdc6d7cd332ddb45ed559c3ed528be /include
parentdbd2e08ff09fd6bd51215b44474899cc1b7b7a16 (diff)
downloadlinux-22eaca4283b216f5e1f7721e4ad0ecb3d23c6774.tar.xz
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>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions