diff options
author | Felix Fietkau <nbd@openwrt.org> | 2011-03-19 15:55:40 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-03-30 22:15:15 +0400 |
commit | 6de66dd963ddd669667a81a2401f2fd6472ff55c (patch) | |
tree | 4ab0cca2a88c388f93c3bfe6af6f022a894af0c5 /drivers/net/wireless/ath/ath9k/gpio.c | |
parent | 6fb1b1e18fe3d141c54182c5d5b3af823bed455f (diff) | |
download | linux-6de66dd963ddd669667a81a2401f2fd6472ff55c.tar.xz |
ath9k: add support for overriding LED pin and GPIO settings from platform data
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/gpio.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index 0fb8f8ac275a..44a0a886124d 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c @@ -41,12 +41,14 @@ void ath_init_leds(struct ath_softc *sc) { int ret; - if (AR_SREV_9287(sc->sc_ah)) - sc->sc_ah->led_pin = ATH_LED_PIN_9287; - else if (AR_SREV_9485(sc->sc_ah)) - sc->sc_ah->led_pin = ATH_LED_PIN_9485; - else - sc->sc_ah->led_pin = ATH_LED_PIN_DEF; + if (sc->sc_ah->led_pin < 0) { + if (AR_SREV_9287(sc->sc_ah)) + sc->sc_ah->led_pin = ATH_LED_PIN_9287; + else if (AR_SREV_9485(sc->sc_ah)) + sc->sc_ah->led_pin = ATH_LED_PIN_9485; + else + sc->sc_ah->led_pin = ATH_LED_PIN_DEF; + } /* Configure gpio 1 for output */ ath9k_hw_cfg_output(sc->sc_ah, sc->sc_ah->led_pin, |