• Home
  • Raw
  • Download

Lines Matching refs:wl

41 	struct wl1251 *wl;  in wl1251_irq()  local
45 wl = cookie; in wl1251_irq()
47 ieee80211_queue_work(wl->hw, &wl->irq_work); in wl1251_irq()
52 static struct spi_device *wl_to_spi(struct wl1251 *wl) in wl_to_spi() argument
54 return wl->if_priv; in wl_to_spi()
57 static void wl1251_spi_reset(struct wl1251 *wl) in wl1251_spi_reset() argument
78 spi_sync(wl_to_spi(wl), &m); in wl1251_spi_reset()
85 static void wl1251_spi_wake(struct wl1251 *wl) in wl1251_spi_wake() argument
130 spi_sync(wl_to_spi(wl), &m); in wl1251_spi_wake()
137 static void wl1251_spi_reset_wake(struct wl1251 *wl) in wl1251_spi_reset_wake() argument
139 wl1251_spi_reset(wl); in wl1251_spi_reset_wake()
140 wl1251_spi_wake(wl); in wl1251_spi_reset_wake()
143 static void wl1251_spi_read(struct wl1251 *wl, int addr, void *buf, in wl1251_spi_read() argument
151 cmd = &wl->buffer_cmd; in wl1251_spi_read()
152 busy_buf = wl->buffer_busyword; in wl1251_spi_read()
175 spi_sync(wl_to_spi(wl), &m); in wl1251_spi_read()
183 static void wl1251_spi_write(struct wl1251 *wl, int addr, void *buf, in wl1251_spi_write() argument
190 cmd = &wl->buffer_cmd; in wl1251_spi_write()
208 spi_sync(wl_to_spi(wl), &m); in wl1251_spi_write()
214 static void wl1251_spi_enable_irq(struct wl1251 *wl) in wl1251_spi_enable_irq() argument
216 return enable_irq(wl->irq); in wl1251_spi_enable_irq()
219 static void wl1251_spi_disable_irq(struct wl1251 *wl) in wl1251_spi_disable_irq() argument
221 return disable_irq(wl->irq); in wl1251_spi_disable_irq()
224 static int wl1251_spi_set_power(struct wl1251 *wl, bool enable) in wl1251_spi_set_power() argument
226 if (gpio_is_valid(wl->power_gpio)) in wl1251_spi_set_power()
227 gpio_set_value(wl->power_gpio, enable); in wl1251_spi_set_power()
246 struct wl1251 *wl; in wl1251_spi_probe() local
258 wl = hw->priv; in wl1251_spi_probe()
261 spi_set_drvdata(spi, wl); in wl1251_spi_probe()
262 wl->if_priv = spi; in wl1251_spi_probe()
263 wl->if_ops = &wl1251_spi_ops; in wl1251_spi_probe()
277 wl->use_eeprom = of_property_read_bool(np, "ti,wl1251-has-eeprom"); in wl1251_spi_probe()
278 wl->power_gpio = of_get_named_gpio(np, "ti,power-gpio", 0); in wl1251_spi_probe()
280 wl->power_gpio = pdata->power_gpio; in wl1251_spi_probe()
281 wl->use_eeprom = pdata->use_eeprom; in wl1251_spi_probe()
284 if (wl->power_gpio == -EPROBE_DEFER) { in wl1251_spi_probe()
289 if (gpio_is_valid(wl->power_gpio)) { in wl1251_spi_probe()
290 ret = devm_gpio_request_one(&spi->dev, wl->power_gpio, in wl1251_spi_probe()
302 wl->irq = spi->irq; in wl1251_spi_probe()
303 if (wl->irq < 0) { in wl1251_spi_probe()
309 irq_set_status_flags(wl->irq, IRQ_NOAUTOEN); in wl1251_spi_probe()
310 ret = devm_request_irq(&spi->dev, wl->irq, wl1251_irq, 0, in wl1251_spi_probe()
311 DRIVER_NAME, wl); in wl1251_spi_probe()
317 irq_set_irq_type(wl->irq, IRQ_TYPE_EDGE_RISING); in wl1251_spi_probe()
319 wl->vio = devm_regulator_get(&spi->dev, "vio"); in wl1251_spi_probe()
320 if (IS_ERR(wl->vio)) { in wl1251_spi_probe()
321 ret = PTR_ERR(wl->vio); in wl1251_spi_probe()
326 ret = regulator_enable(wl->vio); in wl1251_spi_probe()
330 ret = wl1251_init_ieee80211(wl); in wl1251_spi_probe()
337 regulator_disable(wl->vio); in wl1251_spi_probe()
346 struct wl1251 *wl = spi_get_drvdata(spi); in wl1251_spi_remove() local
348 wl1251_free_hw(wl); in wl1251_spi_remove()
349 regulator_disable(wl->vio); in wl1251_spi_remove()