lkml.org 
[lkml]   [2020]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v5 3/3] dt-bindings: leds: Convert pwm to yaml
Date
Hei hei,

Am Dienstag, 22. September 2020, 17:57:47 CEST schrieb Rob Herring:
> Use generic node names:
>
> led-controller {
>
> > + compatible = "pwm-leds";
> > +
> > + led-1 {
> > + label = "omap4::keypad";
> > + pwms = <&twl_pwm 0 7812500>;
> > + max-brightness = <127>;
> > + };
> > +
> > + led-2 {
> > + color = <LED_COLOR_ID_GREEN>;
> > + function = LED_FUNCTION_CHARGING;
> > + pwms = <&twl_pwmled 0 7812500>;
> > + max-brightness = <255>;
> > + };
> > + };
> > +
> > +...

This is clear for the "one led-controller" case. However, when trying to fix
those node names in existing .dts files, I wondered how those should be named
for multiple, different led-controllers, e.g. one using "pwm-leds" and another
one using "gpio-leds"?

See arch/arm/boot/dts/at91-kizbox3-hs.dts for example, the nodes are called
"pwm_leds" and "leds" currently. If both were part of a .dtsi and both named
the same, you could not overwrite/complement those in a .dts file including
that .dtsi due to a name conflict.

Just append a numerical index like this?

led-controller-1 {

};

led-controller-2 {

};

Greets
Alex



\
 
 \ /
  Last update: 2020-09-29 09:39    [W:0.102 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site