Re: [PATCH] iio: proximity: sx9500: ignore event config writes that don't change state
From: Jonathan Cameron
Date: Sun Oct 25 2026 - 19:37:27 EST
On Sat, 24 Oct 2026 23:26:53 +0530
Arnav Kapoor <kapoorarnav43@xxxxxxxxx> wrote:
> sx9500_write_event_config() adjusts the channel and close/far user
> counts on every write, even when the event is already in the requested
> state. Writing 0 to a disabled event and then 1 leaves the counts at 0,
> so the channel and its interrupts stay off while the event reads as
> enabled. As channel_users[] is shared with raw reads, those can then
> wait forever for a conversion. Writing 1 twice and then 0 has the
> opposite effect.
>
> Return early when the state doesn't change, as
> sx_common_write_event_config() does.
>
> Fixes: 4193c0f1d863 ("iio: driver for Semtech SX9500 proximity solution")
> Signed-off-by: Arnav Kapoor <kapoorarnav43@xxxxxxxxx>
Applied and marked for stable.
thanks
Jonathan