diff options
author | Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> | 2010-03-18 12:26:27 +0200 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-03-23 16:50:18 -0400 |
commit | becd551cac0d6868819083c59fc32d1072ba1804 (patch) | |
tree | f99edc958ed4ca4553d6c3d7fb8d80ea7f572398 /drivers/net/wireless/wl12xx/wl1271_io.h | |
parent | b43316dbf9c6b01f3ac6dc23bcb94ae66eb3a721 (diff) |
wl1271: Cleaned up wlan power on/off functions
Added method for wlan power control to io_ops struct and moved
wl1271_power_on and wl1271_power_off functions to wl1271_io.h.
Signed-off-by: Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com>
Reviewed-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Juuso Oikarinen <juuso.oikarinen@nokia.com>
Signed-off-by: Luciano Coelho <luciano.coelho@nokia.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/wl1271_io.h')
-rw-r--r-- | drivers/net/wireless/wl12xx/wl1271_io.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/wl12xx/wl1271_io.h b/drivers/net/wireless/wl12xx/wl1271_io.h index 95d2168f8af..3ff88d97130 100644 --- a/drivers/net/wireless/wl12xx/wl1271_io.h +++ b/drivers/net/wireless/wl12xx/wl1271_io.h @@ -138,6 +138,18 @@ static inline void wl1271_write32(struct wl1271 *wl, int addr, u32 val) wl1271_raw_write32(wl, wl1271_translate_addr(wl, addr), val); } +static inline void wl1271_power_off(struct wl1271 *wl) +{ + wl->if_ops->power(wl, false); + clear_bit(WL1271_FLAG_GPIO_POWER, &wl->flags); +} + +static inline void wl1271_power_on(struct wl1271 *wl) +{ + wl->if_ops->power(wl, true); + set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags); +} + /* Top Register IO */ void wl1271_top_reg_write(struct wl1271 *wl, int addr, u16 val); |