aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@linux.intel.com>2018-07-17 10:19:21 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-07-23 06:44:52 -0400
commita4138e7c12287268348cc2dcad414a62c515d77a (patch)
tree176822e11bfa6750351997169f046d2c69157d11
parente49363e96fd2ee3fd5259fd2a6f9050cb4af82c8 (diff)
ACPI: property: graph: Update graph documentation to use generic references
Instead of port and endpoint properties for representing ports and endpoints, use the keys of the hierarchical data extension references when referring to the port and endpoint nodes. Additionally, use "reg" properties as in Device Tree to specify the number of the port or the endpoint. The keys of the port nodes begin with "port" and the keys of the endpoint nodes begin with "endpoint", both followed by "@" character and the number of the port or the endpoint. These changes have the advantage that no ACPI specific properties need to be added to refer to non-device nodes. Additionally, using the name of the node instead of an integer property inside the node is easier to parse in code and easier for humans to understand. Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--Documentation/acpi/dsd/data-node-references.txt1
-rw-r--r--Documentation/acpi/dsd/graph.txt65
2 files changed, 36 insertions, 30 deletions
diff --git a/Documentation/acpi/dsd/data-node-references.txt b/Documentation/acpi/dsd/data-node-references.txt
index 6e9a5f925edd..c3871565c8cf 100644
--- a/Documentation/acpi/dsd/data-node-references.txt
+++ b/Documentation/acpi/dsd/data-node-references.txt
@@ -75,6 +75,7 @@ Example
75 }) 75 })
76 } 76 }
77 77
78Please also see a graph example in graph.txt .
78 79
79References 80References
80---------- 81----------
diff --git a/Documentation/acpi/dsd/graph.txt b/Documentation/acpi/dsd/graph.txt
index 3131f457882b..b9ce910781dc 100644
--- a/Documentation/acpi/dsd/graph.txt
+++ b/Documentation/acpi/dsd/graph.txt
@@ -38,34 +38,39 @@ represents a connection to that interface.
38 38
39All port nodes are located under the device's "_DSD" node in the hierarchical 39All port nodes are located under the device's "_DSD" node in the hierarchical
40data extension tree. The data extension related to each port node must begin 40data extension tree. The data extension related to each port node must begin
41with "port" and must be followed by the number of the port as its key. The 41with "port" and must be followed by the "@" character and the number of the port
42target object it refers to should be called "PRTX", where "X" is the number of 42as its key. The target object it refers to should be called "PRTX", where "X" is
43the port. An example of such a package would be: 43the number of the port. An example of such a package would be:
44 44
45 Package() { "port4", PRT4 } 45 Package() { "port@4", PRT4 }
46 46
47Further on, endpoints are located under the port nodes. The hierarchical data 47Further on, endpoints are located under the port nodes. The hierarchical
48extension key of the endpoint nodes must begin with "endpoint" and must be 48data extension key of the endpoint nodes must begin with
49followed by the number of the endpoint. The object it refers to should be called 49"endpoint" and must be followed by the "@" character and the number of the
50"EPXY", where "X" is the number of the port and "Y" is the number of the 50endpoint. The object it refers to should be called "EPXY", where "X" is the
51endpoint. An example of such a package would be: 51number of the port and "Y" is the number of the endpoint. An example of such a
52package would be:
52 53
53 Package() { "endpoint0", EP40 } 54 Package() { "endpoint@0", EP40 }
54 55
55Each port node contains a property extension key "port", the value of 56Each port node contains a property extension key "port", the value of which is
56which is the number of the port. Each endpoint is similarly numbered 57the number of the port. Each endpoint is similarly numbered with a property
57with a property extension key "endpoint". Port numbers must be unique within a 58extension key "reg", the value of which is the number of the endpoint. Port
58device and endpoint numbers must be unique within a port. If a device object 59numbers must be unique within a device and endpoint numbers must be unique
59may only has a single port, then the number of that port shall be zero. 60within a port. If a device object may only has a single port, then the number
60Similarly, if a port may only have a single endpoint, the number of that 61of that port shall be zero. Similarly, if a port may only have a single
61endpoint shall be zero. 62endpoint, the number of that endpoint shall be zero.
62 63
63The endpoint reference uses property extension with "remote-endpoint" property 64The endpoint reference uses property extension with "remote-endpoint" property
64name followed by a reference in the same package. Such references consist of the 65name followed by a reference in the same package. Such references consist of the
65the remote device reference, number of the port in the device and finally the 66the remote device reference, the first package entry of the port data extension
66number of the endpoint in that port. Individual references thus appear as: 67reference under the device and finally the first package entry of the endpoint
68data extension reference under the port. Individual references thus appear as:
67 69
68 Package() { device, port_number, endpoint_number } 70 Package() { device, "port@X", "endpoint@Y" }
71
72In the above example, "X" is the number of the port and "Y" is the number of the
73endpoint.
69 74
70The references to endpoints must be always done both ways, to the 75The references to endpoints must be always done both ways, to the
71remote endpoint and back from the referred remote endpoint node. 76remote endpoint and back from the referred remote endpoint node.
@@ -83,24 +88,24 @@ A simple example of this is show below:
83 }, 88 },
84 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), 89 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
85 Package () { 90 Package () {
86 Package () { "port0", PRT0 }, 91 Package () { "port@0", PRT0 },
87 } 92 }
88 }) 93 })
89 Name (PRT0, Package() { 94 Name (PRT0, Package() {
90 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 95 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
91 Package () { 96 Package () {
92 Package () { "port", 0 }, 97 Package () { "reg", 0 },
93 }, 98 },
94 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), 99 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
95 Package () { 100 Package () {
96 Package () { "endpoint0", EP00 }, 101 Package () { "endpoint@0", EP00 },
97 } 102 }
98 }) 103 })
99 Name (EP00, Package() { 104 Name (EP00, Package() {
100 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 105 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
101 Package () { 106 Package () {
102 Package () { "endpoint", 0 }, 107 Package () { "reg", 0 },
103 Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, 4, 0 } }, 108 Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, "port@4", "endpoint@0" } },
104 } 109 }
105 }) 110 })
106 } 111 }
@@ -113,26 +118,26 @@ A simple example of this is show below:
113 Name (_DSD, Package () { 118 Name (_DSD, Package () {
114 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), 119 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
115 Package () { 120 Package () {
116 Package () { "port4", PRT4 }, 121 Package () { "port@4", PRT4 },
117 } 122 }
118 }) 123 })
119 124
120 Name (PRT4, Package() { 125 Name (PRT4, Package() {
121 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 126 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
122 Package () { 127 Package () {
123 Package () { "port", 4 }, /* CSI-2 port number */ 128 Package () { "reg", 4 }, /* CSI-2 port number */
124 }, 129 },
125 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"), 130 ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
126 Package () { 131 Package () {
127 Package () { "endpoint0", EP40 }, 132 Package () { "endpoint@0", EP40 },
128 } 133 }
129 }) 134 })
130 135
131 Name (EP40, Package() { 136 Name (EP40, Package() {
132 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"), 137 ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
133 Package () { 138 Package () {
134 Package () { "endpoint", 0 }, 139 Package () { "reg", 0 },
135 Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, 0, 0 } }, 140 Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, "port@0", "endpoint@0" } },
136 } 141 }
137 }) 142 })
138 } 143 }