From: Gabor Juhos Date: Sat, 12 Apr 2014 17:42:34 +0000 (+0000) Subject: ar71xx: wndr4300: select GPIO_OUT functionality for LED GPIOs X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=db123a8a2136351321d9ab76ed966cf7dab5a0f5;p=openwrt%2Fstaging%2Frmilecki.git ar71xx: wndr4300: select GPIO_OUT functionality for LED GPIOs The bootloader does not initializes the output function correctly for all LEDs. DO that from the board setup code. Signed-off-by: Gabor Juhos SVN-Revision: 40474 --- diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4300.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4300.c index d67b8f85e17..a89b8b6827d 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4300.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wndr4300.c @@ -155,6 +155,12 @@ static struct mdio_board_info wndr4300_mdio0_info[] = { static void __init wndr4300_setup(void) { + int i; + + for (i = 0; i < ARRAY_SIZE(wndr4300_leds_gpio); i++) + ath79_gpio_output_select(wndr4300_leds_gpio[i].gpio, + AR934X_GPIO_OUT_GPIO); + ath79_register_leds_gpio(-1, ARRAY_SIZE(wndr4300_leds_gpio), wndr4300_leds_gpio); ath79_register_gpio_keys_polled(-1, WNDR4300_KEYS_POLL_INTERVAL,