diff options
author | 2025-03-06 18:00:29 -0300 | |
---|---|---|
committer | 2025-03-11 19:09:16 +0000 | |
commit | 8236644f5ecb180e80ad92d691c22bc509b747bb (patch) | |
tree | 6fcfd448df59016456d14573352af3db5fd2b52d /scripts/lib/kdoc/kdoc_parser.py | |
parent | iio: adc: ad7124: Benefit of dev = indio_dev->dev.parent in ad7124_parse_channel_config() (diff) | |
download | wireguard-linux-8236644f5ecb180e80ad92d691c22bc509b747bb.tar.xz wireguard-linux-8236644f5ecb180e80ad92d691c22bc509b747bb.zip |
iio: adc: ad7768-1: Fix conversion result sign
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>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions