tmp_suning_uos_patched/drivers/iio
Liam Beguin 9f0cd81174 iio: inkern: make a best effort on offset calculation
commit ca85123354e1a65a22170286387b4791997fe864 upstream.

iio_convert_raw_to_processed_unlocked() assumes the offset is an
integer. Make a best effort to get a valid offset value for fractional
cases without breaking implicit truncations.

Fixes: 48e44ce0f8 ("iio:inkern: Add function to read the processed value")
Signed-off-by: Liam Beguin <liambeguin@gmail.com>
Reviewed-by: Peter Rosin <peda@axentia.se>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20220108205319.2046348-4-liambeguin@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>
2022-04-08 14:39:50 +02:00
..
accel iio: Fix error handling for PM 2022-03-02 11:42:53 +01:00
adc iio: adc: ad7124: fix mask used for setting AIN_BUFP & AIN_BUFM bits 2022-03-02 11:42:53 +01:00
afe iio: afe: rescale: use s64 for temporary scale calculations 2022-04-08 14:39:49 +02:00
amplifiers
buffer
chemical iio: chemical: atlas: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:56:37 +02:00
common iio: ssp_sensors: fix error code in ssp_print_mcu_debug() 2021-10-20 11:45:02 +02:00
dac iio: ad5770r: make devicetree property reading consistent 2021-11-18 14:03:51 +01:00
dummy
frequency iio: frequency: adf4350: disable reg and clk on error in adf4350_probe() 2021-07-14 16:55:44 +02:00
gyro iio: Fix error handling for PM 2022-03-02 11:42:53 +01:00
health
humidity iio: humidity: hdc100x: Add margin to the conversion time 2021-08-18 08:59:04 +02:00
imu iio: Fix error handling for PM 2022-03-02 11:42:53 +01:00
light iio: ltr501: Don't return error code in trigger handler 2021-12-14 11:32:44 +01:00
magnetometer iio: Fix error handling for PM 2022-03-02 11:42:53 +01:00
multiplexer
orientation iio: hid-sensors: select IIO_TRIGGERED_BUFFER under HID_SENSOR_IIO_TRIGGER 2021-05-19 10:13:13 +02:00
position
potentiometer
potentiostat iio: potentiostat: lmp91000: Fix alignment of buffer in iio_push_to_buffers_with_timestamp() 2021-07-14 16:56:37 +02:00
pressure iio: st_sensors: disable regulators after device unregistration 2021-11-18 14:04:13 +01:00
proximity iio: prox: isl29501: Fix buffer alignment in iio_push_to_buffers_with_timestamp() 2021-07-14 16:56:46 +02:00
resolver
temperature iio: ltc2983: fix device probe 2021-09-18 13:40:08 +02:00
trigger iio: trigger: stm32-timer: fix MODULE_ALIAS 2021-12-14 11:32:44 +01:00
iio_core_trigger.h
iio_core.h
industrialio-buffer.c iio: buffer: Fix demux update 2020-12-30 11:54:24 +01:00
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c iio: trigger: Fix reference counting 2021-12-14 11:32:44 +01:00
industrialio-triggered-event.c
inkern.c iio: inkern: make a best effort on offset calculation 2022-04-08 14:39:50 +02:00
Kconfig
Makefile
TODO