Re: [PATCH v5 2/3] leds: pwm: Allow automatic labels for DT based devices

Pavel Machek
2020-09-19T09:44:35Z

[-- Attachment #1: Type: text/plain, Size: 811 bytes --]

On Sat 2020-09-19 07:31:44, Alexander Dahl wrote:
> If LEDs are configured through device tree and the property 'label' is
> omitted, the label is supposed to be generated from the properties
> 'function' and 'color' if present. While this works fine for e.g. the
> 'leds-gpio' driver, it did not for 'leds-pwm'.
>
> The reason is, you get this label naming magic only if you add a LED
> device through 'devm_led_classdev_register_ext()' and pass a pointer to
> the current device tree node.
>
> For the following node from dts the LED appeared as 'led-5' in sysfs
> before and as 'red:debug' after this change.

Thanks, applied.
Pavel

--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]