diff options
author | Kevin Hilman <khilman@baylibre.com> | 2019-11-14 01:41:40 +0100 |
---|---|---|
committer | Kevin Hilman <khilman@baylibre.com> | 2019-12-09 22:38:54 +0100 |
commit | f424da7f78a7fbc17bc66216c2b3664b22d30a27 (patch) | |
tree | f72630ee8922e7db1c26294493f27a7ae51e1ac6 /arch | |
parent | Linux 5.5-rc1 (diff) | |
download | linux-f424da7f78a7fbc17bc66216c2b3664b22d30a27.tar.xz linux-f424da7f78a7fbc17bc66216c2b3664b22d30a27.zip |
arm64: dts: meson-sm1-sei610: gpio-keys: switch to IRQs
Switch the GPIO buttons/switches to use interrupts instead of polling.
While at it, add the mic mute switch and the power button.
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts index 5bd07469766b..2c90f4713d0e 100644 --- a/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts +++ b/arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts @@ -46,25 +46,47 @@ }; gpio-keys { - compatible = "gpio-keys-polled"; - poll-interval = <100>; + compatible = "gpio-keys"; key1 { label = "A"; linux,code = <BTN_0>; gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpio_intc>; + interrupts = <34 IRQ_TYPE_EDGE_BOTH>; }; key2 { label = "B"; linux,code = <BTN_1>; gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpio_intc>; + interrupts = <35 IRQ_TYPE_EDGE_BOTH>; }; key3 { label = "C"; linux,code = <BTN_2>; gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpio_intc>; + interrupts = <2 IRQ_TYPE_EDGE_BOTH>; + }; + + mic_mute { + label = "MicMute"; + linux,code = <SW_MUTE_DEVICE>; + linux,input-type = <EV_SW>; + gpios = <&gpio_ao GPIOE_2 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpio_intc>; + interrupts = <99 IRQ_TYPE_EDGE_BOTH>; + }; + + power_key { + label = "PowerKey"; + linux,code = <KEY_POWER>; + gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>; + interrupt-parent = <&gpio_intc>; + interrupts = <3 IRQ_TYPE_EDGE_BOTH>; }; }; |