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

Documentation: ACPI: Use all-string data node references

Document that references to data nodes shall use string-only references
instead of a device reference and a succession of the first package
entries of hierarchical data node references.

Fixes: 9880702d123f ("ACPI: property: Support using strings in reference properties")
Cc: 6.8+ <stable@vger.kernel.org> # 6.8+
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Link: https://patch.msgid.link/20250409084738.3657079-1-sakari.ailus@linux.intel.com
[ rjw: Clarifying edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

authored by

Sakari Ailus and committed by
Rafael J. Wysocki
6db0261f 0af2f6be

+17 -27
+12 -14
Documentation/firmware-guide/acpi/dsd/data-node-references.rst
··· 12 12 Hierarchical data extension nodes may not be referred to directly, hence this 13 13 document defines a scheme to implement such references. 14 14 15 - A reference consist of the device object name followed by one or more 16 - hierarchical data extension [dsd-guide] keys. Specifically, the hierarchical 17 - data extension node which is referred to by the key shall lie directly under 18 - the parent object i.e. either the device object or another hierarchical data 19 - extension node. 15 + A reference to a _DSD hierarchical data node is a string consisting of a 16 + device object reference followed by a dot (".") and a relative path to a data 17 + node object. Do not use non-string references as this will produce a copy of 18 + the hierarchical data node, not a reference! 19 + 20 + The hierarchical data extension node which is referred to shall be located 21 + directly under its parent object i.e. either the device object or another 22 + hierarchical data extension node [dsd-guide]. 20 23 21 24 The keys in the hierarchical data nodes shall consist of the name of the node, 22 25 "@" character and the number of the node in hexadecimal notation (without pre- ··· 36 33 Example 37 34 ======= 38 35 39 - In the ASL snippet below, the "reference" _DSD property contains a 40 - device object reference to DEV0 and under that device object, a 41 - hierarchical data extension key "node@1" referring to the NOD1 object 42 - and lastly, a hierarchical data extension key "anothernode" referring to 43 - the ANOD object which is also the final target node of the reference. 36 + In the ASL snippet below, the "reference" _DSD property contains a string 37 + reference to a hierarchical data extension node ANOD under DEV0 under the parent 38 + of DEV1. ANOD is also the final target node of the reference. 44 39 :: 45 40 46 41 Device (DEV0) ··· 77 76 Name (_DSD, Package () { 78 77 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 79 78 Package () { 80 - Package () { 81 - "reference", Package () { 82 - ^DEV0, "node@1", "anothernode" 83 - } 79 + Package () { "reference", "^DEV0.ANOD" } 84 80 }, 85 81 } 86 82 })
+4 -7
Documentation/firmware-guide/acpi/dsd/graph.rst
··· 66 66 endpoint, the number of that endpoint shall be zero. 67 67 68 68 The endpoint reference uses property extension with "remote-endpoint" property 69 - name followed by a reference in the same package. Such references consist of 70 - the remote device reference, the first package entry of the port data extension 71 - reference under the device and finally the first package entry of the endpoint 72 - data extension reference under the port. Individual references thus appear as:: 69 + name followed by a string reference in the same package. [data-node-ref]:: 73 70 74 - Package() { device, "port@X", "endpoint@Y" } 71 + "device.datanode" 75 72 76 73 In the above example, "X" is the number of the port and "Y" is the number of 77 74 the endpoint. ··· 106 109 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 107 110 Package () { 108 111 Package () { "reg", 0 }, 109 - Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, "port@4", "endpoint@0" } }, 112 + Package () { "remote-endpoint", "\\_SB.PCI0.ISP.EP40" }, 110 113 } 111 114 }) 112 115 } ··· 138 141 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 139 142 Package () { 140 143 Package () { "reg", 0 }, 141 - Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, "port@0", "endpoint@0" } }, 144 + Package () { "remote-endpoint", "\\_SB.PCI0.I2C2.CAM0.EP00" }, 142 145 } 143 146 }) 144 147 }
+1 -6
Documentation/firmware-guide/acpi/dsd/leds.rst
··· 15 15 "flash-leds" property documentation. In short, LEDs are directly referred to by 16 16 using phandles. 17 17 18 - While Device tree allows referring to any node in the tree [devicetree], in 19 - ACPI references are limited to device nodes only [acpi]. For this reason using 20 - the same mechanism on ACPI is not possible. A mechanism to refer to non-device 21 - ACPI nodes is documented in [data-node-ref]. 22 - 23 18 ACPI allows (as does DT) using integer arguments after the reference. A 24 19 combination of the LED driver device reference and an integer argument, 25 20 referring to the "reg" property of the relevant LED, is used to identify ··· 69 74 Package () { 70 75 Package () { 71 76 "flash-leds", 72 - Package () { ^LED, "led@0", ^LED, "led@1" }, 77 + Package () { "^LED.LED0", "^LED.LED1" }, 73 78 } 74 79 } 75 80 })