From: Lee Jones <lee@kernel.org>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Pavel Machek <pavel@kernel.org>,
Griffin Kroah-Hartman <griffin@kroah.com>,
Daniel Thompson <danielt@kernel.org>,
Jingoo Han <jingoohan1@gmail.com>, Helge Deller <deller@gmx.de>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org
Subject: Re: [PATCH v1] video: leds: backlight: lm3533: Support getting LED sources from DT
Date: Fri, 13 Nov 2026 19:06:08 +0000 [thread overview]
Message-ID: <20261113190608.GK6323@joneslee-macbookpro.roam.internal> (raw)
In-Reply-To: <CAPVz0n1E2bLOzKEC6_2iiPM5ZZ6-NOXuOkwx+jQYn8BRvPXwSw@mail.gmail.com>
On Fri, 13 Nov 2026, Svyatoslav Ryhel wrote:
> пт, 13 лист. 2026 р. о 16:53 Lee Jones <lee@kernel.org> пише:
> >
> > 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@gmail.com>
> > > Reviewed-by: Daniel Thompson (RISCstar) <danielt@kernel.org>
> > > ---
> > > 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
prev parent reply other threads:[~2026-11-13 19:06 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 14:24 Svyatoslav Ryhel
2026-11-13 14:53 ` Lee Jones
2026-11-13 15:41 ` Svyatoslav Ryhel
2026-11-13 19:06 ` Lee Jones [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261113190608.GK6323@joneslee-macbookpro.roam.internal \
--to=lee@kernel.org \
--cc=clamor95@gmail.com \
--cc=danielt@kernel.org \
--cc=deller@gmx.de \
--cc=dri-devel@lists.freedesktop.org \
--cc=griffin@kroah.com \
--cc=jingoohan1@gmail.com \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®