Re: [PATCH v1] video: leds: backlight: lm3533: Support getting LED sources from DT
From: Lee Jones
Date: Fri Nov 13 2026 - 14:10:27 EST
On Fri, 13 Nov 2026, Svyatoslav Ryhel wrote:
> пт, 13 лист. 2026 р. о 16:53 Lee Jones <lee@xxxxxxxxxx> пише:
> >
> > Drop the 'video: ' part of the subject line.
> >
> > Please review, explain or fix the Sashiko review(s).
> >
> > > Add Control Bank to HVLED/LVLED muxing support based on the led-sources
> > > defined in the device tree.
> > >
> > > Signed-off-by: Svyatoslav Ryhel <clamor95@xxxxxxxxx>
> > > Reviewed-by: Daniel Thompson (RISCstar) <danielt@xxxxxxxxxx>
> > > ---
> > > This was part of the original LM3533 controller DT/OF conversion patchset,
> > > but it appears to have been accidentally separated during the final iteration.
> > > Therefore, I am sending it as a follow-up.
> > > ---
> > > drivers/leds/leds-lm3533.c | 60 +++++++++++++++++++++++++++++
> > > drivers/video/backlight/lm3533_bl.c | 45 ++++++++++++++++++++++
[...]
> > > + if (bl->num_leds) {
> > > + for (int i = 0; i < bl->num_leds; i++) {
> > > + if (bl->led_strings[i] >= LM3533_HVCTRLBANK_COUNT)
> > > + continue;
> > > +
> > > + output_cfg_val |= ctrlbank << bl->led_strings[i];
> > > + output_cfg_mask |= BIT(bl->led_strings[i]);
> > > + }
> >
> > This for loop doesn't need to be in the if statement.
> >
>
> It is in if statement because if node has no "led-sources"
> LM3533_REG_OUTPUT_CONF1 should not be touched and must be left in its
> default state.
But it won't iterate if (!bl->num_leds), so it's being indented for no
reason.
--
Lee Jones