drivers/generic/gpio_keys: Add mechanism to configure GPE wake event
Add mechanism to configure GPE wake event which in turn can be used as ACPI
Power Resources for Wake
BRANCH=octopus
BUG=b:117953118
TEST=Ensure that the wake GPE event is added to ACPI Power Resource for
Wake.
Change-Id: Iacc12b8636aaac98a8689a211cbe1dcfe306f342
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/30106
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
diff --git a/src/drivers/generic/gpio_keys/gpio_keys.c b/src/drivers/generic/gpio_keys/gpio_keys.c
index 6120981..5ecb63e 100644
--- a/src/drivers/generic/gpio_keys/gpio_keys.c
+++ b/src/drivers/generic/gpio_keys/gpio_keys.c
@@ -43,6 +43,8 @@
if (key->is_wakeup_source)
acpi_dp_add_integer(dsd, "wakeup-source",
key->is_wakeup_source);
+ if (key->wake)
+ acpigen_write_PRW(key->wake, 3);
if (key->can_be_disabled)
acpi_dp_add_integer(dsd, "linux,can-disable",
key->can_be_disabled);