Re: [PATCH] iio: light: cm32181: return zero after writing calibscale

From: Jonathan Cameron

Date: Sat Aug 01 2026 - 21:46:58 EST


On Fri, 31 Jul 2026 16:11:27 +0200
Joshua Crofts <joshua.crofts1@xxxxxxxxx> wrote:

> On Fri, 31 Jul 2026 17:20:48 +0400
> Giorgi Tchankvetadze <giorgitchankvetadze1997@xxxxxxxxx> wrote:
>
> > From: Giorgi Tchankvetadze <giorgi@xxxxxxxxxxxxxxxxx>
> >
> > The write_raw callback is documented to return 0 on success or a
> > negative error code. However, the IIO_CHAN_INFO_CALIBSCALE case
> > returns 'val' (the user-supplied value) instead of 0.
> >
> > Fix it by returning 0 on success, matching the behavior of other
> > calibscale implementations in the subsystem.
> >
> > Fixes: 971672c0b3cc ("iio: add Capella CM32181 ambient light sensor driver.")
> > Signed-off-by: Giorgi Tchankvetadze <giorgi@xxxxxxxxxxxxxxxxx>
> > ---
>
> LGTM.
>
> Reviewed-by: Joshua Crofts <joshua.crofts1@xxxxxxxxx>
>


Applied to the testing branch of iio.git and marked for stable.

Thanks,

Jonathan