Re: [PATCH v5 01/13] iio: dac: ds4424: reject -128 RAW value
From: Jonathan Cameron
Date: Thu Feb 05 2026 - 15:14:23 EST
On Wed, 4 Feb 2026 16:13:59 +0200
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> 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)
>
Applied to the fixes-togreg branch of iio.git.
Note that has a weird base at the moment. I'll probably rebase
and do a pull request very early in next cycle.
We might have to wait a little while to pick up the rest of the
series as a result.
Thanks,
Jonathan