Thread (19 messages) 19 messages, 3 authors, 2026-02-05

Re: [PATCH v5 01/13] iio: dac: ds4424: reject -128 RAW value

From: Andy Shevchenko <hidden>
Date: 2026-02-04 14:14:06
Also in: linux-iio, lkml, stable

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 <redacted>

(as agreed to use S8_* limits for now)

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help