static bool ath5k_is_rfkill_set(struct ath5k_softc *sc) { /* configuring GPIO for input for some reason disables rfkill */ /*ath5k_hw_set_gpio_input(sc->ah, sc->rf_kill.gpio);*/ return ath5k_hw_get_gpio(sc->ah, sc->rf_kill.gpio) == sc->rf_kill.polarity; }
static bool ath5k_is_rfkill_set(struct ath5k_softc *sc) { return ath5k_hw_get_gpio(sc->ah, sc->rf_kill.gpio) == sc->rf_kill.polarity; }
static inline void ath5k_rfkill_set_intr(struct ath5k_hw *ah, bool enable) { u32 curval; ath5k_hw_set_gpio_input(ah, ah->rf_kill.gpio); curval = ath5k_hw_get_gpio(ah, ah->rf_kill.gpio); ath5k_hw_set_gpio_intr(ah, ah->rf_kill.gpio, enable ? !!curval : !curval); }
static inline void ath5k_rfkill_set_intr(struct ath5k_softc *sc, bool enable) { struct ath5k_hw *ah = sc->ah; u32 curval; ath5k_hw_set_gpio_input(ah, sc->rf_kill.gpio); curval = ath5k_hw_get_gpio(ah, sc->rf_kill.gpio); ath5k_hw_set_gpio_intr(ah, sc->rf_kill.gpio, enable ? !!curval : !curval); }