diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/drivers/generic/gpio_keys/chip.h | 9 | ||||
-rw-r--r-- | src/drivers/generic/gpio_keys/gpio_keys.c | 6 |
2 files changed, 14 insertions, 1 deletions
diff --git a/src/drivers/generic/gpio_keys/chip.h b/src/drivers/generic/gpio_keys/chip.h index 818f14cc3b..9d33b4f2f3 100644 --- a/src/drivers/generic/gpio_keys/chip.h +++ b/src/drivers/generic/gpio_keys/chip.h @@ -30,6 +30,13 @@ enum { SW_PEN_INSERTED = 0xf, }; +/* Trigger for wakeup event action */ +enum { + EV_ACT_ANY, + EV_ACT_ASSERTED, + EV_ACT_DEASSERTED, +}; + /* Details of the child node defining key */ struct key_info { /* Device name of the child node - Mandatory */ @@ -47,6 +54,8 @@ struct key_info { bool is_wakeup_source; /* Wake GPE */ unsigned int wake; + /* Trigger for Wakeup Event Action as defined in EV_ACT_* enum */ + unsigned int wakeup_event_action; /* Can this key be disabled? */ bool can_be_disabled; /* Debounce interval time in milliseconds */ diff --git a/src/drivers/generic/gpio_keys/gpio_keys.c b/src/drivers/generic/gpio_keys/gpio_keys.c index 77e7740c1c..f9869d6562 100644 --- a/src/drivers/generic/gpio_keys/gpio_keys.c +++ b/src/drivers/generic/gpio_keys/gpio_keys.c @@ -43,8 +43,12 @@ static struct acpi_dp *gpio_keys_add_child_node( if (key->is_wakeup_source) acpi_dp_add_integer(dsd, "wakeup-source", key->is_wakeup_source); - if (key->wake) + if (key->wake) { acpigen_write_PRW(key->wake, 3); + acpi_dp_add_integer(dsd, "wakeup-event-action", + key->wakeup_event_action); + } + if (key->can_be_disabled) acpi_dp_add_integer(dsd, "linux,can-disable", key->can_be_disabled); |