summaryrefslogtreecommitdiff
path: root/drivers/leds
diff options
context:
space:
mode:
authorJonas Rebmann <jre@pengutronix.de>2026-06-05 09:27:48 +0200
committerLee Jones <lee@kernel.org>2026-07-01 21:24:27 +0100
commit782cca1ac6f43f5e6d0b1512b63fa517da223aca (patch)
treebfacf1dd79b5481811df502a833f3400c70d912a /drivers/leds
parentdc59e4fea9d83f03bad6bddf3fa2e52491777482 (diff)
downloadlinux-next-782cca1ac6f43f5e6d0b1512b63fa517da223aca.tar.gz
linux-next-782cca1ac6f43f5e6d0b1512b63fa517da223aca.zip
leds: pwm-multicolor: Introduce default-intensity property
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> Link: https://patch.msgid.link/20260605-multicolor-default-v2-2-ed07271df6b0@pengutronix.de Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r--drivers/leds/rgb/leds-pwm-multicolor.c2
1 files changed, 2 insertions, 0 deletions
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++;
}