Re: [PATCH v4 14/14] video: leds: backlight: lm3533: Support getting LED sources from DT

From: Andy Shevchenko

Date: Thu Jun 11 2026 - 15:28:19 EST


On Thu, Jun 11, 2026 at 03:33:42PM +0300, Svyatoslav Ryhel wrote:
> ср, 10 черв. 2026 р. о 21:54 Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> пише:
> > On Wed, Jun 10, 2026 at 05:45:28PM +0300, Svyatoslav Ryhel wrote:
> > > вт, 9 черв. 2026 р. о 22:23 Andy Shevchenko <andriy.shevchenko@xxxxxxxxx> пише:
> > > > On Sat, Jun 06, 2026 at 07:57:38AM +0300, Svyatoslav Ryhel wrote:
> > > > > Add Control Bank to HVLED/LVLED muxing support based on the led-sources
> > > > > defined in the device tree.

...

> > > > > + int ret, i;
> > > >
> > > > No need to add 'i'.
> > >
> > > This is personal preference as well. There is no strict rule that
> > > iteration variable must be defined strictly in the for loop.
> >
> > This is a preference by Linus who is the leader of the project.
> > Also in IIO we have some set of maintainer preferences.
>
> Well, this is not meant for IIO,

Oh, my bad. I am overwhelmed with the IIO patches, automatically thought that
I am dealing with yet another IIO patch.

> though it seems that Lee is also in favor if this approach.

Good to know!

> > > > > + for (i = 0; i < led->num_leds; i++) {
> > > >
> > > > for (unsigned int i = 0; i < led->num_leds; i++) {
> > > >
> > > > > + if (led->leds[i] >= LM3533_LVCTRLBANK_MAX)
> > > > > + continue;
> > > > > +
> > > > > + output_cfg_shift = led->leds[i] * 2;
> > > > > + output_cfg_val |= led->id << output_cfg_shift;
> > > > > + output_cfg_mask |= OUTPUT_LVLED_MASK << output_cfg_shift;
> > > > > + }

--
With Best Regards,
Andy Shevchenko