Re: [PATCH v3 08/11] video: backlight: lm3533_bl: Improve linear sysfs logic

From: Svyatoslav Ryhel

Date: Tue Jun 02 2026 - 08:04:59 EST


вт, 2 черв. 2026 р. о 14:07 Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> пише:
>
> On Tue, Jun 02, 2026 at 01:19:00PM +0300, Svyatoslav Ryhel wrote:
> > вт, 2 черв. 2026 р. о 11:09 Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> пише:
> > > On Mon, Jun 01, 2026 at 06:18:28PM +0300, Svyatoslav Ryhel wrote:
>
> ...
>
> > > > if (kstrtoul(buf, 0, &linear))
> > > > return -EINVAL;
> > >
> > > Besides _assign_bits() in the below, side note here to unshadow error codes:
> > >
> > > ret = kstrtoul(buf, 0, &linear);
> > > if (ret)
> > > return ret;
> > >
> > > (obviously in a separate change).
> >
> > Won't happen in this patches.
>
> You mean both suggestions or you are talking about kstrotoul() only? If it's
> only about the latter, it's fine with me, but _assign_bits() makes sense to do
> in this patch as you already change the parameters enough to make it better.
>

only kstrotoul()

> ...
>
> > > > ret = regmap_update_bits(bl->lm3533->regmap, LM3533_REG_CTRLBANK_AB_BCONF,
> > > > - mask, val);
> > > > + CTRLBANK_AB_BCONF_MODE(id),
> > > > + linear ? CTRLBANK_AB_BCONF_MODE(id) : 0);
> > > > if (ret)
> > > > return ret;
>
> ^^^ left for the context.
>
> --
> With Best Regards,
> Andy Shevchenko
>
>