Lines Matching refs:wl
27 struct wl1251 *wl; in wl1251_irq() local
31 wl = cookie; in wl1251_irq()
33 ieee80211_queue_work(wl->hw, &wl->irq_work); in wl1251_irq()
38 static struct spi_device *wl_to_spi(struct wl1251 *wl) in wl_to_spi() argument
40 return wl->if_priv; in wl_to_spi()
43 static void wl1251_spi_reset(struct wl1251 *wl) in wl1251_spi_reset() argument
64 spi_sync(wl_to_spi(wl), &m); in wl1251_spi_reset()
71 static void wl1251_spi_wake(struct wl1251 *wl) in wl1251_spi_wake() argument
116 spi_sync(wl_to_spi(wl), &m); in wl1251_spi_wake()
123 static void wl1251_spi_reset_wake(struct wl1251 *wl) in wl1251_spi_reset_wake() argument
125 wl1251_spi_reset(wl); in wl1251_spi_reset_wake()
126 wl1251_spi_wake(wl); in wl1251_spi_reset_wake()
129 static void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf, in wl1251_spi_read() argument
137 cmd = &wl->buffer_cmd; in wl1251_spi_read()
138 busy_buf = wl->buffer_busyword; in wl1251_spi_read()
161 spi_sync(wl_to_spi(wl), &m); in wl1251_spi_read()
169 static void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf, in wl1251_spi_write() argument
176 cmd = &wl->buffer_cmd; in wl1251_spi_write()
194 spi_sync(wl_to_spi(wl), &m); in wl1251_spi_write()
200 static void wl1251_spi_enable_irq(struct wl1251 *wl) in wl1251_spi_enable_irq() argument
202 return enable_irq(wl->irq); in wl1251_spi_enable_irq()
205 static void wl1251_spi_disable_irq(struct wl1251 *wl) in wl1251_spi_disable_irq() argument
207 return disable_irq(wl->irq); in wl1251_spi_disable_irq()
210 static int wl1251_spi_set_power(struct wl1251 *wl, bool enable) in wl1251_spi_set_power() argument
212 if (gpio_is_valid(wl->power_gpio)) in wl1251_spi_set_power()
213 gpio_set_value(wl->power_gpio, enable); in wl1251_spi_set_power()
232 struct wl1251 *wl; in wl1251_spi_probe() local
244 wl = hw->priv; in wl1251_spi_probe()
247 spi_set_drvdata(spi, wl); in wl1251_spi_probe()
248 wl->if_priv = spi; in wl1251_spi_probe()
249 wl->if_ops = &wl1251_spi_ops; in wl1251_spi_probe()
263 wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom"); in wl1251_spi_probe()
264 wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0); in wl1251_spi_probe()
266 wl->power_gpio = pdata->power_gpio; in wl1251_spi_probe()
267 wl->use_eeprom = pdata->use_eeprom; in wl1251_spi_probe()
270 if (wl->power_gpio == -EPROBE_DEFER) { in wl1251_spi_probe()
275 if (gpio_is_valid(wl->power_gpio)) { in wl1251_spi_probe()
276 ret = devm_gpio_request_one(&spi->dev, wl->power_gpio, in wl1251_spi_probe()
288 wl->irq = spi->irq; in wl1251_spi_probe()
289 if (wl->irq < 0) { in wl1251_spi_probe()
295 irq_set_status_flags(wl->irq, IRQ_NOAUTOEN); in wl1251_spi_probe()
296 ret = devm_request_irq(&spi->dev, wl->irq, wl1251_irq, 0, in wl1251_spi_probe()
297 DRIVER_NAME, wl); in wl1251_spi_probe()
303 irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING); in wl1251_spi_probe()
305 wl->vio = devm_regulator_get(&spi->dev, "vio"); in wl1251_spi_probe()
306 if (IS_ERR(wl->vio)) { in wl1251_spi_probe()
307 ret = PTR_ERR(wl->vio); in wl1251_spi_probe()
312 ret = regulator_enable(wl->vio); in wl1251_spi_probe()
316 ret = wl1251_init_ieee80211(wl); in wl1251_spi_probe()
323 regulator_disable(wl->vio); in wl1251_spi_probe()
332 struct wl1251 *wl = spi_get_drvdata(spi); in wl1251_spi_remove() local
334 wl1251_free_hw(wl); in wl1251_spi_remove()
335 regulator_disable(wl->vio); in wl1251_spi_remove()