Re: [PATCH] iio: light: opt3001: fix missing state reset on timeout

From: Joshua Crofts

Date: Wed May 27 2026 - 07:25:02 EST


On Wed, 27 May 2026 at 13:12, Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> The flow in this function is horrendous. IF you have time would you mind
> doing a follow up patch that just breaks it in two. Then have
> if (opt->use_irq)
> opt3001_get_processed_irq();
> else
> opt3001_get_processed_noirq();
>
> Maybe there is some code at the end that is worth sharing - you'll have to have
> a play to see if that is worth doing.
>
> (If this was in your other patch set already then I'll blame lack of coffee!)

No, didn't touch on this in the original set unfortunately, but I keep
discovering
all sorts of strange things in this driver. IMO this warranted a quick
solo patch
as it can potentially mess up subsequent reads. I'll probably end up adding
the breakdown in the other series though.

--
Kind regards

CJD