rambi: Move touch wakeup resource GPIO to separate device
In order to support multiple trackpads with ACPI identification it is necessary to declare devices that may not exist. If they happen to share a wakeup resource then that can end up with duplicate _PRW declarations and unexpected behavior with /proc/acpi/wakeup BUG=chrome-os-partner:25883 BRANCH=baytrail TEST=enable and disable TPAD in /proc/acpi/wakeup and test wake Change-Id: Id45c6f01de8e06c689509458a5ad893277228bad Signed-off-by: Duncan Laurie <dlaurie@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/186932 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
1866a4d2a0
commit
ba44e2e04f
1 changed files with 25 additions and 37 deletions
|
|
@ -25,8 +25,8 @@ Scope (\_SB)
|
|||
{
|
||||
Device (LID0)
|
||||
{
|
||||
Name(_HID, EisaId("PNP0C0D"))
|
||||
Method(_LID, 0)
|
||||
Name (_HID, EisaId ("PNP0C0D"))
|
||||
Method (_LID, 0)
|
||||
{
|
||||
Store (\_SB.PCI0.LPCB.EC0.LIDS, \LIDS)
|
||||
Return (\LIDS)
|
||||
|
|
@ -35,15 +35,18 @@ Scope (\_SB)
|
|||
|
||||
Device (PWRB)
|
||||
{
|
||||
Name(_HID, EisaId("PNP0C0C"))
|
||||
Name (_HID, EisaId ("PNP0C0C"))
|
||||
Name (_UID, 1)
|
||||
}
|
||||
|
||||
/* Wake device for touchpad */
|
||||
Device (TPAD)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0C0E"))
|
||||
Name (_UID, 1)
|
||||
Name (_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x3 })
|
||||
|
||||
Name (_CRS, ResourceTemplate()
|
||||
Name (RBUF, ResourceTemplate()
|
||||
{
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
|
|
@ -51,25 +54,23 @@ Scope (\_SB)
|
|||
}
|
||||
})
|
||||
|
||||
Method (_STA)
|
||||
Method (_CRS)
|
||||
{
|
||||
/* Disable if I2C1 is in ACPI mode */
|
||||
If (LEqual (\S1EN, 1)) {
|
||||
Return (0x0)
|
||||
} Else {
|
||||
Return (0xF)
|
||||
/* Only return interrupt if I2C1 is PCI mode */
|
||||
If (LEqual (\S1EN, 0)) {
|
||||
Return (^RBUF)
|
||||
}
|
||||
}
|
||||
|
||||
Name (_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x3 })
|
||||
}
|
||||
|
||||
/* Wake device for touchscreen */
|
||||
Device (TSCR)
|
||||
{
|
||||
Name (_HID, EisaId ("PNP0C0E"))
|
||||
Name (_UID, 2)
|
||||
Name (_PRW, Package() { BOARD_TOUCHSCREEN_WAKE_GPIO, 0x3 })
|
||||
|
||||
Name (_CRS, ResourceTemplate()
|
||||
Name (RBUF, ResourceTemplate()
|
||||
{
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
|
|
@ -77,17 +78,13 @@ Scope (\_SB)
|
|||
}
|
||||
})
|
||||
|
||||
Method (_STA)
|
||||
Method (_CRS)
|
||||
{
|
||||
/* Disable if I2C6 is in ACPI mode */
|
||||
If (LEqual (\S6EN, 1)) {
|
||||
Return (0x0)
|
||||
} Else {
|
||||
Return (0xF)
|
||||
/* Only return interrupt if I2C6 is PCI mode */
|
||||
If (LEqual (\S6EN, 0)) {
|
||||
Return (^RBUF)
|
||||
}
|
||||
}
|
||||
|
||||
Name (_PRW, Package() { BOARD_TOUCHSCREEN_WAKE_GPIO, 0x3 })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -107,7 +104,7 @@ Scope (\_SB.I2C1)
|
|||
ControllerInitiated, // SlaveMode
|
||||
400000, // ConnectionSpeed
|
||||
AddressingMode7Bit, // AddressingMode
|
||||
"\_SB.I2C1", // ResourceSource
|
||||
"\\_SB.I2C1", // ResourceSource
|
||||
)
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
|
|
@ -131,7 +128,6 @@ Scope (\_SB.I2C1)
|
|||
Device (ATPA)
|
||||
{
|
||||
Name (_HID, "ATML0000")
|
||||
Name (_CID, EisaId ("PNP0C0E"))
|
||||
Name (_DDN, "Atmel Touchpad")
|
||||
Name (_UID, 2)
|
||||
Name (ISTP, 1) /* Touchpad */
|
||||
|
|
@ -143,7 +139,7 @@ Scope (\_SB.I2C1)
|
|||
ControllerInitiated, // SlaveMode
|
||||
400000, // ConnectionSpeed
|
||||
AddressingMode7Bit, // AddressingMode
|
||||
"\_SB.I2C1", // ResourceSource
|
||||
"\\_SB.I2C1", // ResourceSource
|
||||
)
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
|
|
@ -162,14 +158,11 @@ Scope (\_SB.I2C1)
|
|||
|
||||
/* Allow device to power off in S0 */
|
||||
Name (_S0W, 4)
|
||||
|
||||
Name (_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x3 })
|
||||
}
|
||||
|
||||
Device (ETPA)
|
||||
{
|
||||
Name (_HID, "ELAN0000")
|
||||
Name (_CID, EisaId ("PNP0C0E"))
|
||||
Name (_DDN, "Elan Touchpad")
|
||||
Name (_UID, 3)
|
||||
Name (ISTP, 1) /* Touchpad */
|
||||
|
|
@ -181,7 +174,7 @@ Scope (\_SB.I2C1)
|
|||
ControllerInitiated, // SlaveMode
|
||||
400000, // ConnectionSpeed
|
||||
AddressingMode7Bit, // AddressingMode
|
||||
"\_SB.I2C1", // ResourceSource
|
||||
"\\_SB.I2C1", // ResourceSource
|
||||
)
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
|
|
@ -200,8 +193,6 @@ Scope (\_SB.I2C1)
|
|||
|
||||
/* Allow device to power off in S0 */
|
||||
Name (_S0W, 4)
|
||||
|
||||
Name (_PRW, Package() { BOARD_TRACKPAD_WAKE_GPIO, 0x3 })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -226,7 +217,7 @@ Scope (\_SB.I2C2)
|
|||
ControllerInitiated, // SlaveMode
|
||||
400000, // ConnectionSpeed
|
||||
AddressingMode7Bit, // AddressingMode
|
||||
"\_SB.I2C2", // ResourceSource
|
||||
"\\_SB.I2C2", // ResourceSource
|
||||
)
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
|
|
@ -266,7 +257,7 @@ Scope (\_SB.I2C5)
|
|||
ControllerInitiated, // SlaveMode
|
||||
400000, // ConnectionSpeed
|
||||
AddressingMode7Bit, // AddressingMode
|
||||
"\_SB.I2C5", // ResourceSource
|
||||
"\\_SB.I2C5", // ResourceSource
|
||||
)
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
|
|
@ -301,7 +292,7 @@ Scope (\_SB.I2C6)
|
|||
ControllerInitiated, // SlaveMode
|
||||
400000, // ConnectionSpeed
|
||||
AddressingMode7Bit, // AddressingMode
|
||||
"\_SB.I2C6", // ResourceSource
|
||||
"\\_SB.I2C6", // ResourceSource
|
||||
)
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
|
|
@ -325,7 +316,6 @@ Scope (\_SB.I2C6)
|
|||
Device (ATSA)
|
||||
{
|
||||
Name (_HID, "ATML0001")
|
||||
Name (_CID, EisaId ("PNP0C0E"))
|
||||
Name (_DDN, "Atmel Touchscreen")
|
||||
Name (_UID, 5)
|
||||
Name (ISTP, 0) /* TouchScreen */
|
||||
|
|
@ -337,7 +327,7 @@ Scope (\_SB.I2C6)
|
|||
ControllerInitiated, // SlaveMode
|
||||
400000, // ConnectionSpeed
|
||||
AddressingMode7Bit, // AddressingMode
|
||||
"\_SB.I2C6", // ResourceSource
|
||||
"\\_SB.I2C6", // ResourceSource
|
||||
)
|
||||
Interrupt (ResourceConsumer, Edge, ActiveLow)
|
||||
{
|
||||
|
|
@ -356,8 +346,6 @@ Scope (\_SB.I2C6)
|
|||
|
||||
/* Allow device to power off in S0 */
|
||||
Name (_S0W, 4)
|
||||
|
||||
Name (_PRW, Package() { BOARD_TOUCHSCREEN_WAKE_GPIO, 0x3 })
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue