kernel_samsung_a53x/drivers/iio
Matteo Martelli 7edd82502f iio: fix scale application in iio_convert_raw_to_processed_unlocked
commit 8a3dcc970dc57b358c8db2702447bf0af4e0d83a upstream.

When the scale_type is IIO_VAL_INT_PLUS_MICRO or IIO_VAL_INT_PLUS_NANO
the scale passed as argument is only applied to the fractional part of
the value. Fix it by also multiplying the integer part by the scale
provided.

Fixes: 48e44ce0f881 ("iio:inkern: Add function to read the processed value")
Signed-off-by: Matteo Martelli <matteomartelli3@gmail.com>
Link: https://patch.msgid.link/20240730-iio-fix-scale-v1-1-6246638c8daa@gmail.com
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-01-19 00:09:59 +01:00
..
accel iio: accel: mxc4005: Interrupt handling fixes 2024-11-19 11:32:48 +01:00
adc iio: adc: ad7124: fix chip ID mismatch 2025-01-19 00:09:59 +01:00
addac
afe
amplifiers
buffer Revert "iio: buffer-dmaengine: fix releasing dma channel on error" 2024-11-24 00:23:38 +01:00
chemical iio: chemical: bme680: Fix sensor data read operation 2024-11-19 14:19:33 +01:00
common Revert "iio: hid-sensors: Fix an error handling path in _hid_sensor_set_report_latency()" 2024-11-24 00:22:52 +01:00
dac Revert "iio: dac: ad5770r: add missing select REGMAP_SPI in Kconfig" 2024-11-24 00:22:52 +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: al3010: Fix an error handling path in al3010_probe() 2024-12-17 13:24:16 +01:00
magnetometer Revert "iio: magnetometer: ak8975: Fix reading for ak099xx sensors" 2024-11-24 00:23:01 +01:00
multiplexer
orientation
position
potentiometer
potentiostat
pressure iio: pressure: dps310: support negative temperature values 2024-11-19 12:27:03 +01:00
proximity Revert "iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig" 2024-11-24 00:22:52 +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 2025-01-19 00:09:59 +01:00
Kconfig
Makefile
TODO