diff options
author | Oleksij Rempel <linux@rempel-privat.de> | 2013-12-12 18:30:36 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2013-12-19 00:23:02 +0400 |
commit | 1e51acaa02563ca96c0f3fa9827174cefde6093c (patch) | |
tree | 7890324554eee6d6f9e245fed398147bf664b2fd /drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | |
parent | 36c4e7e4aa0605cd175ee4b953eaced7a00157f4 (diff) | |
download | linux-1e51acaa02563ca96c0f3fa9827174cefde6093c.tar.xz |
ath9k_htc: reconfigure led_gpios after resume
On suspend/resume, firmware will restart and gpios
configuration will be reseted. Restore this
configureation at least for LEDs
Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/htc_drv_gpio.c')
-rw-r--r-- | drivers/net/wireless/ath/ath9k/htc_drv_gpio.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c index 105582d6b714..50f74a2a4cf8 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_gpio.c @@ -255,6 +255,17 @@ void ath9k_deinit_leds(struct ath9k_htc_priv *priv) cancel_work_sync(&priv->led_work); } + +void ath9k_configure_leds(struct ath9k_htc_priv *priv) +{ + /* Configure gpio 1 for output */ + ath9k_hw_cfg_output(priv->ah, priv->ah->led_pin, + AR_GPIO_OUTPUT_MUX_AS_OUTPUT); + /* LED off, active low */ + ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, 1); + +} + void ath9k_init_leds(struct ath9k_htc_priv *priv) { int ret; @@ -268,11 +279,7 @@ void ath9k_init_leds(struct ath9k_htc_priv *priv) else priv->ah->led_pin = ATH_LED_PIN_DEF; - /* Configure gpio 1 for output */ - ath9k_hw_cfg_output(priv->ah, priv->ah->led_pin, - AR_GPIO_OUTPUT_MUX_AS_OUTPUT); - /* LED off, active low */ - ath9k_hw_set_gpio(priv->ah, priv->ah->led_pin, 1); + ath9k_configure_leds(priv); snprintf(priv->led_name, sizeof(priv->led_name), "ath9k_htc-%s", wiphy_name(priv->hw->wiphy)); |