Re: [PATCH v4] dt-bindings: leds: Add default-intensity property

Jonas Rebmann <[email protected]> Thu, 16 Jul 2026 09:31:04 +0200
Newsgroups org.kernel.vger.linux-leds,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
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    |