[OpenWrt-Devel] Patch for Arduino Yun board WLAN RST"button support (mach-arduino-yun.c)

Hauke Mehrtens hauke at hauke-m.de
Tue Mar 8 18:16:44 EST 2016


On 03/07/2016 06:02 AM, Hirokazu MORIKAWA wrote:
> Hi,
> 
> This patch is a support for Arduino Yun board "WLAN RST" button.
> I don't know the reason why you omitted codes when implement from march-linio.c.
> But arduino yun additional packages use "WLAN RST" button.

I do not know why I did not add them.

please follow the OpenWrt patch submission guidelines:
https://dev.openwrt.org/wiki/SubmittingPatches

1. Your patch is whitespace damaged, at beast use "git format-patch" and
then "git send-email" to send it.
2. the patch is missing a "Signed-off-by: " line
3. you should send it to the public mailing list.

Hauke

> 
> --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c
> +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-arduino-yun.c
> @@ -60,6 +60,17 @@
>  	},
>  };
>  
> +static struct gpio_keys_button ds_gpio_keys[] __initdata = {
> +	{
> +		.desc		= "configuration button",
> +		.type		= EV_KEY,
> +		.code		= KEY_WPS_BUTTON,
> +		.debounce_interval = DS_KEYS_DEBOUNCE_INTERVAL,
> +		.gpio		= DS_GPIO_CONF_BTN,
> +		.active_low	= 1,
> +	},
> +};
> +
>  static void __init ds_common_setup(void)
>  {
>  	static u8 mac[6];
> @@ -97,8 +108,18 @@
>  
>  	ath79_register_leds_gpio(-1, ARRAY_SIZE(ds_leds_gpio),
>  				 ds_leds_gpio);
> +	ath79_register_gpio_keys_polled(-1, DS_KEYS_POLL_INTERVAL,
> +					ARRAY_SIZE(ds_gpio_keys),
> +					ds_gpio_keys);
>  	ath79_register_usb();
>  
> +	// use the swtich_led directly form sysfs
> +	ath79_gpio_function_disable(AR933X_GPIO_FUNC_ETH_SWITCH_LED0_EN |
> +	                            AR933X_GPIO_FUNC_ETH_SWITCH_LED1_EN |
> +	                            AR933X_GPIO_FUNC_ETH_SWITCH_LED2_EN |
> +				    AR933X_GPIO_FUNC_ETH_SWITCH_LED3_EN |
> +	                            AR933X_GPIO_FUNC_ETH_SWITCH_LED4_EN);
> +
>  	//Disable the Function for some pins to have GPIO functionality active
>  	// GPIO6-7-8 and GPIO11
>  	ath79_gpio_function_setup(AR933X_GPIO_FUNC_JTAG_DISABLE | AR933X_GPIO_FUNC_I2S_MCK_EN, 0);
> 
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list