From: Lee Jones <lee@kernel.org>
To: Tobias Johansson <tobias.johansson@axis.com>
Cc: Pavel Machek <pavel@kernel.org>,
linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org,
kernel@axis.com
Subject: Re: [PATCH] leds: lp50xx: Read default intensity from devicetree
Date: Thu, 19 Nov 2026 09:52:18 +0000 [thread overview]
Message-ID: <179442102947.44545.9103121805533352120@kernel.org> (raw)
In-Reply-To: <20261109-b4-leds-lp50xx-default-intensity-v1-1-0a04a3533df6@axis.com>
On Mon, 09 Nov 2026, Tobias Johansson wrote:
Please review, explain or fix the Sashiko review(s).
> Read the default-intensity property for each LP50xx multicolor
> component so that the configured color intensities are available
> when brightness is applied. This allows LEDs to use the intended
> RGB values without first writing multi_intensity from userspace.
>
> Leave the intensity at zero when the property is absent.
>
> Signed-off-by: Tobias Johansson <tobias.johansson@axis.com>
> ---
> drivers/leds/leds-lp50xx.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c
> index 20bfb315bda1..019a3e3cad05 100644
> --- a/drivers/leds/leds-lp50xx.c
> +++ b/drivers/leds/leds-lp50xx.c
> @@ -522,6 +522,8 @@ static int lp50xx_probe_dt(struct lp50xx *priv)
> dev_err(priv->dev, "reg %i out of range\n", multi_index);
> return -EINVAL;
> }
> + fwnode_property_read_u32(led_node, "default-intensity",
> + &mc_led_info[multi_index].intensity);
(multi_index >= LP50XX_LEDS_PER_MODULE) only tests for values too large.
What happens if `multi_index` is < 0? OOB?
> mc_led_info[multi_index].color_index = color_id;
> mc_led_info[multi_index].max_intensity = 255;
>
> ---
> base-commit: 05b4738b0078f7d6f154f68068a11c8a0635e9df
> change-id: 20260914-b4-leds-lp50xx-default-intensity-345d4cc702b4
>
> Best regards,
> --
> Tobias Johansson <tobias.johansson@axis.com>
>
--
Lee Jones
prev parent reply other threads:[~2026-11-19 9:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-09 12:58 [PATCH] leds: lp50xx: Read default intensity from devicetree Tobias Johansson
2026-11-09 13:09 ` sashiko-bot
2026-11-19 9:52 ` 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=179442102947.44545.9103121805533352120@kernel.org \
--to=lee@kernel.org \
--cc=kernel@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=tobias.johansson@axis.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.