mirror of https://github.com/hak5/openwrt.git
apm821xx: wndr4700: interrupt-driven gpio-keys
This patch fixes the active_low setting and converts all of the physical keys on the wndr4700 to utilize the interrupt-driven gpio-keys driver over the polled version. The sdcard-insertion hack has been removed since the block-subsystem will now be polling the device instead. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>openwrt-19.07
parent
afc056d7dc
commit
bd83592fc4
|
@ -307,23 +307,21 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
&POB0 {
|
&POB0 {
|
||||||
|
|
||||||
keys {
|
keys {
|
||||||
compatible = "gpio-keys-polled";
|
compatible = "gpio-keys";
|
||||||
#interrupt-cells = <2>;
|
|
||||||
autorepeat;
|
|
||||||
poll-interval = <60>; /* 3 * 20 = 60ms */
|
|
||||||
|
|
||||||
reset {
|
reset {
|
||||||
label = "Reset button";
|
label = "Reset button";
|
||||||
|
gpios = <&GPIO0 15 GPIO_ACTIVE_LOW>;
|
||||||
linux,code = <KEY_RESTART>;
|
linux,code = <KEY_RESTART>;
|
||||||
gpios = <&GPIO0 15 GPIO_ACTIVE_HIGH>;
|
|
||||||
interrupt-parent = <&UIC1>;
|
interrupt-parent = <&UIC1>;
|
||||||
interrupts = <0x14 IRQ_TYPE_EDGE_FALLING>;
|
interrupts = <0x14 IRQ_TYPE_EDGE_FALLING>;
|
||||||
};
|
};
|
||||||
|
|
||||||
backup_hd {
|
backup_hd {
|
||||||
label = "Backup HD button";
|
label = "Backup HD button";
|
||||||
gpios = <&GPIO0 19 GPIO_ACTIVE_HIGH>;
|
gpios = <&GPIO0 19 GPIO_ACTIVE_LOW>;
|
||||||
linux,code = <BTN_0>;
|
linux,code = <BTN_0>;
|
||||||
interrupt-parent = <&UIC1>;
|
interrupt-parent = <&UIC1>;
|
||||||
interrupts = <0x1e IRQ_TYPE_EDGE_FALLING>;
|
interrupts = <0x1e IRQ_TYPE_EDGE_FALLING>;
|
||||||
|
@ -331,7 +329,7 @@
|
||||||
|
|
||||||
rfkill {
|
rfkill {
|
||||||
label = "RFKILL button";
|
label = "RFKILL button";
|
||||||
gpios = <&GPIO0 20 GPIO_ACTIVE_HIGH>;
|
gpios = <&GPIO0 20 GPIO_ACTIVE_LOW>;
|
||||||
linux,code = <KEY_RFKILL>;
|
linux,code = <KEY_RFKILL>;
|
||||||
interrupt-parent = <&UIC1>;
|
interrupt-parent = <&UIC1>;
|
||||||
interrupts = <0x1f IRQ_TYPE_EDGE_FALLING>;
|
interrupts = <0x1f IRQ_TYPE_EDGE_FALLING>;
|
||||||
|
@ -339,17 +337,11 @@
|
||||||
|
|
||||||
wps {
|
wps {
|
||||||
label = "WPS button";
|
label = "WPS button";
|
||||||
gpios = <&GPIO0 23 GPIO_ACTIVE_HIGH>;
|
gpios = <&GPIO0 23 GPIO_ACTIVE_LOW>;
|
||||||
linux,code = <KEY_WPS_BUTTON>;
|
linux,code = <KEY_WPS_BUTTON>;
|
||||||
interrupt-parent = <&UIC2>;
|
interrupt-parent = <&UIC2>;
|
||||||
interrupts = <0x19 IRQ_TYPE_EDGE_FALLING>;
|
interrupts = <0x19 IRQ_TYPE_EDGE_FALLING>;
|
||||||
};
|
};
|
||||||
|
|
||||||
sdcard {
|
|
||||||
label = "SDCard inserted";
|
|
||||||
gpios = <&GPIO0 7 GPIO_ACTIVE_LOW>;
|
|
||||||
linux,code = <BTN_1>;
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
leds {
|
leds {
|
||||||
|
|
Loading…
Reference in New Issue