diff options
| author | Oleksij Rempel <o.rempel@pengutronix.de> | 2026-02-04 17:00:33 +0300 |
|---|---|---|
| committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2026-02-23 11:24:37 +0300 |
| commit | 5187e03b817c26c1c3bcb2645a612ea935c4be89 (patch) | |
| tree | aa2e4b44b6fe2ec28f08e025911eaef1ada35e2e /include/linux | |
| parent | 7ef74d961d1ad6ec72b50887ca119d7f98f07717 (diff) | |
| download | linux-5187e03b817c26c1c3bcb2645a612ea935c4be89.tar.xz | |
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 'include/linux')
0 files changed, 0 insertions, 0 deletions
