lkml.org 
[lkml]   [2020]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v5 3/3] dt-bindings: leds: Convert pwm to yaml
On Tue, Sep 29, 2020 at 2:39 AM Alexander Dahl <ada@thorsis.com> wrote:
>
> 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 {
> …
> };

Yes, that's generally what we've been doing.

Rob

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