diff options
| author | Cong Nguyen <congnt264@gmail.com> | 2026-08-10 23:44:46 +0700 |
|---|---|---|
| committer | Jonathan Cameron <jonathan.cameron@oss.qualcomm.com> | 2026-08-31 00:52:40 +0100 |
| commit | 91908c0a78baddc8572aa3ab69e62ee2eb496ba4 (patch) | |
| tree | 2d79fac4dfc97dbb05bf8ed9cbee8d67d2547860 /tools/lib/python/kdoc/python_version.py | |
| parent | fafefa925ed7ec10383d9bf0378abf878b7f13cb (diff) | |
| download | linux-next-91908c0a78baddc8572aa3ab69e62ee2eb496ba4.tar.gz linux-next-91908c0a78baddc8572aa3ab69e62ee2eb496ba4.zip | |
iio: adc: max1363: sign-extend bipolar differential channel reads
MAX1363 differential channels are bipolar, but max1363_read_single_chan()
masks the raw value to the ADC resolution without sign-extending it.
Negative differential readings are therefore reported to userspace as
large positive values (e.g. -1 as 4095 on a 12-bit part).
Sign-extend the masked value from the resolution bit for differential
channels. Single-ended channels are unipolar and are left unchanged.
Fixes: d1325cf45077 ("Staging: IIO: max1363 ADC driver")
Cc: stable@vger.kernel.org
Assisted-by: Claude:claude-opus-4
Signed-off-by: Cong Nguyen <congnt264@gmail.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <jonathan.cameron@oss.qualcomm.com>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
