Skip to content

Commit f424da7

Browse files
committed
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>
1 parent e42617b commit f424da7

1 file changed

Lines changed: 24 additions & 2 deletions

File tree

arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,25 +46,47 @@
4646
};
4747

4848
gpio-keys {
49-
compatible = "gpio-keys-polled";
50-
poll-interval = <100>;
49+
compatible = "gpio-keys";
5150

5251
key1 {
5352
label = "A";
5453
linux,code = <BTN_0>;
5554
gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>;
55+
interrupt-parent = <&gpio_intc>;
56+
interrupts = <34 IRQ_TYPE_EDGE_BOTH>;
5657
};
5758

5859
key2 {
5960
label = "B";
6061
linux,code = <BTN_1>;
6162
gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>;
63+
interrupt-parent = <&gpio_intc>;
64+
interrupts = <35 IRQ_TYPE_EDGE_BOTH>;
6265
};
6366

6467
key3 {
6568
label = "C";
6669
linux,code = <BTN_2>;
6770
gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
71+
interrupt-parent = <&gpio_intc>;
72+
interrupts = <2 IRQ_TYPE_EDGE_BOTH>;
73+
};
74+
75+
mic_mute {
76+
label = "MicMute";
77+
linux,code = <SW_MUTE_DEVICE>;
78+
linux,input-type = <EV_SW>;
79+
gpios = <&gpio_ao GPIOE_2 GPIO_ACTIVE_LOW>;
80+
interrupt-parent = <&gpio_intc>;
81+
interrupts = <99 IRQ_TYPE_EDGE_BOTH>;
82+
};
83+
84+
power_key {
85+
label = "PowerKey";
86+
linux,code = <KEY_POWER>;
87+
gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
88+
interrupt-parent = <&gpio_intc>;
89+
interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
6890
};
6991
};
7092

0 commit comments

Comments
 (0)