diff options
author | Miaoqing Pan <miaoqing@qca.qualcomm.com> | 2015-04-01 04:19:57 +0200 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2015-04-07 19:15:01 +0200 |
commit | 61b559dea40ec1712be4a0ea712a2922a8f38588 (patch) | |
tree | afaa7ccd4fbc1e675c7a840532e30c288c23ed6c /drivers/net/wireless/ath/ath9k/gpio.c | |
parent | wl1251: Fix typo in MODULE_DESCRIPTION in wl1251/main.c (diff) | |
download | linux-61b559dea40ec1712be4a0ea712a2922a8f38588.tar.xz linux-61b559dea40ec1712be4a0ea712a2922a8f38588.zip |
ath9k: add extra GPIO led support
ar9550 or later chips, the AR_GPIO_IN_OUT register only can
control GPIO[0:3]. For the extra GPIO, use standard GPIO calls
instead of WMAC internal registers.
Signed-off-by: Miaoqing Pan <miaoqing@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/gpio.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c index 86d46c196966..284706798c71 100644 --- a/drivers/net/wireless/ath/ath9k/gpio.c +++ b/drivers/net/wireless/ath/ath9k/gpio.c @@ -69,9 +69,15 @@ void ath_fill_led_pin(struct ath_softc *sc) { struct ath_hw *ah = sc->sc_ah; - if (AR_SREV_9100(ah) || (ah->led_pin >= 0)) + if (AR_SREV_9100(ah)) return; + if (ah->led_pin >= 0) { + if (!((1 << ah->led_pin) & AR_GPIO_OE_OUT_MASK)) + ath9k_hw_request_gpio(ah, ah->led_pin, "ath9k-led"); + return; + } + if (AR_SREV_9287(ah)) ah->led_pin = ATH_LED_PIN_9287; else if (AR_SREV_9485(sc->sc_ah)) |