leds.rst (cdd38c5f1ce4398ec58fec95904b75824daab7b5) leds.rst (59f3f98284baa29da60410d04e498467c044aac2)
1.. SPDX-License-Identifier: GPL-2.0
2.. include:: <isonum.txt>
3
4========================================
5Describing and referring to LEDs in ACPI
6========================================
7
1.. SPDX-License-Identifier: GPL-2.0
2.. include:: <isonum.txt>
3
4========================================
5Describing and referring to LEDs in ACPI
6========================================
7
8Individual LEDs are described by hierarchical data extension [6] nodes under the
8Individual LEDs are described by hierarchical data extension [5] nodes under the
9device node, the LED driver chip. The "reg" property in the LED specific nodes
10tells the numerical ID of each individual LED output to which the LEDs are
9device node, the LED driver chip. The "reg" property in the LED specific nodes
10tells the numerical ID of each individual LED output to which the LEDs are
11connected. [3] The hierarchical data nodes are named "led@X", where X is the
11connected. [leds] The hierarchical data nodes are named "led@X", where X is the
12number of the LED output.
13
12number of the LED output.
13
14Referring to LEDs in Device tree is documented in [4], in "flash-leds" property
15documentation. In short, LEDs are directly referred to by using phandles.
14Referring to LEDs in Device tree is documented in [video-interfaces], in
15"flash-leds" property documentation. In short, LEDs are directly referred to by
16using phandles.
16
17
17While Device tree allows referring to any node in the tree[1], in ACPI
18references are limited to device nodes only [2]. For this reason using the same
19mechanism on ACPI is not possible. A mechanism to refer to non-device ACPI nodes
20is documented in [7].
18While Device tree allows referring to any node in the tree [devicetree], in
19ACPI references are limited to device nodes only [acpi]. For this reason using
20the same mechanism on ACPI is not possible. A mechanism to refer to non-device
21ACPI nodes is documented in [data-node-ref].
21
22ACPI allows (as does DT) using integer arguments after the reference. A
23combination of the LED driver device reference and an integer argument,
24referring to the "reg" property of the relevant LED, is used to identify
25individual LEDs. The value of the "reg" property is a contract between the
26firmware and software, it uniquely identifies the LED driver outputs.
27
28Under the LED driver device, The first hierarchical data extension package list

--- 56 unchanged lines hidden (view full) ---

85 LED LED driver device
86 LED0 First LED
87 LED1 Second LED
88 SEN Camera sensor device (or another device the LED is related to)
89
90References
91==========
92
22
23ACPI allows (as does DT) using integer arguments after the reference. A
24combination of the LED driver device reference and an integer argument,
25referring to the "reg" property of the relevant LED, is used to identify
26individual LEDs. The value of the "reg" property is a contract between the
27firmware and software, it uniquely identifies the LED driver outputs.
28
29Under the LED driver device, The first hierarchical data extension package list

--- 56 unchanged lines hidden (view full) ---

86 LED LED driver device
87 LED0 First LED
88 LED1 Second LED
89 SEN Camera sensor device (or another device the LED is related to)
90
91References
92==========
93
93[1] Device tree. https://www.devicetree.org, referenced 2019-02-21.
94[acpi] Advanced Configuration and Power Interface Specification.
95 https://uefi.org/specifications/ACPI/6.4/, referenced 2021-11-30.
94
96
95[2] Advanced Configuration and Power Interface Specification.
96 https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf,
97 referenced 2019-02-21.
97[data-node-ref] Documentation/firmware-guide/acpi/dsd/data-node-references.rst
98
98
99[3] Documentation/devicetree/bindings/leds/common.txt
99[devicetree] Devicetree. https://www.devicetree.org, referenced 2019-02-21.
100
100
101[4] Documentation/devicetree/bindings/media/video-interfaces.txt
101[dsd-guide] DSD Guide.
102 https://github.com/UEFI/DSD-Guide/blob/main/dsd-guide.adoc, referenced
103 2021-11-30.
102
104
103[5] Device Properties UUID For _DSD.
104 https://www.uefi.org/sites/default/files/resources/_DSD-device-properties-UUID.pdf,
105 referenced 2019-02-21.
105[leds] Documentation/devicetree/bindings/leds/common.yaml
106
106
107[6] Hierarchical Data Extension UUID For _DSD.
108 https://www.uefi.org/sites/default/files/resources/_DSD-hierarchical-data-extension-UUID-v1.1.pdf,
109 referenced 2019-02-21.
110
111[7] Documentation/firmware-guide/acpi/dsd/data-node-references.rst
107[video-interfaces] Documentation/devicetree/bindings/media/video-interfaces.yaml