diff options
author | Jeffy Chen <jeffy.chen@rock-chips.com> | 2018-03-08 16:03:27 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2018-03-14 10:13:22 -0700 |
commit | 83fc580dcc2f0f36114477c4ac7adbe5c32329a3 (patch) | |
tree | 848ad4e17ccb5afa3e056de894955b4b6efd28d2 /include/linux/gpio_keys.h | |
parent | 7085123333e2ee2686086fc49bc3117bacd86105 (diff) | |
download | linux-riscv-83fc580dcc2f0f36114477c4ac7adbe5c32329a3.tar.gz linux-riscv-83fc580dcc2f0f36114477c4ac7adbe5c32329a3.tar.bz2 linux-riscv-83fc580dcc2f0f36114477c4ac7adbe5c32329a3.zip |
Input: gpio-keys - add support for wakeup event action
Add support for specifying event actions to trigger wakeup when using
the gpio-keys input device as a wakeup source.
This would allow the device to configure when to wakeup the system. For
example a gpio-keys input device for pen insert, may only want to wakeup
the system when ejecting the pen.
Suggested-by: Brian Norris <briannorris@chromium.org>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'include/linux/gpio_keys.h')
-rw-r--r-- | include/linux/gpio_keys.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/gpio_keys.h b/include/linux/gpio_keys.h index d06bf77400f1..7160df54a6fe 100644 --- a/include/linux/gpio_keys.h +++ b/include/linux/gpio_keys.h @@ -13,6 +13,7 @@ struct device; * @desc: label that will be attached to button's gpio * @type: input event type (%EV_KEY, %EV_SW, %EV_ABS) * @wakeup: configure the button as a wake-up source + * @wakeup_event_action: event action to trigger wakeup * @debounce_interval: debounce ticks interval in msecs * @can_disable: %true indicates that userspace is allowed to * disable button via sysfs @@ -26,6 +27,7 @@ struct gpio_keys_button { const char *desc; unsigned int type; int wakeup; + int wakeup_event_action; int debounce_interval; bool can_disable; int value; |