diff options
author | Teemu Paasikivi <ext-teemu.3.paasikivi@nokia.com> | 2010-03-18 06:26:27 -0400 |
---|---|---|
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 95d2168f8af4..3ff88d971308 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) | |||
138 | wl1271_raw_write32(wl, wl1271_translate_addr(wl, addr), val); | 138 | wl1271_raw_write32(wl, wl1271_translate_addr(wl, addr), val); |
139 | } | 139 | } |
140 | 140 | ||
141 | static inline void wl1271_power_off(struct wl1271 *wl) | ||
142 | { | ||
143 | wl->if_ops->power(wl, false); | ||
144 | clear_bit(WL1271_FLAG_GPIO_POWER, &wl->flags); | ||
145 | } | ||
146 | |||
147 | static inline void wl1271_power_on(struct wl1271 *wl) | ||
148 | { | ||
149 | wl->if_ops->power(wl, true); | ||
150 | set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags); | ||
151 | } | ||
152 | |||
141 | 153 | ||
142 | /* Top Register IO */ | 154 | /* Top Register IO */ |
143 | void wl1271_top_reg_write(struct wl1271 *wl, int addr, u16 val); | 155 | void wl1271_top_reg_write(struct wl1271 *wl, int addr, u16 val); |