Lines Matching full:func

46 	struct sdio_func *func;  member
66 ret = sdio_memcpy_fromio(bus->func, dst, sdio_addr, count); in wfx_sdio_copy_from_io()
87 ret = sdio_memcpy_toio(bus->func, sdio_addr, (void *)src, count); in wfx_sdio_copy_to_io()
98 sdio_claim_host(bus->func); in wfx_sdio_lock()
105 sdio_release_host(bus->func); in wfx_sdio_unlock()
108 static void wfx_sdio_irq_handler(struct sdio_func *func) in wfx_sdio_irq_handler() argument
110 struct wfx_sdio_priv *bus = sdio_get_drvdata(func); in wfx_sdio_irq_handler()
119 sdio_claim_host(bus->func); in wfx_sdio_irq_handler_ext()
121 sdio_release_host(bus->func); in wfx_sdio_irq_handler_ext()
133 sdio_claim_host(bus->func); in wfx_sdio_irq_subscribe()
134 ret = sdio_claim_irq(bus->func, wfx_sdio_irq_handler); in wfx_sdio_irq_subscribe()
135 sdio_release_host(bus->func); in wfx_sdio_irq_subscribe()
143 ret = devm_request_threaded_irq(&bus->func->dev, bus->of_irq, NULL, in wfx_sdio_irq_subscribe()
147 sdio_claim_host(bus->func); in wfx_sdio_irq_subscribe()
148 cccr = sdio_f0_readb(bus->func, SDIO_CCCR_IENx, NULL); in wfx_sdio_irq_subscribe()
150 cccr |= BIT(bus->func->num); in wfx_sdio_irq_subscribe()
151 sdio_f0_writeb(bus->func, cccr, SDIO_CCCR_IENx, NULL); in wfx_sdio_irq_subscribe()
152 sdio_release_host(bus->func); in wfx_sdio_irq_subscribe()
162 devm_free_irq(&bus->func->dev, bus->of_irq, bus); in wfx_sdio_irq_unsubscribe()
163 sdio_claim_host(bus->func); in wfx_sdio_irq_unsubscribe()
164 ret = sdio_release_irq(bus->func); in wfx_sdio_irq_unsubscribe()
165 sdio_release_host(bus->func); in wfx_sdio_irq_unsubscribe()
173 return sdio_align_size(bus->func, size); in wfx_sdio_align_size()
180 device_set_wakeup_enable(&bus->func->dev, enabled); in wfx_sdio_set_wakeup()
205 struct sdio_func *func = dev_to_sdio_func(dev); in wfx_sdio_suspend() local
206 struct wfx_sdio_priv *bus = sdio_get_drvdata(func); in wfx_sdio_suspend()
221 ret = sdio_set_host_pm_flags(func, MMC_PM_WAKE_SDIO_IRQ); in wfx_sdio_suspend()
225 return sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); in wfx_sdio_suspend()
230 struct sdio_func *func = dev_to_sdio_func(dev); in wfx_sdio_resume() local
231 struct wfx_sdio_priv *bus = sdio_get_drvdata(func); in wfx_sdio_resume()
241 static int wfx_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) in wfx_sdio_probe() argument
243 const struct wfx_platform_data *pdata = of_device_get_match_data(&func->dev); in wfx_sdio_probe()
244 mmc_pm_flag_t pm_flag = sdio_get_host_pm_caps(func); in wfx_sdio_probe()
245 struct device_node *np = func->dev.of_node; in wfx_sdio_probe()
249 if (func->num != 1) { in wfx_sdio_probe()
250 …dev_err(&func->dev, "SDIO function number is %d while it should always be 1 (unsupported chip?)\n", in wfx_sdio_probe()
251 func->num); in wfx_sdio_probe()
256 dev_warn(&func->dev, "no compatible device found in DT\n"); in wfx_sdio_probe()
260 bus = devm_kzalloc(&func->dev, sizeof(*bus), GFP_KERNEL); in wfx_sdio_probe()
264 bus->func = func; in wfx_sdio_probe()
266 sdio_set_drvdata(func, bus); in wfx_sdio_probe()
268 sdio_claim_host(func); in wfx_sdio_probe()
269 ret = sdio_enable_func(func); in wfx_sdio_probe()
271 sdio_set_block_size(func, 64); in wfx_sdio_probe()
272 sdio_release_host(func); in wfx_sdio_probe()
276 bus->core = wfx_init_common(&func->dev, pdata, &wfx_sdio_hwbus_ops, bus); in wfx_sdio_probe()
287 device_set_wakeup_capable(&func->dev, true); in wfx_sdio_probe()
292 sdio_claim_host(func); in wfx_sdio_probe()
293 sdio_disable_func(func); in wfx_sdio_probe()
294 sdio_release_host(func); in wfx_sdio_probe()
298 static void wfx_sdio_remove(struct sdio_func *func) in wfx_sdio_remove() argument
300 struct wfx_sdio_priv *bus = sdio_get_drvdata(func); in wfx_sdio_remove()
303 sdio_claim_host(func); in wfx_sdio_remove()
304 sdio_disable_func(func); in wfx_sdio_remove()
305 sdio_release_host(func); in wfx_sdio_remove()