From 85d14842aefdb29c750009c0092f055587172dac Mon Sep 17 00:00:00 2001 From: Duncan Laurie Date: Mon, 29 Sep 2014 09:27:13 -0700 Subject: [PATCH] samus: Clean up touch wake sources Move _PRW to the ACPI devices for the touchpad and touchscreen. Add a _DSW method, but disable it by default for now until a spurious wake issue can be resolved. BUG=chrome-os-partner:32232 BRANCH=samus TEST=build and boot on samus, ensure trackpad does not spuriously wake the system. Change-Id: Ic4763f2cb5f3a59d04b236cee94906025661c615 Signed-off-by: Duncan Laurie Reviewed-on: https://chromium-review.googlesource.com/220325 Reviewed-by: Aaron Durbin --- src/mainboard/google/samus/acpi/mainboard.asl | 42 ++++++++++++------- 1 file changed, 28 insertions(+), 14 deletions(-) diff --git a/src/mainboard/google/samus/acpi/mainboard.asl b/src/mainboard/google/samus/acpi/mainboard.asl index 8458066b7d..e5ae9f30c1 100644 --- a/src/mainboard/google/samus/acpi/mainboard.asl +++ b/src/mainboard/google/samus/acpi/mainboard.asl @@ -17,6 +17,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#undef ENABLE_TOUCH_WAKE + Scope (\_SB) { Device (LID0) @@ -36,20 +38,6 @@ Scope (\_SB) Name(_HID, EisaId("PNP0C0C")) } - Device (TPAD) - { - Name (_HID, EisaId("PNP0C0E")) - Name (_UID, 1) - Name (_PRW, Package() { 13, 0x3 }) // GPIO13 - } - - Device (TSCR) - { - Name (_HID, EisaId("PNP0C0E")) - Name (_UID, 2) - Name (_PRW, Package() { 14, 0x3 }) // GPIO14 - } - // Keyboard Backlight interface via EC Device (KBLT) { Name (_HID, "GOOG0002") @@ -134,6 +122,7 @@ Scope (\_SB.PCI0.I2C0) Name (_UID, 2) Name (_S0W, 4) Name (ISTP, 1) /* Touchpad */ + Name (GPIO, 13) /* TRACKPAD_INT_L */ Name (_CRS, ResourceTemplate() { @@ -149,6 +138,18 @@ Scope (\_SB.PCI0.I2C0) Interrupt (ResourceConsumer, Edge, ActiveLow) { 27 } }) + Name (_PRW, Package() { GPIO, 3 }) + +#ifdef ENABLE_TOUCH_WAKE + Method (_DSW, 3, NotSerialized) + { + If (LEqual (Arg0, 1)) { + // Enable GPIO as wake source + \_SB.PCI0.LPCB.GPIO.GWAK (^GPIO) + } + } +#endif + Method (_STA) { If (LEqual (\S1EN, 1)) { @@ -254,6 +255,7 @@ Scope (\_SB.PCI0.I2C1) Name (_UID, 5) Name (_S0W, 4) Name (ISTP, 0) /* TouchScreen */ + Name (GPIO, 14) /* TOUCH_INT_L */ Name (_CRS, ResourceTemplate() { @@ -269,6 +271,18 @@ Scope (\_SB.PCI0.I2C1) Interrupt (ResourceConsumer, Edge, ActiveLow) { 28 } }) + Name (_PRW, Package() { GPIO, 3 }) + +#ifdef ENABLE_TOUCH_WAKE + Method (_DSW, 3, NotSerialized) + { + If (LEqual (Arg0, 1)) { + // Enable GPIO as wake source + \_SB.PCI0.LPCB.GPIO.GWAK (^GPIO) + } + } +#endif + Method (_STA) { If (LEqual (\S2EN, 1)) {