diff options
author | Alexander Dahl <post@lespocky.de> | 2020-09-19 07:31:44 +0200 |
---|---|---|
committer | Pavel Machek <pavel@ucw.cz> | 2020-09-26 21:56:38 +0200 |
commit | de73f275a059a01c5b514c7762bc80821f8df6d9 (patch) | |
tree | f1caa03e244da9417b2a9b778edffec56a7d8d5c /ipc/mqueue.c | |
parent | 03eb2ca44a95105d1482d5e7471016cf8b383f97 (diff) | |
download | linux-stable-de73f275a059a01c5b514c7762bc80821f8df6d9.tar.gz linux-stable-de73f275a059a01c5b514c7762bc80821f8df6d9.tar.bz2 linux-stable-de73f275a059a01c5b514c7762bc80821f8df6d9.zip |
leds: pwm: Allow automatic labels for DT based devices
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.
pwm_leds {
compatible = "pwm-leds";
led-5 {
function = LED_FUNCTION_DEBUG;
color = <LED_COLOR_ID_RED>;
pwms = <&pwm0 2 10000000 0>;
max-brightness = <127>;
linux,default-trigger = "heartbeat";
panic-indicator;
};
};
Signed-off-by: Alexander Dahl <post@lespocky.de>
Cc: Marek BehĂșn <marek.behun@nic.cz>
Signed-off-by: Pavel Machek <pavel@ucw.cz>
Diffstat (limited to 'ipc/mqueue.c')
0 files changed, 0 insertions, 0 deletions