Re: [PATCH v4] dt-bindings: leds: Add default-intensity property
Stefan Wahren <[email protected]> Thu, 16 Jul 2026 11:07:28 +0200
| Newsgroups | org.kernel.vger.linux-leds,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
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 >>> + > >