Re: [PATCH v3 0/4] iio: light: opt4001: Fixes from code review
From: Jonathan Cameron
Date: Sun Jul 19 2026 - 22:27:49 EST
On Tue, 14 Jul 2026 15:44:33 +0300
Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> wrote:
> On Tue, Jul 14, 2026 at 05:01:30PM +0530, Nikhil Gautam wrote:
> > Hi,
> >
> > This series fixes a number of issues found while reviewing the opt4001
> > driver. All of them date back to the initial submission of the driver
> > in commit 9a9608418292 ("iio: light: Add support for TI OPT4001 light
> > sensor").
> >
> > Patch 1 fixes the power down path, which read the device ID register
> > instead of the control register in a read-modify-write, corrupting the
> > CTRL configuration on the way to power down.
> >
> > Patch 2 fixes an incompatible pointer type passed as the remainder
> > argument to div_u64_rem(). No functional impact.
> >
> > Patch 3 makes opt4001_write_raw() reject integration time writes with
> > a non-zero integer (seconds) part, which were previously accepted
> > silently based on the microseconds part alone.
> >
> > Patch 4 fixes reversed GENMASK() arguments in the (currently unused)
> > fault count mask definition and adds the _MASK suffix for consistency.
>
> LGTM now, FWIW,
> Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxx>
>
Nice. Applied to the fixes-togreg branch of iio.git. I marked them all
for stable
Thanks
Jonathan