diff options
| author | Oleksij Rempel <o.rempel@pengutronix.de> | 2026-02-04 15:00:33 +0100 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-02-23 08:24:37 +0000 |
| commit | 5187e03b817c26c1c3bcb2645a612ea935c4be89 (patch) | |
| tree | aa2e4b44b6fe2ec28f08e025911eaef1ada35e2e /scripts/rt-tester/git@git.tavy.me:linux.git | |
| parent | 7ef74d961d1ad6ec72b50887ca119d7f98f07717 (diff) | |
iio: dac: ds4424: reject -128 RAW value
The DS442x DAC uses sign-magnitude encoding, so -128 cannot be represented
in hardware (7-bit magnitude).
Previously, passing -128 resulted in a truncated value that programmed
0mA (magnitude 0) instead of the expected maximum negative current,
effectively failing silently.
Reject -128 to avoid producing the wrong current.
Fixes: d632a2bd8ffc ("iio: dac: ds4422/ds4424 dac driver")
Cc: stable@vger.kernel.org
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'scripts/rt-tester/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
