linux/drivers/iio
Javier Carrasco 1a797936d3 iio: light: veml6030: fix microlux value calculation
commit 63dd163cd6 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: 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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-11-08 16:28:24 +01:00
..
accel iio: accel: bma400: Fix uninitialized variable field_value in tap event handling. 2024-11-01 01:58:17 +01:00
adc iio: adc: ad7124: fix division by zero in ad7124_set_channel_odr() 2024-11-08 16:28:23 +01:00
addac iio: addac: Kconfig: update ad74413r selections 2023-10-05 18:06:45 +01:00
afe iio: afe: rescale: Accept only offset channels 2023-10-17 20:25:32 +01:00
amplifiers iio: amplifiers: ada4250: add missing select REGMAP_SPI in Kconfig 2024-10-22 15:46:29 +02:00
buffer iio: buffer-dmaengine: fix releasing dma channel on error 2024-09-12 11:11:40 +02:00
cdc iio: cdc: ad7150: relax return value check for IRQ get 2023-08-01 18:55:55 +01:00
chemical iio: chemical: bme680: Fix read/write ops to device by adding mutexes 2024-10-04 16:29:39 +02:00
common iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency() 2024-10-22 15:46:29 +02:00
dac iio: dac: ad3552r: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-22 15:46:30 +02:00
dummy
filter drivers: iio: filter: admv8818: add bypass mode 2023-08-08 09:51:06 +01:00
frequency iio: frequency: admv4420: fix missing select REMAP_SPI in Kconfig 2024-11-01 01:58:20 +01:00
gyro
health
humidity
imu iio: imu: inv_icm42600: delete unneeded update watermark call 2024-06-21 14:38:37 +02:00
light iio: light: veml6030: fix microlux value calculation 2024-11-08 16:28:24 +01:00
magnetometer iio: magnetometer: ak8975: Fix reading for ak099xx sensors 2024-10-10 11:57:56 +02:00
multiplexer
orientation
position
potentiometer iio: potentiometer: mcp4531: Use i2c_get_match_data() 2023-07-29 15:55:48 +01:00
potentiostat
pressure iio: pressure: bmp280: Fix waiting time for BMP3xx configuration 2024-10-10 11:58:05 +02:00
proximity iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-22 15:46:30 +02:00
resolver
temperature iio: adc: Explicitly include correct DT includes 2023-07-23 13:38:13 +01:00
test
trigger iio: trigger: stm32-lptimer-trigger: remove unneeded platform_set_drvdata() 2023-08-05 19:29:39 +01:00
iio_core_trigger.h
iio_core.h
industrialio-backend.c iio: add the IIO backend framework 2024-06-12 11:12:21 +02:00
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c driver: iio: add missing checks on iio_info's callback access 2024-09-08 07:54:47 +02:00
industrialio-event.c driver: iio: add missing checks on iio_info's callback access 2024-09-08 07:54:47 +02:00
industrialio-gts-helper.c iio: gts-helper: Fix memory leaks in iio_gts_build_avail_scale_table() 2024-11-08 16:28:24 +01:00
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio: trigger: Fix condition for own trigger 2024-07-18 13:21:20 +02:00
industrialio-triggered-event.c
inkern.c iio: fix scale application in iio_convert_raw_to_processed_unlocked 2024-09-12 11:11:40 +02:00
Kconfig iio: add the IIO backend framework 2024-06-12 11:12:21 +02:00
Makefile iio: add the IIO backend framework 2024-06-12 11:12:21 +02:00
TODO