twx-linux/drivers/iio
Sergiu Cuciurean 6f21dfc4fa iio: adc: ad7768-1: Fix conversion result sign
[ Upstream commit 8236644f5ecb180e80ad92d691c22bc509b747bb ]

The ad7768-1 ADC output code is two's complement, meaning that the voltage
conversion result is a signed value.. Since the value is a 24 bit one,
stored in a 32 bit variable, the sign should be extended in order to get
the correct representation.

Also the channel description has been updated to signed representation,
to match the ADC specifications.

Fixes: a5f8c7da3dbe ("iio: adc: Add AD7768-1 ADC basic support")
Reviewed-by: David Lechner <dlechner@baylibre.com>
Reviewed-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.com>
Cc: <Stable@vger.kernel.org>
Link: https://patch.msgid.link/505994d3b71c2aa38ba714d909a68e021f12124c.1741268122.git.Jonathan.Santos@analog.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-05-02 07:50:39 +02:00
..
accel iio: accel: msa311: Fix failure to release runtime pm if direct mode claim fails. 2025-04-10 14:37:33 +02:00
adc iio: adc: ad7768-1: Fix conversion result sign 2025-05-02 07:50:39 +02:00
addac
afe
amplifiers iio: amplifiers: ada4250: add missing select REGMAP_SPI in Kconfig 2024-10-22 15:46:29 +02:00
buffer
cdc
chemical
common iio: invensense: fix multiple odr switch when FIFO is off 2024-12-14 20:00:21 +01:00
dac iio: dac: ad3552r: clear reset status flag 2025-03-13 12:58:38 +01:00
dummy iio: dummy: iio_simply_dummy_buffer: fix information leak in triggered buffer 2025-01-17 13:36:23 +01:00
filter iio: filter: admv8818: Force initialization of SDO 2025-03-13 12:58:37 +01:00
frequency iio: frequency: admv4420: fix missing select REMAP_SPI in Kconfig 2024-11-01 01:58:20 +01:00
gyro iio: gyro: fxas21002c: Fix missing data update in trigger handler 2025-01-17 13:36:23 +01:00
health
humidity
imu iio: imu: inv_icm42600: fix spi burst write not supported 2025-01-23 17:21:18 +01:00
light iio: light: as73211: fix channel handling in only-color triggered buffer 2025-02-17 09:40:32 +01:00
magnetometer iio: magnetometer: yas530: use signed integer type for clamp limits 2024-12-14 19:59:50 +01:00
multiplexer
orientation
position
potentiometer
potentiostat
pressure iio: pressure: zpa2326: fix information leak in triggered buffer 2025-01-17 13:36:23 +01:00
proximity iio: proximity: mb1232: add missing select IIO_(TRIGGERED_)BUFFER in Kconfig 2024-10-22 15:46:30 +02:00
resolver
temperature
test
trigger
iio_core_trigger.h
iio_core.h
industrialio-backend.c
industrialio-buffer.c
industrialio-configfs.c
industrialio-core.c
industrialio-event.c
industrialio-gts-helper.c iio: gts: fix infinite loop for gain_to_scaletables() 2024-12-09 10:33:09 +01:00
industrialio-sw-device.c
industrialio-sw-trigger.c
industrialio-trigger.c
industrialio-triggered-event.c
inkern.c iio: inkern: call iio_device_put() only on mapped devices 2025-01-17 13:36:24 +01:00
Kconfig
Makefile
TODO