1 .. SPDX-License-Identifier: GPL-2.0 2 .. include:: <isonum.txt> 3 4 ======================================== 5 Describing and referring to LEDs in ACPI 6 ======================================== 7 8 Individual LEDs are described by hierarchical 9 device node, the LED driver chip. The "reg" pr 10 tells the numerical ID of each individual LED 11 connected. [leds] The hierarchical data nodes 12 number of the LED output. 13 14 Referring to LEDs in Device tree is documented 15 "flash-leds" property documentation. In short, 16 using phandles. 17 18 While Device tree allows referring to any node 19 ACPI references are limited to device nodes on 20 the same mechanism on ACPI is not possible. A 21 ACPI nodes is documented in [data-node-ref]. 22 23 ACPI allows (as does DT) using integer argumen 24 combination of the LED driver device reference 25 referring to the "reg" property of the relevan 26 individual LEDs. The value of the "reg" proper 27 firmware and software, it uniquely identifies 28 29 Under the LED driver device, The first hierarc 30 entry shall contain the string "led@" followed 31 followed by the referred object name. That obj 32 by the number of the LED. 33 34 Example 35 ======= 36 37 An ASL example of a camera sensor device and a 38 show below. Objects not relevant for LEDs or t 39 omitted. :: 40 41 Device (LED) 42 { 43 Name (_DSD, Package () { 44 ToUUID("dbb8e3e6-5886- 45 Package () { 46 Package () { " 47 Package () { " 48 } 49 }) 50 Name (LED0, Package () { 51 ToUUID("daffd814-6eba- 52 Package () { 53 Package () { " 54 Package () { " 55 Package () { " 56 Package () { " 57 Package () { " 58 } 59 }) 60 Name (LED1, Package () { 61 ToUUID("daffd814-6eba- 62 Package () { 63 Package () { " 64 Package () { " 65 Package () { " 66 } 67 }) 68 } 69 70 Device (SEN) 71 { 72 Name (_DSD, Package () { 73 ToUUID("daffd814-6eba- 74 Package () { 75 Package () { 76 "flash 77 Packag 78 } 79 } 80 }) 81 } 82 83 where 84 :: 85 86 LED LED driver device 87 LED0 First LED 88 LED1 Second LED 89 SEN Camera sensor device (or anoth 90 91 References 92 ========== 93 94 [acpi] Advanced Configuration and Power Interf 95 https://uefi.org/specifications/ACPI/6.4/, 96 97 [data-node-ref] Documentation/firmware-guide/a 98 99 [devicetree] Devicetree. https://www.devicetre 100 101 [dsd-guide] DSD Guide. 102 https://github.com/UEFI/DSD-Guide/blob/mai 103 2021-11-30. 104 105 [leds] Documentation/devicetree/bindings/leds/ 106 107 [video-interfaces] Documentation/devicetree/bi
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.