Re: [PATCH v5 26/26] leds: Document standard LED functions

From: Pavel Machek
Date: Thu Jul 18 2019 - 07:04:02 EST


Hi!

> Add a documentation for standard LED functions with regard
> to differences in meaning between cases when devicename section
> of LED name is present or not.
>
> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@xxxxxxxxx>
> ---
> Documentation/leds/led-functions.txt | 223 +++++++++++++++++++++++++++++++++++
> Documentation/leds/leds-class.txt | 3 +
> 2 files changed, 226 insertions(+)
> create mode 100644 Documentation/leds/led-functions.txt
>
> diff --git a/Documentation/leds/led-functions.txt b/Documentation/leds/led-functions.txt
> new file mode 100644
> index 000000000000..003b6b6271d1
> --- /dev/null
> +++ b/Documentation/leds/led-functions.txt
> @@ -0,0 +1,223 @@
> +This file presents standardized LED functions and their meaning.
> +
> +Each LED function is described using below template:
> +
> +- LED function name
> + NDEV : <function meaning when LED devicename section is absent>
> + DEV : <function meaning when LED devicename section is present>
> + DEVICENAME : <expected LED devicename for DEV case>
> + TRIGGER: <matching LED trigger>
> +
> +/* LED functions with corresponding trigger support */
> +
> +- activity
> + NDEV : system activity
> + DEV : n/a
> + TRIGGER : "activity"
> +
> +- backlight
> + NDEV : n/a
> + DEV : backlight of a frame buffer device
> + DEVICENAME : associated frame buffer device, e.g. fb0
> + TRIGGER: "backlight"

ndev: if there's single one on the platform?

> +- capslock
> + NDEV : n/a
> + DEV : keyboard capslock state related to the specified input device
> + DEVICENAME : associated input device, e.g. input1
> + TRIGGER : "kbd-capslock"
> +

> +- disk
> + NDEV : rw activity on any disk in the system
> + DEV : rw activity on specified disk
> + DEVICENAME : associated disk, e.g.: hda, sdb
> + TRIGGER : "disk-activity", applies only to NDEV case

I'd sort this file according to the places where these leds are
usually are present, to make it simpler for user to find the
labels. capslock should go near scrollock etc.

Plus I guess explanation in which systems such LED is found would be
good.

Global "disk" LED is very common on the PCs, and we should make sure
such LEDs have consistent labeling everywhere.

> +- disk-read
> + NDEV : read activity on any disk in the system
> + DEV : read activity on specified disk
> + DEVICENAME : associted disk, e.g.: hda, sdb
> + TRIGGER : "disk-read", applies only to NDEV case
> +
> +- disk-write
> + NDEV : write activity on any disk in the system
> + DEV : write activity on specified disk
> + DEVICENAME : associated disk, .e.g" hda, sdb
> + TRIGGER : "disk-write", applies only to NDEV case

I don't see separated read/write LEDs very often. To keep the file
size down, I'd list is at "disk-read, disk-write".

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

Attachment: signature.asc
Description: Digital signature