From: Jacek Anaszewski <jacek.anaszewski@gmail.com>
To: Armin Wolf <W_Armin@gmx.de>, lee@kernel.org, pavel@kernel.org
Cc: linux-kernel@vger.kernel.org, corbet@lwn.net,
skhan@linuxfoundation.org, linux-leds@vger.kernel.org,
linux-doc@vger.kernel.org, wse@tuxedocomputers.com,
pobrn@protonmail.com, m.tretter@pengutronix.de
Subject: Re: [PATCH 1/1] leds: Introduce the multi_max_intensity sysfs attribute
Date: Wed, 25 Mar 2026 21:41:33 +0100 [thread overview]
Message-ID: <a4f5f16a-3188-4f23-87b4-b068fd9ccf00@gmail.com> (raw)
In-Reply-To: <20260324202751.6486-2-W_Armin@gmx.de>
Hi Armin,
Thanks for the update.
On 3/24/26 9:27 PM, Armin Wolf wrote:
> Some multicolor LEDs support global brightness control in hardware,
> meaning that the maximum intensity of the color components is not
> connected to the maximum global brightness. Such LEDs cannot be
> described properly by the current multicolor LED class interface,
> because it assumes that the maximum intensity of each color component
> is described by the maximum global brightness of the LED.
>
> Fix this by introducing a new sysfs attribute called
> "multi_max_intensity" holding the maximum intensity values for the
> color components of a multicolor LED class device. Drivers can use
> the new max_intensity field inside struct mc_subled to tell the
> multicolor LED class code about those values. Intensity values written
> by userspace applications will be limited to this maximum value.
>
> Drivers for multicolor LEDs that do not support global brightness
> control in hardware might still want to use the maximum global LED
> brightness supplied via devicetree as the maximum intensity of each
> individual color component. Such drivers should set max_intensity
> to 0 so that the multicolor LED core can act accordingly.
>
> The lp50xx and ncp5623 LED drivers already use hardware-based control
> for the global LED brightness. Modify those drivers to correctly
> initalize .max_intensity to avoid being limited to the maximum global
> brightness supplied via devicetree.
>
> Signed-off-by: Armin Wolf <W_Armin@gmx.de>
> ---
> .../ABI/testing/sysfs-class-led-multicolor | 19 ++++++--
> Documentation/leds/leds-class-multicolor.rst | 21 ++++++++-
> drivers/leds/led-class-multicolor.c | 47 ++++++++++++++++++-
> drivers/leds/leds-lp50xx.c | 1 +
> drivers/leds/rgb/leds-ncp5623.c | 4 +-
> include/linux/led-class-multicolor.h | 30 +++++++++++-
> 6 files changed, 113 insertions(+), 9 deletions(-)
Reviewed-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
--
Best regards,
Jacek Anaszewski
next prev parent reply other threads:[~2026-03-25 20:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-24 20:27 [PATCH 0/1] leds: Introduce the multi_max_intensity sysfs attribute Armin Wolf
2026-03-24 20:27 ` [PATCH 1/1] " Armin Wolf
2026-03-25 9:54 ` Werner Sembach
2026-03-25 20:41 ` Jacek Anaszewski [this message]
2026-03-31 10:38 ` Lee Jones
2026-03-31 19:17 ` Armin Wolf
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=a4f5f16a-3188-4f23-87b4-b068fd9ccf00@gmail.com \
--to=jacek.anaszewski@gmail.com \
--cc=W_Armin@gmx.de \
--cc=corbet@lwn.net \
--cc=lee@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=m.tretter@pengutronix.de \
--cc=pavel@kernel.org \
--cc=pobrn@protonmail.com \
--cc=skhan@linuxfoundation.org \
--cc=wse@tuxedocomputers.com \
/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