Files
Oleksij Rempel 5187e03b81 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: d632a2bd8f ("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>
2026-02-23 08:24:37 +00:00
..
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00
2025-04-22 19:10:04 +01:00