[LEDE-DEV] [PATCH] ramips: MiWiFi-Nano add the reset button

Mathias Kresin dev at kresin.me
Wed Dec 28 01:13:58 PST 2016


28.12.2016 01:13, L. D. Pinney:
> This patch defines the reset button in the MIWIFI-NANO.dts
>
> Signed-off-by: L. D. Pinney <ldpinney at gmail.com>
> ---
>
> diff --git a/target/linux/ramips/dts/MIWIFI-NANO.dts b/target/linux/ramips/dts/MIWIFI-NANO.dts
> index 6906ef3..9b1ca42 100644
> --- a/target/linux/ramips/dts/MIWIFI-NANO.dts
> +++ b/target/linux/ramips/dts/MIWIFI-NANO.dts
> @@ -34,6 +34,19 @@
>  			default-state = "1";
>  		};
>  	};
> +
> +	gpio-keys-polled {
> +		compatible = "gpio-keys-polled";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +		poll-interval = <20>;
> +
> +		reset {
> +			label = "reset";
> +			gpios = <&gpio1 6 1>;
> +			linux,code = <0x198>;

Please include the dt-bindings/gpio/gpio.h and dt-bindings/input/input.h 
headers. Use the macros from input.h for the linux,code and the 
GPIO_ACTIVE_HIGH/GPIO_ACTIVE_LOW macros from gpio.h. Have a look at the 
F5D8235_V1.dts for an example.

It would be great if you update the GPIO_ACTIVE of the existing gpio 
properties as well.

It seams to me the GPIO_ACTIVE value of the leds for this board are 
wrong. At least it would explain why they all are switch on by default. 
Would you please have a look at this as well.

Mathias



More information about the Lede-dev mailing list