Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

docs: ABI: unify /sys/class/leds/<led>/brightness documentation

This ABI is defined twice, one for normal leds and another
one for multicolor ones.

Ensure that just one definition is there at ABI.

Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Link: https://lore.kernel.org/r/1115022e7f172b19ee8610f2ad28cc2f0ca93592.1604042072.git.mchehab+huawei@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Mauro Carvalho Chehab and committed by
Greg Kroah-Hartman
edef2fa2 637ae1fb

+28 -20
+22 -3
Documentation/ABI/testing/sysfs-class-led
··· 3 3 KernelVersion: 2.6.17 4 4 Contact: Richard Purdie <rpurdie@rpsys.net> 5 5 Description: 6 - Set the brightness of the LED. Most LEDs don't 7 - have hardware brightness support, so will just be turned on for 8 - non-zero brightness settings. The value is between 0 and 6 + Set the brightness of the LED. 7 + 8 + Most LEDs don't have hardware brightness support, so will 9 + just be turned on for non-zero brightness settings. 10 + 11 + .. Note:: 12 + 13 + For multicolor LEDs, writing to this file will update all 14 + LEDs within the group to a calculated percentage of what 15 + each color LED intensity is set to. 16 + 17 + The percentage is calculated for each grouped LED via 18 + the equation below:: 19 + 20 + led_brightness = brightness * multi_intensity/max_brightness 21 + 22 + For additional details please refer to 23 + Documentation/leds/leds-class-multicolor.rst. 24 + 25 + The value is between 0 and 9 26 /sys/class/leds/<led>/max_brightness. 10 27 11 28 Writing 0 to this file clears active trigger. 12 29 13 30 Writing non-zero to this file while trigger is active changes the 14 31 top brightness trigger is going to use. 32 + 33 + 15 34 16 35 What: /sys/class/leds/<led>/max_brightness 17 36 Date: March 2006
+6 -17
Documentation/ABI/testing/sysfs-class-led-multicolor
··· 1 - What: /sys/class/leds/<led>/brightness 2 - Date: March 2020 3 - KernelVersion: 5.9 4 - Contact: Dan Murphy <dmurphy@ti.com> 5 - Description: read/write 6 - Writing to this file will update all LEDs within the group to a 7 - calculated percentage of what each color LED intensity is set 8 - to. The percentage is calculated for each grouped LED via the 9 - equation below: 10 - 11 - led_brightness = brightness * multi_intensity/max_brightness 12 - 13 - For additional details please refer to 14 - Documentation/leds/leds-class-multicolor.rst. 15 - 16 - The value of the LED is from 0 to 17 - /sys/class/leds/<led>/max_brightness. 18 1 19 2 What: /sys/class/leds/<led>/multi_index 20 3 Date: March 2020 ··· 8 25 as an array of strings as they are indexed in the 9 26 multi_intensity file. 10 27 28 + For additional details please refer to 29 + Documentation/leds/leds-class-multicolor.rst. 30 + 11 31 What: /sys/class/leds/<led>/multi_intensity 12 32 Date: March 2020 13 33 KernelVersion: 5.9 ··· 19 33 This file contains array of integers. Order of components is 20 34 described by the multi_index array. The maximum intensity should 21 35 not exceed /sys/class/leds/<led>/max_brightness. 36 + 37 + For additional details please refer to 38 + Documentation/leds/leds-class-multicolor.rst.