mbox series

[v2,0/2] leds: pwm: Make automatic labels work

Message ID 20200831210232.28052-1-post@lespocky.de
Headers show
Series leds: pwm: Make automatic labels work | expand

Message

Alexander Dahl Aug. 31, 2020, 9:02 p.m. UTC
Hei hei,

for leds-gpio you can use the properties 'function' and 'color' in the
devicetree node and omit 'label', the label is constructed
automatically.  This is a common feature supposed to be working for all
LED drivers.  However it did not yet work for the 'leds-pwm' driver.
This series fixes the driver and takes the opportunity to update the
dt-bindings accordingly.

v1: based on v5.9-rc2, backport on v5.4.59 tested and working

v2: based on v5.9-rc3, added the dt-bindings update patch

Greets
Alex

Alexander Dahl (2):
  leds: pwm: Allow automatic labels for DT based devices
  dt-bindings: leds: Convert pwm to yaml

 .../devicetree/bindings/leds/leds-pwm.txt     | 50 -----------
 .../devicetree/bindings/leds/leds-pwm.yaml    | 85 +++++++++++++++++++
 drivers/leds/leds-pwm.c                       |  9 +-
 3 files changed, 93 insertions(+), 51 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.txt
 create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.yaml

Comments

Jacek Anaszewski Sept. 1, 2020, 9:08 p.m. UTC | #1
Hi Alexander,

Thanks for the v2.

On 8/31/20 11:02 PM, Alexander Dahl wrote:
> Hei hei,
> 
> for leds-gpio you can use the properties 'function' and 'color' in the
> devicetree node and omit 'label', the label is constructed
> automatically.  This is a common feature supposed to be working for all
> LED drivers.  However it did not yet work for the 'leds-pwm' driver.
> This series fixes the driver and takes the opportunity to update the
> dt-bindings accordingly.
> 
> v1: based on v5.9-rc2, backport on v5.4.59 tested and working
> 
> v2: based on v5.9-rc3, added the dt-bindings update patch
> 
> Greets
> Alex
> 
> Alexander Dahl (2):
>    leds: pwm: Allow automatic labels for DT based devices
>    dt-bindings: leds: Convert pwm to yaml
> 
>   .../devicetree/bindings/leds/leds-pwm.txt     | 50 -----------
>   .../devicetree/bindings/leds/leds-pwm.yaml    | 85 +++++++++++++++++++
>   drivers/leds/leds-pwm.c                       |  9 +-
>   3 files changed, 93 insertions(+), 51 deletions(-)
>   delete mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.txt
>   create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.yaml
> 

For both patches:

Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Alexander Dahl Sept. 4, 2020, 7:53 a.m. UTC | #2
Hi Jacek,

Am Dienstag, 1. September 2020, 23:08:09 CEST schrieb Jacek Anaszewski:
> Hi Alexander,
> 
> Thanks for the v2.
> 
> On 8/31/20 11:02 PM, Alexander Dahl wrote:
> > Hei hei,
> > 
> > for leds-gpio you can use the properties 'function' and 'color' in the
> > devicetree node and omit 'label', the label is constructed
> > automatically.  This is a common feature supposed to be working for all
> > LED drivers.  However it did not yet work for the 'leds-pwm' driver.
> > This series fixes the driver and takes the opportunity to update the
> > dt-bindings accordingly.
> > 
> > v1: based on v5.9-rc2, backport on v5.4.59 tested and working
> > 
> > v2: based on v5.9-rc3, added the dt-bindings update patch
> > 
> > Greets
> > Alex
> > 
> > Alexander Dahl (2):
> >    leds: pwm: Allow automatic labels for DT based devices
> >    dt-bindings: leds: Convert pwm to yaml
> >   
> >   .../devicetree/bindings/leds/leds-pwm.txt     | 50 -----------
> >   .../devicetree/bindings/leds/leds-pwm.yaml    | 85 +++++++++++++++++++
> >   drivers/leds/leds-pwm.c                       |  9 +-
> >   3 files changed, 93 insertions(+), 51 deletions(-)
> >   delete mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.txt
> >   create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.yaml
> 
> For both patches:
> 
> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>

I'd like to make a v3 and change the license of the .yaml file to "(GPL-2.0-
only OR BSD-2-Clause)" as suggested by checkpatch and [1].  Can I keep your 
Acked-by for that?

Besides: those suggestions are obviously valid for new bindings.  What about 
old bindings (.txt), which had no explicit SPDX tag or license note before?  
What license would apply there?  Is the .yaml file technically new, when it 
was mostly just converted from .txt?

Greets
Alex

[1] https://www.kernel.org/doc/html/latest/devicetree/bindings/submitting-patches.html
Jacek Anaszewski Sept. 4, 2020, 9:19 p.m. UTC | #3
Hi Alexander,

On 9/4/20 9:53 AM, Alexander Dahl wrote:
> Hi Jacek,
> 
> Am Dienstag, 1. September 2020, 23:08:09 CEST schrieb Jacek Anaszewski:
>> Hi Alexander,
>>
>> Thanks for the v2.
>>
>> On 8/31/20 11:02 PM, Alexander Dahl wrote:
>>> Hei hei,
>>>
>>> for leds-gpio you can use the properties 'function' and 'color' in the
>>> devicetree node and omit 'label', the label is constructed
>>> automatically.  This is a common feature supposed to be working for all
>>> LED drivers.  However it did not yet work for the 'leds-pwm' driver.
>>> This series fixes the driver and takes the opportunity to update the
>>> dt-bindings accordingly.
>>>
>>> v1: based on v5.9-rc2, backport on v5.4.59 tested and working
>>>
>>> v2: based on v5.9-rc3, added the dt-bindings update patch
>>>
>>> Greets
>>> Alex
>>>
>>> Alexander Dahl (2):
>>>     leds: pwm: Allow automatic labels for DT based devices
>>>     dt-bindings: leds: Convert pwm to yaml
>>>    
>>>    .../devicetree/bindings/leds/leds-pwm.txt     | 50 -----------
>>>    .../devicetree/bindings/leds/leds-pwm.yaml    | 85 +++++++++++++++++++
>>>    drivers/leds/leds-pwm.c                       |  9 +-
>>>    3 files changed, 93 insertions(+), 51 deletions(-)
>>>    delete mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.txt
>>>    create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.yaml
>>
>> For both patches:
>>
>> Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> 
> I'd like to make a v3 and change the license of the .yaml file to "(GPL-2.0-
> only OR BSD-2-Clause)" as suggested by checkpatch and [1].  Can I keep your
> Acked-by for that?

Go ahead.

> Besides: those suggestions are obviously valid for new bindings.  What about
> old bindings (.txt), which had no explicit SPDX tag or license note before?
> What license would apply there?  Is the .yaml file technically new, when it
> was mostly just converted from .txt?

I don't know what was the rationale behind adding license to
DT bindings, probably Rob will be able to share some details.

Possibly the fact that DT examples can be now compile-tested
makes some difference here.
Pavel Machek Sept. 9, 2020, 9 a.m. UTC | #4
Hi!

> > > for leds-gpio you can use the properties 'function' and 'color' in the
> > > devicetree node and omit 'label', the label is constructed
> > > automatically.  This is a common feature supposed to be working for all
> > > LED drivers.  However it did not yet work for the 'leds-pwm' driver.
> > > This series fixes the driver and takes the opportunity to update the
> > > dt-bindings accordingly.
> > > 
> > > v1: based on v5.9-rc2, backport on v5.4.59 tested and working
> > > 
> > > v2: based on v5.9-rc3, added the dt-bindings update patch
> > > 
> > > Greets
> > > Alex
> > > 
> > > Alexander Dahl (2):
> > >    leds: pwm: Allow automatic labels for DT based devices
> > >    dt-bindings: leds: Convert pwm to yaml
> > >   
> > >   .../devicetree/bindings/leds/leds-pwm.txt     | 50 -----------
> > >   .../devicetree/bindings/leds/leds-pwm.yaml    | 85 +++++++++++++++++++
> > >   drivers/leds/leds-pwm.c                       |  9 +-
> > >   3 files changed, 93 insertions(+), 51 deletions(-)
> > >   delete mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.txt
> > >   create mode 100644 Documentation/devicetree/bindings/leds/leds-pwm.yaml
> > 
> > For both patches:
> > 
> > Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> 
> I'd like to make a v3 and change the license of the .yaml file to "(GPL-2.0-
> only OR BSD-2-Clause)" as suggested by checkpatch and [1].  Can I keep your 
> Acked-by for that?
> 
> Besides: those suggestions are obviously valid for new bindings.  What about 
> old bindings (.txt), which had no explicit SPDX tag or license note before?  
> What license would apply there?  Is the .yaml file technically new, when it 
> was mostly just converted from .txt?

If it is based on previous .txt binding, you have to respect previous
author's license. That probably means GPL-2.0 only.

Alternatively, you can contact original author(s) to get permission to
relicense under (GPL-2.0-only OR BSD-2-Clause).

Best regards,
									Pavel
Alexander Dahl Sept. 9, 2020, 9:22 a.m. UTC | #5
Hello Pavel,

Am Mittwoch, 9. September 2020, 11:00:33 CEST schrieb Pavel Machek:
> Hi!
> 
> > > > for leds-gpio you can use the properties 'function' and 'color' in the
> > > > devicetree node and omit 'label', the label is constructed
> > > > automatically.  This is a common feature supposed to be working for
> > > > all
> > > > LED drivers.  However it did not yet work for the 'leds-pwm' driver.
> > > > This series fixes the driver and takes the opportunity to update the
> > > > dt-bindings accordingly.
> > > > 
> > > > v1: based on v5.9-rc2, backport on v5.4.59 tested and working
> > > > 
> > > > v2: based on v5.9-rc3, added the dt-bindings update patch
> > > > 
> > > > Greets
> > > > Alex
> > > > 
> > > > Alexander Dahl (2):
> > > >    leds: pwm: Allow automatic labels for DT based devices
> > > >    dt-bindings: leds: Convert pwm to yaml
> > > >   
> > > >   .../devicetree/bindings/leds/leds-pwm.txt     | 50 -----------
> > > >   .../devicetree/bindings/leds/leds-pwm.yaml    | 85
> > > >   +++++++++++++++++++
> > > >   drivers/leds/leds-pwm.c                       |  9 +-
> > > >   3 files changed, 93 insertions(+), 51 deletions(-)
> > > >   delete mode 100644
> > > >   Documentation/devicetree/bindings/leds/leds-pwm.txt
> > > >   create mode 100644
> > > >   Documentation/devicetree/bindings/leds/leds-pwm.yaml
> > > 
> > > For both patches:
> > > 
> > > Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> > 
> > I'd like to make a v3 and change the license of the .yaml file to
> > "(GPL-2.0- only OR BSD-2-Clause)" as suggested by checkpatch and [1]. 
> > Can I keep your Acked-by for that?
> > 
> > Besides: those suggestions are obviously valid for new bindings.  What
> > about old bindings (.txt), which had no explicit SPDX tag or license note
> > before? What license would apply there?  Is the .yaml file technically
> > new, when it was mostly just converted from .txt?
> 
> If it is based on previous .txt binding, you have to respect previous
> author's license. That probably means GPL-2.0 only.

Probably?

> Alternatively, you can contact original author(s) to get permission to
> relicense under (GPL-2.0-only OR BSD-2-Clause).

Judging from your feedback on v3, there will be a v4 anyways, so I contacted 
Peter Ujfalusi, who added the original .txt binding back in 2012 (merged in 
2013).

Thanks for your feedback
Alex
Pavel Machek Sept. 9, 2020, 9:27 a.m. UTC | #6
Hi!

> > > Besides: those suggestions are obviously valid for new bindings.  What
> > > about old bindings (.txt), which had no explicit SPDX tag or license note
> > > before? What license would apply there?  Is the .yaml file technically
> > > new, when it was mostly just converted from .txt?
> > 
> > If it is based on previous .txt binding, you have to respect previous
> > author's license. That probably means GPL-2.0 only.
> 
> Probably?

I have not checked exact licensing situation of that text, have not
decided if it was copyrightable in the first place, and am not a
lawyer.

So... probably :-).

Best regards,
									Pavel