Documentation/devicetree/bindings/leds/common.yaml | 9 +++++++++ Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml | 5 +++++ 2 files changed, 14 insertions(+)
Document the default-intensity property to set a default color on
multicolor LEDs.
Update pwm-multicolor to support it and update the example to turn the
LED red on boot.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
---
Changes in v4:
- Move default to leds-pwm-multicolor.yaml as other drivers have other
defaults (Thanks, Conor)
- Move definition of default-intensity property next to default-brightness
- Slighly improve description
- Link to v3: https://patch.msgid.link/20260630-multicolor-default-v3-1-24c5170ca3cd@pengutronix.de
Changes in v3:
- make default-intensity property description more generic and less
redundant (Thanks, Conor)
- Drop applied patch that introduces the property (Thanks, Lee)
- Link to v2: https://patch.msgid.link/20260605-multicolor-default-v2-0-ed07271df6b0@pengutronix.de
Changes in v2:
- dt-bindings: Use correct property name in example
- dt-bindings: Add missing word in property description
- Link to v1: https://patch.msgid.link/20260604-multicolor-default-v1-0-b07bff431537@pengutronix.de
---
Documentation/devicetree/bindings/leds/common.yaml | 9 +++++++++
Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml | 5 +++++
2 files changed, 14 insertions(+)
diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
index f4e44b33f56d..3e6f913070b0 100644
--- a/Documentation/devicetree/bindings/leds/common.yaml
+++ b/Documentation/devicetree/bindings/leds/common.yaml
@@ -179,6 +179,15 @@ properties:
initialization. If the option is not set then max brightness is used.
$ref: /schemas/types.yaml#/definitions/uint32
+ default-intensity:
+ description:
+ The initial intensity of the LED color component. As the intensity of
+ each sub-LED is multiplied by the overall brightness, without this
+ property on a sub-LED, it may effectively be initialized at a brightness
+ of 0 regardless of its linux,default-trigger and default-brightness
+ properties.
+ $ref: /schemas/types.yaml#/definitions/uint32
+
panic-indicator:
description:
This property specifies that the LED should be used, if at all possible,
diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
index a31a202afe5c..08e28c5f08a8 100644
--- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
@@ -45,6 +45,9 @@ properties:
color: true
+ default-intensity:
+ default: 0
+
required:
- pwms
- color
@@ -63,12 +66,14 @@ examples:
multi-led {
color = <LED_COLOR_ID_RGB>;
+ linux,default-trigger = "default-on";
function = LED_FUNCTION_INDICATOR;
max-brightness = <65535>;
led-red {
pwms = <&pwm1 0 1000000>;
color = <LED_COLOR_ID_RED>;
+ default-intensity = <65535>;
};
led-green {
---
base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
change-id: 20260604-multicolor-default-11e3becde05a
Best regards,
--
Jonas Rebmann <jre@pengutronix.de>
Am 14.07.26 um 09:35 schrieb Jonas Rebmann: > Document the default-intensity property to set a default color on > multicolor LEDs. > > Update pwm-multicolor to support it and update the example to turn the > LED red on boot. > > Acked-by: Conor Dooley <conor.dooley@microchip.com> > Signed-off-by: Jonas Rebmann <jre@pengutronix.de> > --- > Changes in v4: > - Move default to leds-pwm-multicolor.yaml as other drivers have other > defaults (Thanks, Conor) > - Move definition of default-intensity property next to default-brightness > - Slighly improve description > - Link to v3: https://patch.msgid.link/20260630-multicolor-default-v3-1-24c5170ca3cd@pengutronix.de > > Changes in v3: > - make default-intensity property description more generic and less > redundant (Thanks, Conor) > - Drop applied patch that introduces the property (Thanks, Lee) > - Link to v2: https://patch.msgid.link/20260605-multicolor-default-v2-0-ed07271df6b0@pengutronix.de > > Changes in v2: > - dt-bindings: Use correct property name in example > - dt-bindings: Add missing word in property description > - Link to v1: https://patch.msgid.link/20260604-multicolor-default-v1-0-b07bff431537@pengutronix.de > --- > Documentation/devicetree/bindings/leds/common.yaml | 9 +++++++++ > Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml | 5 +++++ > 2 files changed, 14 insertions(+) Reviewed-by: Stefan Wahren <wahrenst@gmx.net>
Hi Jonas,
Am 14.07.26 um 09:35 schrieb Jonas Rebmann:
> Document the default-intensity property to set a default color on
> multicolor LEDs.
>
> Update pwm-multicolor to support it and update the example to turn the
> LED red on boot.
>
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Jonas Rebmann <jre@pengutronix.de>
> ---
> Changes in v4:
> - Move default to leds-pwm-multicolor.yaml as other drivers have other
> defaults (Thanks, Conor)
> - Move definition of default-intensity property next to default-brightness
> - Slighly improve description
> - Link to v3: https://patch.msgid.link/20260630-multicolor-default-v3-1-24c5170ca3cd@pengutronix.de
>
> Changes in v3:
> - make default-intensity property description more generic and less
> redundant (Thanks, Conor)
> - Drop applied patch that introduces the property (Thanks, Lee)
> - Link to v2: https://patch.msgid.link/20260605-multicolor-default-v2-0-ed07271df6b0@pengutronix.de
>
> Changes in v2:
> - dt-bindings: Use correct property name in example
> - dt-bindings: Add missing word in property description
> - Link to v1: https://patch.msgid.link/20260604-multicolor-default-v1-0-b07bff431537@pengutronix.de
> ---
> Documentation/devicetree/bindings/leds/common.yaml | 9 +++++++++
> Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml | 5 +++++
> 2 files changed, 14 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
> index f4e44b33f56d..3e6f913070b0 100644
> --- a/Documentation/devicetree/bindings/leds/common.yaml
> +++ b/Documentation/devicetree/bindings/leds/common.yaml
> @@ -179,6 +179,15 @@ properties:
> initialization. If the option is not set then max brightness is used.
> $ref: /schemas/types.yaml#/definitions/uint32
>
> + default-intensity:
> + description:
> + The initial intensity of the LED color component. As the intensity of
> + each sub-LED is multiplied by the overall brightness, without this
> + property on a sub-LED, it may effectively be initialized at a brightness
> + of 0 regardless of its linux,default-trigger and default-brightness
> + properties.
I have some reservations about the wording. It isn't wrong, but in my
view, it isn't entirely clear that the initial value depends on the
implementation.
Maybe something like this?
without this property on a sub-LED, the initial intensity value depends
on the implementation regardless of its linux,default-trigger and
default-brightness properties.
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> panic-indicator:
> description:
> This property specifies that the LED should be used, if at all possible,
> diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
> index a31a202afe5c..08e28c5f08a8 100644
> --- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
> +++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml
> @@ -45,6 +45,9 @@ properties:
>
> color: true
>
> + default-intensity:
> + default: 0
> +
> required:
> - pwms
> - color
> @@ -63,12 +66,14 @@ examples:
>
> multi-led {
> color = <LED_COLOR_ID_RGB>;
> + linux,default-trigger = "default-on";
> function = LED_FUNCTION_INDICATOR;
> max-brightness = <65535>;
>
> led-red {
> pwms = <&pwm1 0 1000000>;
> color = <LED_COLOR_ID_RED>;
> + default-intensity = <65535>;
> };
>
> led-green {
>
> ---
> base-commit: dc59e4fea9d83f03bad6bddf3fa2e52491777482
> change-id: 20260604-multicolor-default-11e3becde05a
>
> Best regards,
> --
> Jonas Rebmann <jre@pengutronix.de>
>
Hi Stefan, On 2026-07-15 18:55, Stefan Wahren wrote: > Am 14.07.26 um 09:35 schrieb Jonas Rebmann: >> + default-intensity: >> + description: >> + The initial intensity of the LED color component. As the intensity of >> + each sub-LED is multiplied by the overall brightness, without this >> + property on a sub-LED, it may effectively be initialized at a brightness >> + of 0 regardless of its linux,default-trigger and default-brightness >> + properties. > I have some reservations about the wording. It isn't wrong, but in my > view, it isn't entirely clear that the initial value depends on the > implementation. > > Maybe something like this? > > without this property on a sub-LED, the initial intensity value depends > on the implementation regardless of its linux,default-trigger and > default-brightness properties. I wrote the sentence as a warning: You would rightfully expect that turning an LED on, at maximum brightness would in fact turn on the LED regardless of the driver. But beware: default-intensity may be needed to produce the expected behavior. To me, this is the important (surprising) piece of information. How about: The initial intensity of the LED color component. As the intensity of each sub-LED is multiplied by the overall brightness, without this property on a sub-LED, it will be initialized at a brightness of 0 regardless of its linux,default-trigger and default-brightness properties, for drivers with initial intensity values of 0. >> + $ref: /schemas/types.yaml#/definitions/uint32 >> + >> panic-indicator: >> description: >> This property specifies that the LED should be used, if at all possible, >> diff --git a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml >> index a31a202afe5c..08e28c5f08a8 100644 >> --- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml >> +++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml >> @@ -45,6 +45,9 @@ properties: >> >> color: true >> >> + default-intensity: >> + default: 0 >> + -- Pengutronix e.K. | Jonas Rebmann | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
Hi Jonas, Am 16.07.26 um 09:31 schrieb Jonas Rebmann: > Hi Stefan, > > On 2026-07-15 18:55, Stefan Wahren wrote: >> Am 14.07.26 um 09:35 schrieb Jonas Rebmann: >>> + default-intensity: >>> + description: >>> + The initial intensity of the LED color component. As the >>> intensity of >>> + each sub-LED is multiplied by the overall brightness, without >>> this >>> + property on a sub-LED, it may effectively be initialized at a >>> brightness >>> + of 0 regardless of its linux,default-trigger and >>> default-brightness >>> + properties. >> I have some reservations about the wording. It isn't wrong, but in my >> view, it isn't entirely clear that the initial value depends on the >> implementation. >> >> Maybe something like this? >> >> without this property on a sub-LED, the initial intensity value depends >> on the implementation regardless of its linux,default-trigger and >> default-brightness properties. > > I wrote the sentence as a warning: You would rightfully expect that > turning an LED on, at maximum brightness would in fact turn on the LED > regardless of the driver. But beware: default-intensity may be needed to > produce the expected behavior. > > To me, this is the important (surprising) piece of information. I totally agree with this and this wasn't my point. > > How about: > > The initial intensity of the LED color component. As the intensity of > each sub-LED is multiplied by the overall brightness, without this > property on a sub-LED, it will be initialized at a brightness of 0 > regardless of its linux,default-trigger and default-brightness > properties, for drivers with initial intensity values of 0. IMO the mention of "0" suggests a driver behavior, which this generic DT binding can never guarantee and it confuses more than it helps. I think in absence of default-intensity the user should consider the initial value as undefined. The value depend on the driver implementation. So I think we should avoid mention any specific values in this case. Best regards > >>> + $ref: /schemas/types.yaml#/definitions/uint32 >>> + >>> panic-indicator: >>> description: >>> This property specifies that the LED should be used, if at >>> all possible, >>> diff --git >>> a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml >>> b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml >>> index a31a202afe5c..08e28c5f08a8 100644 >>> --- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml >>> +++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml >>> @@ -45,6 +45,9 @@ properties: >>> color: true >>> + default-intensity: >>> + default: 0 >>> + > >
Hello Stefan, On 2026-07-16 11:07, Stefan Wahren wrote: > Am 16.07.26 um 09:31 schrieb Jonas Rebmann: >> On 2026-07-15 18:55, Stefan Wahren wrote: >>> Am 14.07.26 um 09:35 schrieb Jonas Rebmann: >>>> + default-intensity: >>>> + description: >>>> + The initial intensity of the LED color component. As the >>>> intensity of >>>> + each sub-LED is multiplied by the overall brightness, without >>>> this >>>> + property on a sub-LED, it may effectively be initialized at a >>>> brightness >>>> + of 0 regardless of its linux,default-trigger and >>>> default-brightness >>>> + properties. >>> I have some reservations about the wording. It isn't wrong, but in my >>> view, it isn't entirely clear that the initial value depends on the >>> implementation. >>> >>> Maybe something like this? >>> >>> without this property on a sub-LED, the initial intensity value depends >>> on the implementation regardless of its linux,default-trigger and >>> default-brightness properties. [...] >> How about: >> >> The initial intensity of the LED color component. As the intensity of >> each sub-LED is multiplied by the overall brightness, without this >> property on a sub-LED, it will be initialized at a brightness of 0 >> regardless of its linux,default-trigger and default-brightness >> properties, for drivers with initial intensity values of 0. > IMO the mention of "0" suggests a driver behavior, which this generic DT > binding can never guarantee and it confuses more than it helps. > I think in absence of default-intensity the user should consider the > initial value as undefined. The value depend on the driver > implementation. So I think we should avoid mention any specific values > in this case. The only implied driver behavior is that intensity is multiplied by brightness, and that is well-defined across all multicolor-LED drivers (leds-class-multicolor.rst). The warning here is that "for drivers with initial intensity values of 0", default-brightness is dysfunctional when no default-intensity is specified. This does imply that the behavior is driver specific, not the contrary. But the key message is that there are cases where without default-intensity, a driver may just do a whole lot of nothing. This is not only against my personal expectations, it is also against the documentation in leds-class.rst: The brightness file will set the brightness of the LED (taking a value 0-max_brightness). Most LEDs don't have hardware brightness support so will just be turned on for non-zero brightness settings. This I find to be much more of an issue than an LED blinking in an arbitrary color when you haven't specified the color. Not only would that to me be somewhat expected that I didn't ask for a specific color and got any one, there is also no documentation I know of that says otherwise; and the question seems completely hypothetical given that to my knowdelge, no drivers exist which default to anything other than (0,0,0) or (max,max,max). No multicolor-LED driver should have ever initialized intensity to (0,0,0). In that perfect (and/or non-backwards-compatible) world, "The initial intensity of the LED color component." would have completely sufficed as property description of default-intensity. But since we now have LEDs that don't turn on when you turn them on, I felt the need to include this long second sentence. >>>> --- a/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml >>>> +++ b/Documentation/devicetree/bindings/leds/leds-pwm-multicolor.yaml >>>> @@ -45,6 +45,9 @@ properties: >>>> color: true >>>> + default-intensity: >>>> + default: 0 >>>> + -- Pengutronix e.K. | Jonas Rebmann | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-9 |
© 2016 - 2026 Red Hat, Inc.