diff options
author | Hans de Goede <hdegoede@redhat.com> | 2017-08-31 11:45:44 +0200 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2017-08-31 11:45:44 +0200 |
commit | 51a2ae761f7a168e5d8e20a164b296a381501ca3 (patch) | |
tree | 29bb4a8823f98f9f77ffa937a0807c2b42429234 /0002-Input-soc_button_array-Suppress-power-button-presses.patch | |
parent | 717a8b5a3cc335ba3ce7d951f16752c7c85d8366 (diff) | |
download | kernel-51a2ae761f7a168e5d8e20a164b296a381501ca3.tar.gz kernel-51a2ae761f7a168e5d8e20a164b296a381501ca3.tar.xz kernel-51a2ae761f7a168e5d8e20a164b296a381501ca3.zip |
Update patches for power-button wakeup issues on Bay / Cherry Trail devices
Add patches to fix an IRQ storm on devices with a MAX17042 fuel-gauge
Diffstat (limited to '0002-Input-soc_button_array-Suppress-power-button-presses.patch')
-rw-r--r-- | 0002-Input-soc_button_array-Suppress-power-button-presses.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/0002-Input-soc_button_array-Suppress-power-button-presses.patch b/0002-Input-soc_button_array-Suppress-power-button-presses.patch new file mode 100644 index 000000000..d95aeb36c --- /dev/null +++ b/0002-Input-soc_button_array-Suppress-power-button-presses.patch @@ -0,0 +1,62 @@ +From d561f0543506bc12e7b3355efddb0bfd7ca83c74 Mon Sep 17 00:00:00 2001 +From: Hans de Goede <hdegoede@redhat.com> +Date: Sat, 22 Jul 2017 13:17:36 +0200 +Subject: [PATCH 2/2] Input: soc_button_array - Suppress power button presses + during suspend + +If the power-button is pressed to wakeup the laptop/tablet from suspend +and we report a KEY_POWER event to userspace when woken up this will cause +userspace to immediately suspend the system again which is undesirable. + +This commit sets the new no_wakeup_events flag in the gpio_keys_button +struct for the power-button suppressing the undesirable KEY_POWER input +events on wake-up. + +Signed-off-by: Hans de Goede <hdegoede@redhat.com> +--- +Changes in v2: +-New patch in v2 of this patch-set +--- + drivers/input/misc/soc_button_array.c | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/drivers/input/misc/soc_button_array.c b/drivers/input/misc/soc_button_array.c +index f600f3a7a3c6..27b99831cb97 100644 +--- a/drivers/input/misc/soc_button_array.c ++++ b/drivers/input/misc/soc_button_array.c +@@ -27,6 +27,7 @@ struct soc_button_info { + unsigned int event_code; + bool autorepeat; + bool wakeup; ++ bool no_wakeup_events; + }; + + /* +@@ -100,6 +101,7 @@ soc_button_device_create(struct platform_device *pdev, + gpio_keys[n_buttons].active_low = 1; + gpio_keys[n_buttons].desc = info->name; + gpio_keys[n_buttons].wakeup = info->wakeup; ++ gpio_keys[n_buttons].no_wakeup_events = info->no_wakeup_events; + /* These devices often use cheap buttons, use 50 ms debounce */ + gpio_keys[n_buttons].debounce_interval = 50; + n_buttons++; +@@ -185,6 +187,7 @@ static int soc_button_parse_btn_desc(struct device *dev, + info->name = "power"; + info->event_code = KEY_POWER; + info->wakeup = true; ++ info->no_wakeup_events = true; + } else if (upage == 0x07 && usage == 0xe3) { + info->name = "home"; + info->event_code = KEY_LEFTMETA; +@@ -369,7 +372,7 @@ static int soc_button_probe(struct platform_device *pdev) + * Platforms" + */ + static struct soc_button_info soc_button_PNP0C40[] = { +- { "power", 0, EV_KEY, KEY_POWER, false, true }, ++ { "power", 0, EV_KEY, KEY_POWER, false, true, true }, + { "home", 1, EV_KEY, KEY_LEFTMETA, false, true }, + { "volume_up", 2, EV_KEY, KEY_VOLUMEUP, true, false }, + { "volume_down", 3, EV_KEY, KEY_VOLUMEDOWN, true, false }, +-- +2.13.4 + |