kernel_samsung_a53x/drivers/iio
Javier Carrasco da30a32d2d iio: light: veml6030: fix microlux value calculation
commit 63dd163cd61dda6f38343776b42331cc6b7e56e0 upstream.

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: 7b779f573c48 ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-23 23:22:05 +01:00
..
accel iio: accel: mxc4005: Interrupt handling fixes 2024-11-19 11:32:48 +01:00
adc iio: adc: ti-ads124s08: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-11-23 23:21:56 +01:00
addac
afe
amplifiers
buffer iio: buffer-dmaengine: fix releasing dma channel on error 2024-11-23 23:21:06 +01:00
chemical iio: chemical: bme680: Fix sensor data read operation 2024-11-19 14:19:33 +01:00
common iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency() 2024-11-23 23:21:56 +01:00
dac iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig 2024-11-23 23:21:56 +01:00
dummy
frequency
gyro
health
humidity
imu iio: imu: inv_icm42600: delete unneeded update watermark call 2024-11-19 14:19:04 +01:00
light iio: light: veml6030: fix microlux value calculation 2024-11-23 23:22:05 +01:00
magnetometer iio: magnetometer: ak8975: Fix reading for ak099xx sensors 2024-11-23 23:21:45 +01:00
multiplexer
orientation
position
potentiometer
potentiostat
pressure iio: pressure: dps310: support negative temperature values 2024-11-19 12:27:03 +01:00
proximity iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-11-23 23:21:56 +01:00
resolver
temperature
trigger
iio_core.h
iio_core_trigger.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c iio: fix scale application in iio_convert_raw_to_processed_unlocked 2024-11-23 23:21:07 +01:00
Kconfig
Makefile
TODO