drivers/gpio_keys: Remove redundant is_wakeup_source flag

"is_wakeup_source" flag is used to indicate if the concerned device can
trigger a wakeup. This flag is redundant with the "wake" GPE event
definition. So remove the redundant flag and use the "wake" GPE event to
mark the wakeup source.

BUG=None
BRANCH=None
TEST=Boot to ChromeOS. Ensure that the device is marked as wakeup-source
in SSDT if wake GPE is configured. Ensure that the system can suspend
and the device acts as a wakeup source

Change-Id: I99237323639df1cb72e3a81bcfed869900a2eefa
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/31258
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
This commit is contained in:
Karthikeyan Ramasubramanian 2019-02-06 10:44:15 -07:00 committed by Patrick Georgi
parent 498f1cc1f3
commit d5c458f98a
3 changed files with 1 additions and 6 deletions

View file

@ -50,8 +50,6 @@ struct key_info {
uint32_t linux_input_type;
/* Descriptive name of the key */
const char *label;
/* Can this key wake-up the system? */
bool is_wakeup_source;
/* Wake GPE */
unsigned int wake;
/* Trigger for Wakeup Event Action as defined in EV_ACT_* enum */

View file

@ -40,10 +40,8 @@ static struct acpi_dp *gpio_keys_add_child_node(
key->linux_input_type);
if (key->label)
acpi_dp_add_string(dsd, "label", key->label);
if (key->is_wakeup_source)
acpi_dp_add_integer(dsd, "wakeup-source",
key->is_wakeup_source);
if (key->wake) {
acpi_dp_add_integer(dsd, "wakeup-source", 1);
acpigen_write_PRW(key->wake, 3);
acpi_dp_add_integer(dsd, "wakeup-event-action",
key->wakeup_event_action);

View file

@ -104,7 +104,6 @@ chip soc/intel/apollolake
register "key.linux_code" = "SW_PEN_INSERTED"
register "key.linux_input_type" = "EV_SW"
register "key.label" = ""pen_eject""
register "key.is_wakeup_source" = "1"
register "key.wake" = "GPE0_DW2_04"
register "key.wakeup_event_action" = "EV_ACT_DEASSERTED"
device generic 0 on end