* [PATCH v5 0/3] gpio-keys: Add support for specifying wakeup event action
@ 2018-03-08 7:32 Jeffy Chen
2018-03-08 7:42 ` [PATCH v5 3/3] arm64: dts: rockchip: kevin: Avoid wakeup when inserting the pen Jeffy Chen
0 siblings, 1 reply; 2+ messages in thread
From: Jeffy Chen @ 2018-03-08 7:32 UTC (permalink / raw)
To: linux-arm-kernel
On chromebook kevin, we are using gpio-keys for pen insert event. But
we only want it to wakeup the system when ejecting the pen.
So we may need to change the interrupt trigger type during suspending.
Changes in v5:
Remove unneeded irq_wake flag as Andy suggested.
Changes in v4:
Add dt-binding gpio-keys.h, stop saving irq trigger type, add enable/disable wakeup helpers as Dmitry suggested.
Include dt-binding gpio-keys.h
Changes in v3:
Adding more comments as Brian suggested.
Changes in v2:
Specify wakeup event action instead of irq trigger type as Brian
suggested.
Specify wakeup event action instead of irq trigger type as Brian
suggested.
Specify wakeup event action instead of irq trigger type as Brian
suggested.
Jeffy Chen (3):
Input: gpio-keys - add support for wakeup event action
Input: gpio-keys - allow setting wakeup event action in DT
arm64: dts: rockchip: kevin: Avoid wakeup when inserting the pen
.../devicetree/bindings/input/gpio-keys.txt | 8 +++
arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 3 ++
drivers/input/keyboard/gpio_keys.c | 63 ++++++++++++++++++++--
include/dt-bindings/input/gpio-keys.h | 13 +++++
include/linux/gpio_keys.h | 2 +
5 files changed, 86 insertions(+), 3 deletions(-)
create mode 100644 include/dt-bindings/input/gpio-keys.h
--
2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH v5 3/3] arm64: dts: rockchip: kevin: Avoid wakeup when inserting the pen
2018-03-08 7:32 [PATCH v5 0/3] gpio-keys: Add support for specifying wakeup event action Jeffy Chen
@ 2018-03-08 7:42 ` Jeffy Chen
0 siblings, 0 replies; 2+ messages in thread
From: Jeffy Chen @ 2018-03-08 7:42 UTC (permalink / raw)
To: linux-arm-kernel
Add wakeup event action for Pen Insert gpio key, to avoid wakeup when
inserting the pen.
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
Tested-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---
Changes in v5: None
Changes in v4:
Include dt-binding gpio-keys.h
Changes in v3: None
Changes in v2:
Specify wakeup event action instead of irq trigger type as Brian
suggested.
arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
index 191a6bcb1704..89126dbe5d91 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts
@@ -44,6 +44,7 @@
/dts-v1/;
#include "rk3399-gru.dtsi"
+#include <dt-bindings/input/gpio-keys.h>
#include <dt-bindings/input/linux-event-codes.h>
/*
@@ -134,6 +135,8 @@
gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
linux,code = <SW_PEN_INSERTED>;
linux,input-type = <EV_SW>;
+ /* Wakeup only when ejecting */
+ wakeup-event-action = <EV_ACT_DEASSERTED>;
wakeup-source;
};
};
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-03-08 7:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-08 7:32 [PATCH v5 0/3] gpio-keys: Add support for specifying wakeup event action Jeffy Chen
2018-03-08 7:42 ` [PATCH v5 3/3] arm64: dts: rockchip: kevin: Avoid wakeup when inserting the pen Jeffy Chen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).