summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/gpio.c
diff options
context:
space:
mode:
authorMiaoqing Pan <miaoqing@codeaurora.org>2016-03-07 03:38:15 +0100
committerKalle Valo <kvalo@qca.qualcomm.com>2016-03-11 13:00:02 +0100
commitb2d70d4944c1789bc64376ad97a811f37e230c87 (patch)
tree4e2159a4344b6e9d70e86a434b635bf5160d1ed5 /drivers/net/wireless/ath/ath9k/gpio.c
parentath9k: define correct GPIO numbers and bits mask (diff)
downloadlinux-b2d70d4944c1789bc64376ad97a811f37e230c87.tar.xz
linux-b2d70d4944c1789bc64376ad97a811f37e230c87.zip
ath9k: make GPIO API to support both of WMAC and SOC
commit 61b559dea40e ("ath9k: add extra GPIO led support") added ath9k to support access SOC's GPIOs, but implemented in a separated API: ath9k_hw_request_gpio(). So this patch make the APIs more common, to support both of WMAC and SOC GPIOs. The new APIs as below, void ath9k_hw_gpio_request_in(); void ath9k_hw_gpio_request_out(); void ath9k_hw_gpio_free(); NOTE, the BSP of the SOC chips(AR9340, AR9531, AR9550, AR9561) should set the corresponding MUX registers correctly. Signed-off-by: Miaoqing Pan <miaoqing@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/gpio.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/gpio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/wireless/ath/ath9k/gpio.c b/drivers/net/wireless/ath/ath9k/gpio.c
index 284706798c71..b41dfb7c2784 100644
--- a/drivers/net/wireless/ath/ath9k/gpio.c
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
@@ -74,7 +74,8 @@ void ath_fill_led_pin(struct ath_softc *sc)
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");
+ ath9k_hw_gpio_request_out(ah, ah->led_pin, "ath9k-led",
+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
return;
}
@@ -90,7 +91,8 @@ void ath_fill_led_pin(struct ath_softc *sc)
ah->led_pin = ATH_LED_PIN_DEF;
/* Configure gpio 1 for output */
- ath9k_hw_cfg_output(ah, ah->led_pin, AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
+ ath9k_hw_gpio_request_out(ah, ah->led_pin, "ath9k-led",
+ AR_GPIO_OUTPUT_MUX_AS_OUTPUT);
/* LED off, active low */
ath9k_hw_set_gpio(ah, ah->led_pin, (ah->config.led_active_high) ? 0 : 1);