linux/drivers/iio/light
Javier Carrasco 63dd163cd6 iio: light: veml6030: fix microlux value calculation
The raw value conversion to obtain a measurement in lux as
INT_PLUS_MICRO does not calculate the decimal part properly to display
it as micro (in this case microlux). It only calculates the module to
obtain the decimal part from a resolution that is 10000 times the
provided in the datasheet (0.5376 lux/cnt for the veml6030). The
resulting value must still be multiplied by 100 to make it micro.

This bug was introduced with the original implementation of the driver.

Only the illuminance channel is fixed becuase the scale is non sensical
for the intensity channels anyway.

Cc: stable@vger.kernel.org
Fixes: 7b779f573c ("iio: light: add driver for veml6030 ambient light sensor")
Signed-off-by: Javier Carrasco <javier.carrasco.cruz@gmail.com>
Link: https://patch.msgid.link/20241016-veml6030-fix-processed-micro-v1-1-4a5644796437@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
2024-10-24 18:30:03 +01:00
..
acpi-als.c
adjd_s311.c iio: light: adjd_s311: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
adux1020.c
al3010.c
al3320a.c
apds9300.c
apds9306.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
apds9960.c iio: light: apds9960: Add proximity and gesture offset calibration 2024-08-10 11:17:35 +01:00
as73211.c
bh1745.c iio: light: ROHM BH1745 colour sensor 2024-08-03 10:13:41 +01:00
bh1750.c
bh1780.c
cm3232.c
cm3323.c
cm3605.c
cm32181.c
cm36651.c
cros_ec_light_prox.c
gp2ap002.c
gp2ap020a00f.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
hid-sensor-als.c
hid-sensor-prox.c
iqs621-als.c
isl29018.c
isl29028.c
isl29125.c iio: light: isl29125: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
isl76682.c
jsa1212.c
Kconfig iio: light: bu27008: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-06 16:29:32 +01:00
lm3533-als.c
ltr390.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
ltr501.c
ltrf216a.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
lv0104cs.c
Makefile iio: light: ROHM BH1745 colour sensor 2024-08-03 10:13:41 +01:00
max44000.c
max44009.c
noa1305.c iio: light: noa1305: Fix up integration time look up 2024-08-17 15:37:37 +01:00
opt3001.c iio: light: opt3001: add missing full-scale range value 2024-09-30 09:20:53 +01:00
opt4001.c
pa12203001.c
rohm-bu27008.c
rohm-bu27034.c iio: bu27034: Add a read only HARDWAREGAIN 2024-08-03 10:13:35 +01:00
rpr0521.c
si1133.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
si1145.c iio: light: si1145: use new '.masklength' accessors 2024-08-03 10:13:40 +01:00
st_uvis25_core.c
st_uvis25_i2c.c
st_uvis25_spi.c
st_uvis25.h
stk3310.c iio: light: stk3310: add support for stk3013 2024-08-03 10:13:44 +01:00
tcs3414.c iio: light: tcs3414: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
tcs3472.c iio: light: tcs3472: make use of iio_for_each_active_channel() 2024-08-03 10:13:40 +01:00
tsl2563.c
tsl2583.c
tsl2591.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
tsl2772.c
tsl4531.c
us5182d.c
vcnl4000.c
vcnl4035.c
veml6030.c iio: light: veml6030: fix microlux value calculation 2024-10-24 18:30:03 +01:00
veml6040.c
veml6070.c
veml6075.c
vl6180.c
zopt2201.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00