arm64: dts: meson-sm1-sei610: gpio-keys: switch to IRQs
authorKevin Hilman <khilman@baylibre.com>
Thu, 14 Nov 2019 00:41:40 +0000 (16:41 -0800)
committerKevin Hilman <khilman@baylibre.com>
Mon, 9 Dec 2019 21:38:54 +0000 (13:38 -0800)
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>
arch/arm64/boot/dts/amlogic/meson-sm1-sei610.dts

index 5bd07469766bf53ed4f86b8096b5160bd68fc2c6..2c90f4713d0e8b797389da3644aad5a2799285f7 100644 (file)
        };
 
        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>;
                };
        };