Skip to content

Commit e3e2867

Browse files
committed
Merge branches 'acpi-bus', 'acpi-doc' and 'acpi-pm'
* acpi-bus: ACPI: bus: change _ADR representation to 64 bits * acpi-doc: Documentation: ACPI: Direct references are allowed to devices only Documentation: ACPI: Use tabs for graph ASL indentation * acpi-pm: ACPI: PM: Set enable_for_wake for wakeup GPEs during suspend-to-idle
4 parents 811b4c9 + ca6f998 + a423bd8 + 2f844b6 commit e3e2867

File tree

5 files changed

+72
-66
lines changed

5 files changed

+72
-66
lines changed

Documentation/firmware-guide/acpi/dsd/data-node-references.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ the ANOD object which is also the final target node of the reference.
4545
Name (_DSD, Package () {
4646
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
4747
Package () {
48-
Package () { "node@0", NOD0 },
49-
Package () { "node@1", NOD1 },
48+
Package () { "node@0", "NOD0" },
49+
Package () { "node@1", "NOD1" },
5050
}
5151
})
5252
Name (NOD0, Package() {
@@ -58,7 +58,7 @@ the ANOD object which is also the final target node of the reference.
5858
Name (NOD1, Package() {
5959
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
6060
Package () {
61-
Package () { "anothernode", ANOD },
61+
Package () { "anothernode", "ANOD" },
6262
}
6363
})
6464
Name (ANOD, Package() {

Documentation/firmware-guide/acpi/dsd/graph.rst

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ with "port" and must be followed by the "@" character and the number of the
4545
port as its key. The target object it refers to should be called "PRTX", where
4646
"X" is the number of the port. An example of such a package would be::
4747

48-
Package() { "port@4", PRT4 }
48+
Package() { "port@4", "PRT4" }
4949

5050
Further on, endpoints are located under the port nodes. The hierarchical
5151
data extension key of the endpoint nodes must begin with
@@ -54,7 +54,7 @@ endpoint. The object it refers to should be called "EPXY", where "X" is the
5454
number of the port and "Y" is the number of the endpoint. An example of such a
5555
package would be::
5656

57-
Package() { "endpoint@0", EP40 }
57+
Package() { "endpoint@0", "EP40" }
5858

5959
Each port node contains a property extension key "port", the value of which is
6060
the number of the port. Each endpoint is similarly numbered with a property
@@ -82,68 +82,68 @@ A simple example of this is show below::
8282

8383
Scope (\_SB.PCI0.I2C2)
8484
{
85-
Device (CAM0)
86-
{
87-
Name (_DSD, Package () {
88-
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
89-
Package () {
90-
Package () { "compatible", Package () { "nokia,smia" } },
91-
},
92-
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
93-
Package () {
94-
Package () { "port@0", PRT0 },
95-
}
96-
})
97-
Name (PRT0, Package() {
98-
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
99-
Package () {
100-
Package () { "reg", 0 },
101-
},
102-
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
103-
Package () {
104-
Package () { "endpoint@0", EP00 },
105-
}
106-
})
107-
Name (EP00, Package() {
108-
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
109-
Package () {
110-
Package () { "reg", 0 },
111-
Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, "port@4", "endpoint@0" } },
112-
}
113-
})
114-
}
85+
Device (CAM0)
86+
{
87+
Name (_DSD, Package () {
88+
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
89+
Package () {
90+
Package () { "compatible", Package () { "nokia,smia" } },
91+
},
92+
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
93+
Package () {
94+
Package () { "port@0", "PRT0" },
95+
}
96+
})
97+
Name (PRT0, Package() {
98+
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
99+
Package () {
100+
Package () { "reg", 0 },
101+
},
102+
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
103+
Package () {
104+
Package () { "endpoint@0", "EP00" },
105+
}
106+
})
107+
Name (EP00, Package() {
108+
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
109+
Package () {
110+
Package () { "reg", 0 },
111+
Package () { "remote-endpoint", Package() { \_SB.PCI0.ISP, "port@4", "endpoint@0" } },
112+
}
113+
})
114+
}
115115
}
116116

117117
Scope (\_SB.PCI0)
118118
{
119-
Device (ISP)
120-
{
121-
Name (_DSD, Package () {
122-
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
123-
Package () {
124-
Package () { "port@4", PRT4 },
125-
}
126-
})
127-
128-
Name (PRT4, Package() {
129-
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
130-
Package () {
131-
Package () { "reg", 4 }, /* CSI-2 port number */
132-
},
133-
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
134-
Package () {
135-
Package () { "endpoint@0", EP40 },
136-
}
137-
})
138-
139-
Name (EP40, Package() {
140-
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
141-
Package () {
142-
Package () { "reg", 0 },
143-
Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, "port@0", "endpoint@0" } },
144-
}
145-
})
146-
}
119+
Device (ISP)
120+
{
121+
Name (_DSD, Package () {
122+
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
123+
Package () {
124+
Package () { "port@4", "PRT4" },
125+
}
126+
})
127+
128+
Name (PRT4, Package() {
129+
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
130+
Package () {
131+
Package () { "reg", 4 }, /* CSI-2 port number */
132+
},
133+
ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
134+
Package () {
135+
Package () { "endpoint@0", "EP40" },
136+
}
137+
})
138+
139+
Name (EP40, Package() {
140+
ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
141+
Package () {
142+
Package () { "reg", 0 },
143+
Package () { "remote-endpoint", Package () { \_SB.PCI0.I2C2.CAM0, "port@0", "endpoint@0" } },
144+
}
145+
})
146+
}
147147
}
148148

149149
Here, the port 0 of the "CAM0" device is connected to the port 4 of

drivers/acpi/device_sysfs.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,8 +428,10 @@ static ssize_t acpi_device_adr_show(struct device *dev,
428428
{
429429
struct acpi_device *acpi_dev = to_acpi_device(dev);
430430

431-
return sprintf(buf, "0x%08x\n",
432-
(unsigned int)(acpi_dev->pnp.bus_address));
431+
if (acpi_dev->pnp.bus_address > U32_MAX)
432+
return sprintf(buf, "0x%016llx\n", acpi_dev->pnp.bus_address);
433+
else
434+
return sprintf(buf, "0x%08llx\n", acpi_dev->pnp.bus_address);
433435
}
434436
static DEVICE_ATTR(adr, 0444, acpi_device_adr_show, NULL);
435437

drivers/acpi/sleep.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -977,6 +977,8 @@ static int acpi_s2idle_prepare(void)
977977
if (acpi_sci_irq_valid())
978978
enable_irq_wake(acpi_sci_irq);
979979

980+
acpi_enable_wakeup_devices(ACPI_STATE_S0);
981+
980982
/* Change the configuration of GPEs to avoid spurious wakeup. */
981983
acpi_enable_all_wakeup_gpes();
982984
acpi_os_wait_events_complete();
@@ -1027,6 +1029,8 @@ static void acpi_s2idle_restore(void)
10271029
{
10281030
acpi_enable_all_runtime_gpes();
10291031

1032+
acpi_disable_wakeup_devices(ACPI_STATE_S0);
1033+
10301034
if (acpi_sci_irq_valid())
10311035
disable_irq_wake(acpi_sci_irq);
10321036

include/acpi/acpi_bus.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ struct acpi_device_dir {
230230
/* Plug and Play */
231231

232232
typedef char acpi_bus_id[8];
233-
typedef unsigned long acpi_bus_address;
233+
typedef u64 acpi_bus_address;
234234
typedef char acpi_device_name[40];
235235
typedef char acpi_device_class[20];
236236

0 commit comments

Comments
 (0)