Re: [PATCH v5 01/13] iio: dac: ds4424: reject -128 RAW value
From: Andy Shevchenko
Date: Wed Feb 04 2026 - 09:16:51 EST
On Wed, Feb 04, 2026 at 03:00:33PM +0100, Oleksij Rempel wrote:
> 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.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
(as agreed to use S8_* limits for now)
--
With Best Regards,
Andy Shevchenko