Re: [PATCH 0/3] iio: proximity: sx93xx: reject fractional event values

From: Andy Shevchenko

Date: Fri Dec 04 2026 - 12:32:07 EST


On Fri, Dec 04, 2026 at 10:01:55PM +0530, Arnav Kapoor wrote:
> sx9310, sx9324 and sx9360 ignore val2 in write_event_val(). All their
> event values (threshold, period, hysteresis) are integers and read back
> as IIO_VAL_INT, but writes are parsed as IIO_VAL_INT_PLUS_MICRO, so 1.5
> is stored as 1 and -0.999999 is accepted as 0. Each patch returns
> -EINVAL for a non-zero val2, once at the top of the callback, so it
> covers every event value and not only the hysteresis.
>
> This is the follow-up Jonathan suggested on v3 of the gain/threshold
> series:
> https://lore.kernel.org/all/20261128115534.558478-1-kapoorarnav43@xxxxxxxxx/
> It applies on its own on the current iio testing and also merges
> cleanly with v4 of that series.

The comment against patch 1 applies to the whole series.

--
With Best Regards,
Andy Shevchenko