Lines Matching refs:ah

39 static inline void ath5k_rfkill_disable(struct ath5k_hw *ah)  in ath5k_rfkill_disable()  argument
41 ATH5K_DBG(ah, ATH5K_DEBUG_ANY, "rfkill disable (gpio:%d polarity:%d)\n", in ath5k_rfkill_disable()
42 ah->rf_kill.gpio, ah->rf_kill.polarity); in ath5k_rfkill_disable()
43 ath5k_hw_set_gpio_output(ah, ah->rf_kill.gpio); in ath5k_rfkill_disable()
44 ath5k_hw_set_gpio(ah, ah->rf_kill.gpio, !ah->rf_kill.polarity); in ath5k_rfkill_disable()
48 static inline void ath5k_rfkill_enable(struct ath5k_hw *ah) in ath5k_rfkill_enable() argument
50 ATH5K_DBG(ah, ATH5K_DEBUG_ANY, "rfkill enable (gpio:%d polarity:%d)\n", in ath5k_rfkill_enable()
51 ah->rf_kill.gpio, ah->rf_kill.polarity); in ath5k_rfkill_enable()
52 ath5k_hw_set_gpio_output(ah, ah->rf_kill.gpio); in ath5k_rfkill_enable()
53 ath5k_hw_set_gpio(ah, ah->rf_kill.gpio, ah->rf_kill.polarity); in ath5k_rfkill_enable()
56 static inline void ath5k_rfkill_set_intr(struct ath5k_hw *ah, bool enable) in ath5k_rfkill_set_intr() argument
60 ath5k_hw_set_gpio_input(ah, ah->rf_kill.gpio); in ath5k_rfkill_set_intr()
61 curval = ath5k_hw_get_gpio(ah, ah->rf_kill.gpio); in ath5k_rfkill_set_intr()
62 ath5k_hw_set_gpio_intr(ah, ah->rf_kill.gpio, enable ? in ath5k_rfkill_set_intr()
67 ath5k_is_rfkill_set(struct ath5k_hw *ah) in ath5k_is_rfkill_set() argument
71 return ath5k_hw_get_gpio(ah, ah->rf_kill.gpio) == in ath5k_is_rfkill_set()
72 ah->rf_kill.polarity; in ath5k_is_rfkill_set()
78 struct ath5k_hw *ah = from_tasklet(ah, t, rf_kill.toggleq); in ath5k_tasklet_rfkill_toggle() local
81 blocked = ath5k_is_rfkill_set(ah); in ath5k_tasklet_rfkill_toggle()
82 wiphy_rfkill_set_hw_state(ah->hw->wiphy, blocked); in ath5k_tasklet_rfkill_toggle()
87 ath5k_rfkill_hw_start(struct ath5k_hw *ah) in ath5k_rfkill_hw_start() argument
90 ah->rf_kill.gpio = ah->ah_capabilities.cap_eeprom.ee_rfkill_pin; in ath5k_rfkill_hw_start()
91 ah->rf_kill.polarity = ah->ah_capabilities.cap_eeprom.ee_rfkill_pol; in ath5k_rfkill_hw_start()
93 tasklet_setup(&ah->rf_kill.toggleq, ath5k_tasklet_rfkill_toggle); in ath5k_rfkill_hw_start()
95 ath5k_rfkill_disable(ah); in ath5k_rfkill_hw_start()
98 if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) in ath5k_rfkill_hw_start()
99 ath5k_rfkill_set_intr(ah, true); in ath5k_rfkill_hw_start()
104 ath5k_rfkill_hw_stop(struct ath5k_hw *ah) in ath5k_rfkill_hw_stop() argument
107 if (AR5K_EEPROM_HDR_RFKILL(ah->ah_capabilities.cap_eeprom.ee_header)) in ath5k_rfkill_hw_stop()
108 ath5k_rfkill_set_intr(ah, false); in ath5k_rfkill_hw_stop()
110 tasklet_kill(&ah->rf_kill.toggleq); in ath5k_rfkill_hw_stop()
113 ath5k_rfkill_enable(ah); in ath5k_rfkill_hw_stop()