Lines Matching refs:wl
48 static struct sdio_func *wl_to_func(struct wl1251 *wl) in wl_to_func() argument
50 struct wl1251_sdio *wl_sdio = wl->if_priv; in wl_to_func()
56 struct wl1251 *wl = sdio_get_drvdata(func); in wl1251_sdio_interrupt() local
61 ieee80211_queue_work(wl->hw, &wl->irq_work); in wl1251_sdio_interrupt()
71 static void wl1251_sdio_read(struct wl1251 *wl, int addr, in wl1251_sdio_read() argument
75 struct sdio_func *func = wl_to_func(wl); in wl1251_sdio_read()
84 static void wl1251_sdio_write(struct wl1251 *wl, int addr, in wl1251_sdio_write() argument
88 struct sdio_func *func = wl_to_func(wl); in wl1251_sdio_write()
97 static void wl1251_sdio_read_elp(struct wl1251 *wl, int addr, u32 *val) in wl1251_sdio_read_elp() argument
100 struct wl1251_sdio *wl_sdio = wl->if_priv; in wl1251_sdio_read_elp()
117 static void wl1251_sdio_write_elp(struct wl1251 *wl, int addr, u32 val) in wl1251_sdio_write_elp() argument
120 struct wl1251_sdio *wl_sdio = wl->if_priv; in wl1251_sdio_write_elp()
133 static void wl1251_sdio_reset(struct wl1251 *wl) in wl1251_sdio_reset() argument
137 static void wl1251_sdio_enable_irq(struct wl1251 *wl) in wl1251_sdio_enable_irq() argument
139 struct sdio_func *func = wl_to_func(wl); in wl1251_sdio_enable_irq()
146 static void wl1251_sdio_disable_irq(struct wl1251 *wl) in wl1251_sdio_disable_irq() argument
148 struct sdio_func *func = wl_to_func(wl); in wl1251_sdio_disable_irq()
158 struct wl1251 *wl = cookie; in wl1251_line_irq() local
160 ieee80211_queue_work(wl->hw, &wl->irq_work); in wl1251_line_irq()
165 static void wl1251_enable_line_irq(struct wl1251 *wl) in wl1251_enable_line_irq() argument
167 return enable_irq(wl->irq); in wl1251_enable_line_irq()
170 static void wl1251_disable_line_irq(struct wl1251 *wl) in wl1251_disable_line_irq() argument
172 return disable_irq(wl->irq); in wl1251_disable_line_irq()
175 static int wl1251_sdio_set_power(struct wl1251 *wl, bool enable) in wl1251_sdio_set_power() argument
177 struct sdio_func *func = wl_to_func(wl); in wl1251_sdio_set_power()
186 if (gpio_is_valid(wl->power_gpio)) in wl1251_sdio_set_power()
187 gpio_set_value(wl->power_gpio, true); in wl1251_sdio_set_power()
208 if (gpio_is_valid(wl->power_gpio)) in wl1251_sdio_set_power()
209 gpio_set_value(wl->power_gpio, false); in wl1251_sdio_set_power()
229 struct wl1251 *wl; in wl1251_sdio_probe() local
238 wl = hw->priv; in wl1251_sdio_probe()
256 wl->if_priv = wl_sdio; in wl1251_sdio_probe()
257 wl->if_ops = &wl1251_sdio_ops; in wl1251_sdio_probe()
261 wl->power_gpio = wl1251_board_data->power_gpio; in wl1251_sdio_probe()
262 wl->irq = wl1251_board_data->irq; in wl1251_sdio_probe()
263 wl->use_eeprom = wl1251_board_data->use_eeprom; in wl1251_sdio_probe()
266 if (gpio_is_valid(wl->power_gpio)) { in wl1251_sdio_probe()
267 ret = devm_gpio_request(&func->dev, wl->power_gpio, in wl1251_sdio_probe()
275 if (wl->irq) { in wl1251_sdio_probe()
276 irq_set_status_flags(wl->irq, IRQ_NOAUTOEN); in wl1251_sdio_probe()
277 ret = request_irq(wl->irq, wl1251_line_irq, 0, "wl1251", wl); in wl1251_sdio_probe()
283 irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING); in wl1251_sdio_probe()
296 ret = wl1251_init_ieee80211(wl); in wl1251_sdio_probe()
300 sdio_set_drvdata(func, wl); in wl1251_sdio_probe()
308 if (wl->irq) in wl1251_sdio_probe()
309 free_irq(wl->irq, wl); in wl1251_sdio_probe()
317 wl1251_free_hw(wl); in wl1251_sdio_probe()
323 struct wl1251 *wl = sdio_get_drvdata(func); in wl1251_sdio_remove() local
324 struct wl1251_sdio *wl_sdio = wl->if_priv; in wl1251_sdio_remove()
329 if (wl->irq) in wl1251_sdio_remove()
330 free_irq(wl->irq, wl); in wl1251_sdio_remove()
331 wl1251_free_hw(wl); in wl1251_sdio_remove()