linux/drivers/iio
Javier Carrasco edc84c1c1a 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:22:03 +01:00
..
accel iio: accel: mxc4005: Interrupt handling fixes 2024-05-17 11:48:09 +02:00
adc iio: adc: ti-ads124s08: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-22 15:39:28 +02:00
addac iio: add addac subdirectory 2023-08-26 15:26:47 +02:00
afe
amplifiers
buffer iio: buffer-dmaengine: fix releasing dma channel on error 2024-09-12 11:06:50 +02:00
chemical iio: chemical: bme680: Fix sensor data read operation 2024-07-05 09:12:52 +02:00
common iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency() 2024-10-22 15:39:27 +02:00
dac iio: dac: stm32-dac-core: add missing select REGMAP_MMIO in Kconfig 2024-10-22 15:39:27 +02:00
dummy iio: dummy: iio_simple_dummy: check the return value of kstrdup() 2022-06-14 18:32:41 +02:00
frequency
gyro iio:imu:adis: Move exports into IIO_ADISLIB namespace 2023-01-14 10:15:58 +01:00
health iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw 2022-12-08 11:23:54 +01:00
humidity
imu iio: imu: inv_icm42600: delete unneeded update watermark call 2024-07-05 09:12:29 +02:00
light iio: light: veml6030: fix microlux value calculation 2024-11-08 16:22:03 +01:00
magnetometer iio: magnetometer: ak8975: Fix reading for ak099xx sensors 2024-10-17 15:08:24 +02:00
multiplexer
orientation
position
potentiometer
potentiostat
pressure iio: pressure: dps310: support negative temperature values 2024-06-16 13:32:18 +02:00
proximity iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-22 15:39:28 +02:00
resolver iio:resolver:ad2s1200: Drop of_match_ptr protection 2020-09-21 18:41:31 +01:00
temperature iio: temperature: ltc2983: make bulk write buffer DMA-safe 2023-01-14 10:15:57 +01:00
trigger iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init() 2022-11-25 17:45:51 +01:00
iio_core_trigger.h
iio_core.h
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails 2022-12-02 17:40:02 +01:00
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c iio: fix scale application in iio_convert_raw_to_processed_unlocked 2024-09-12 11:06:50 +02:00
Kconfig iio: add addac subdirectory 2023-08-26 15:26:47 +02:00
Makefile iio: add addac subdirectory 2023-08-26 15:26:47 +02:00
TODO