From: Jonas Rebmann <jre@pengutronix.de>
To: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Sven Schwermer <sven.schwermer@disruptive-technologies.com>
Cc: Pavel Machek <pavel@ucw.cz>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel@pengutronix.de,
Jonas Rebmann <jre@pengutronix.de>
Subject: [PATCH v2 2/2] leds: pwm-multicolor: Introduce default-intensity property
Date: Fri, 05 Jun 2026 09:27:48 +0200 [thread overview]
Message-ID: <20260605-multicolor-default-v2-2-ed07271df6b0@pengutronix.de> (raw)
In-Reply-To: <20260605-multicolor-default-v2-0-ed07271df6b0@pengutronix.de>
Like all LED drivers, pwm-multicolor supports turning on an LED on boot
by setting linux,default-trigger, e.g. to "default-on". pwm-multicolor
however scales the brightness of the color-component sub-LEDs with their
individual intensity value. Since these intensities are
zero-initialized, on boot a trigger is invisible until colors are set
from userspace.
Fix linux,default-trigger for pwm-multicolor by allowing for nonzero
default-intensities but default to 0 for backwards-compatibility.
Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
---
drivers/leds/rgb/leds-pwm-multicolor.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/leds/rgb/leds-pwm-multicolor.c b/drivers/leds/rgb/leds-pwm-multicolor.c
index e0d7d3c9215c..3e515df40583 100644
--- a/drivers/leds/rgb/leds-pwm-multicolor.c
+++ b/drivers/leds/rgb/leds-pwm-multicolor.c
@@ -95,6 +95,8 @@ static int iterate_subleds(struct device *dev, struct pwm_mc_led *priv,
}
subled[priv->mc_cdev.num_colors].color_index = color;
+ fwnode_property_read_u32(fwnode, "default-intensity",
+ &subled[priv->mc_cdev.num_colors].intensity);
priv->mc_cdev.num_colors++;
}
--
2.54.0.129.g3edf2eeba9
next prev parent reply other threads:[~2026-06-05 7:28 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-05 7:27 [PATCH v2 0/2] leds: pwm-multicolor: Fix default-trigger by allowing default-intensity Jonas Rebmann
2026-06-05 7:27 ` [PATCH v2 1/2] dt-bindings: leds: Add default-intensity property Jonas Rebmann
2026-06-05 7:38 ` sashiko-bot
2026-06-05 8:45 ` Jonas Rebmann
2026-06-05 10:29 ` Conor Dooley
2026-06-05 10:52 ` Conor Dooley
2026-06-05 7:27 ` Jonas Rebmann [this message]
2026-06-17 14:47 ` (subset) [PATCH v2 2/2] leds: pwm-multicolor: Introduce " Lee Jones
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=20260605-multicolor-default-v2-2-ed07271df6b0@pengutronix.de \
--to=jre@pengutronix.de \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jacek.anaszewski@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@kernel.org \
--cc=pavel@ucw.cz \
--cc=robh@kernel.org \
--cc=sven.schwermer@disruptive-technologies.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