apm821xx: MR24: convert to interrupt-driven gpio-key driver
authorChristian Lamparter <chunkeey@gmail.com>
Fri, 31 May 2019 14:28:51 +0000 (16:28 +0200)
committerChristian Lamparter <chunkeey@gmail.com>
Sun, 2 Jun 2019 09:08:37 +0000 (11:08 +0200)
This patch converts the device to use the gpio-key
over gpio-key-polled driver.

Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
target/linux/apm821xx/dts/meraki-mr24.dts

index cb7c095dbb95b5ce36b587843ec37a0cdf0c739c..144c6f0eb36dbc59fcb2d7a5e693843f3ae71a1e 100644 (file)
        };
 
        keys {
-               compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
-               poll-interval = <60>;   /* 3 * 20 = 60ms */
-               autorepeat;
+               compatible = "gpio-keys";
 
                reset {
                        /* Label as per Meraki's "MR24 Installation Guide" */
                        label = "Factory Reset Button";
                        linux,code = <KEY_RESTART>;
+                       interrupt-parent = <&UIC1>;
+                       interrupts = <0x15 IRQ_TYPE_EDGE_FALLING>;
                        gpios = <&GPIO0 16 GPIO_ACTIVE_LOW>;
                };
        };