linux-stable/Documentation/leds
Jacek Anaszewski bb4e9af034 leds: core: Add support for composing LED class device names
Add generic support for composing LED class device name. The newly
introduced led_compose_name() function composes device name according
to either <color:function> or <devicename:color:function> pattern,
depending on the configuration of initialization data.

Backward compatibility with in-driver hard-coded LED class device
names is assured thanks to the default_label and devicename properties
of newly introduced struct led_init_data.

In case none of the aforementioned properties was found, then, for OF
nodes, the node name is adopted for LED class device name.

At the occassion of amending the Documentation/leds/leds-class.txt
unify spelling: colour -> color.

Alongside these changes added is a new tool - tools/leds/get_led_device_info.sh.
The tool allows retrieving details of a LED class device's parent device,
which proves that using vendor or product name for devicename part
of LED name doesn't convey any added value since that information had been
already available in sysfs. The script performs also basic validation
of a LED class device name.

Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Baolin Wang <baolin.wang@linaro.org>
Cc: Dan Murphy <dmurphy@ti.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Oleh Kravchenko <oleg@kaa.org.ua>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Cc: Simon Shields <simon@lineageos.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Pavel Machek <pavel@ucw.cz>
2019-07-25 20:07:52 +02:00
..
index.rst docs: leds: add it to the driver-api book 2019-07-15 09:20:28 -03:00
leds-blinkm.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
leds-class-flash.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
leds-class.rst leds: core: Add support for composing LED class device names 2019-07-25 20:07:52 +02:00
leds-lm3556.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
leds-lp55xx.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
leds-lp3944.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
leds-lp5521.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
leds-lp5523.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
leds-lp5562.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
leds-mlxcpld.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
ledtrig-oneshot.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
ledtrig-transient.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
ledtrig-usbport.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00
uleds.rst docs: leds: convert to ReST 2019-06-28 20:57:31 +02:00