[OpenWrt-Devel] ar71xx: WNR2200: remove redundant GPIO for WLAN LED
diff mbox series

Message ID 20190802164312.305da24d@kosmio.komorska
State New
Headers show
Series
  • [OpenWrt-Devel] ar71xx: WNR2200: remove redundant GPIO for WLAN LED
Related show

Commit Message

Michal Cieslakiewicz Aug. 2, 2019, 3:12 p.m. UTC
Without this patch, an extra entry appears for AR9287 GPIO
that duplicates WLAN LED but in fact drives nothing:

gpiochip1: GPIOs 502-511, ath9k-phy0:
 gpio-502 (                    |netgear:blue:wlan   ) out hi
 gpio-503 (                    |netgear:amber:test  ) out hi
 gpio-504 (                    |netgear:green:power ) out lo
 gpio-505 (                    |rfkill              ) in  hi
 gpio-507 (                    |wps                 ) in  hi
 gpio-508 (                    |reset               ) in  hi
 gpio-510 (                    |ath9k-phy0          ) out hi <===!

The pin pointed above is default LED GPIO (8) for AR9287.
For WNR2200 it is not connected anywhere - pin 0 drives blue WLAN
LED instead - but initialization code is missing that information.

This fix calls ap9x_pci_setup_wmac_led_pin() function at device
setup, forcing WLAN LED pin to be 0 and removing redundant entry.

Signed-off-by: Michal Cieslakiewicz <michal.cieslakiewicz@wp.pl>
---
 target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c
index 54217220f7..74166c5376 100644
--- a/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c
+++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-wnr2200.c
@@ -222,6 +222,7 @@  static void __init wnr2200_setup(void)
 
 	wnr2200_get_wmac(wlan_mac_addr, WNR2200_MAC0_OFFSET,
 			 WNR2200_MAC1_OFFSET, WNR2200_WMAC_OFFSET);
+	ap9x_pci_setup_wmac_led_pin(0, 0);
 	ap91_pci_init(art + WNR2200_PCIE_CALDATA_OFFSET, wlan_mac_addr);
 
 	ath79_register_leds_gpio(-1, ARRAY_SIZE(wnr2200_leds_gpio),