From 955ca5d948519e89573b1508bb85d3b01353ac60 Mon Sep 17 00:00:00 2001 From: Andrew Litt Date: Tue, 9 Sep 2014 10:49:19 -0500 Subject: mainboard/google/parrot: fix ACPI interrupt storm on lid switch change This fixes the ACPI interrupt storm on Parrot that happens when closing the lid or entering suspend by lid close (seen in /sys/firmware/acpi/interrupts/gpe1F). This patch inverts the interrupt trigger level every time the interrupt is received so that it doesn't fire until the next state change. http://askubuntu.com/questions/310196 is a good example of what this is trying to solve. Change-Id: I8b095914e9330c3217a4ceb058613fa952f4a234 Signed-off-by: Andrew Litt Reviewed-on: http://review.coreboot.org/6858 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer Reviewed-by: Paul Menzel Reviewed-by: Aaron Durbin --- src/mainboard/google/parrot/acpi/mainboard.asl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/mainboard/google/parrot') diff --git a/src/mainboard/google/parrot/acpi/mainboard.asl b/src/mainboard/google/parrot/acpi/mainboard.asl index 4ab97330b1..503e44b620 100644 --- a/src/mainboard/google/parrot/acpi/mainboard.asl +++ b/src/mainboard/google/parrot/acpi/mainboard.asl @@ -22,6 +22,13 @@ Scope (\_GPE) { Method(_L1F, 0x0, NotSerialized) { + /* + * Invert the interrupt level bit for the lid GPIO + * so we don't get another _SB.LID0 until the state + * changes again. GIV1 is the interrupt level control + * register for GPIO bits 15:8 + */ + Xor(GIV1, 0x80, GIV1) Notify(\_SB.LID0,0x80) } } -- cgit v1.2.3