Lines Matching refs:func
45 struct sdio_func *func; member
65 ret = sdio_memcpy_fromio(bus->func, dst, sdio_addr, count); in wfx_sdio_copy_from_io()
86 ret = sdio_memcpy_toio(bus->func, sdio_addr, (void *)src, count); in wfx_sdio_copy_to_io()
97 sdio_claim_host(bus->func); in wfx_sdio_lock()
104 sdio_release_host(bus->func); in wfx_sdio_unlock()
107 static void wfx_sdio_irq_handler(struct sdio_func *func) in wfx_sdio_irq_handler() argument
109 struct wfx_sdio_priv *bus = sdio_get_drvdata(func); in wfx_sdio_irq_handler()
118 sdio_claim_host(bus->func); in wfx_sdio_irq_handler_ext()
120 sdio_release_host(bus->func); in wfx_sdio_irq_handler_ext()
132 sdio_claim_host(bus->func); in wfx_sdio_irq_subscribe()
133 ret = sdio_claim_irq(bus->func, wfx_sdio_irq_handler); in wfx_sdio_irq_subscribe()
134 sdio_release_host(bus->func); in wfx_sdio_irq_subscribe()
142 ret = devm_request_threaded_irq(&bus->func->dev, bus->of_irq, NULL, in wfx_sdio_irq_subscribe()
146 sdio_claim_host(bus->func); in wfx_sdio_irq_subscribe()
147 cccr = sdio_f0_readb(bus->func, SDIO_CCCR_IENx, NULL); in wfx_sdio_irq_subscribe()
149 cccr |= BIT(bus->func->num); in wfx_sdio_irq_subscribe()
150 sdio_f0_writeb(bus->func, cccr, SDIO_CCCR_IENx, NULL); in wfx_sdio_irq_subscribe()
151 sdio_release_host(bus->func); in wfx_sdio_irq_subscribe()
161 devm_free_irq(&bus->func->dev, bus->of_irq, bus); in wfx_sdio_irq_unsubscribe()
162 sdio_claim_host(bus->func); in wfx_sdio_irq_unsubscribe()
163 ret = sdio_release_irq(bus->func); in wfx_sdio_irq_unsubscribe()
164 sdio_release_host(bus->func); in wfx_sdio_irq_unsubscribe()
172 return sdio_align_size(bus->func, size); in wfx_sdio_align_size()
194 static int wfx_sdio_probe(struct sdio_func *func, const struct sdio_device_id *id) in wfx_sdio_probe() argument
196 const struct wfx_platform_data *pdata = of_device_get_match_data(&func->dev); in wfx_sdio_probe()
197 struct device_node *np = func->dev.of_node; in wfx_sdio_probe()
201 if (func->num != 1) { in wfx_sdio_probe()
202 …dev_err(&func->dev, "SDIO function number is %d while it should always be 1 (unsupported chip?)\n", in wfx_sdio_probe()
203 func->num); in wfx_sdio_probe()
208 dev_warn(&func->dev, "no compatible device found in DT\n"); in wfx_sdio_probe()
212 bus = devm_kzalloc(&func->dev, sizeof(*bus), GFP_KERNEL); in wfx_sdio_probe()
216 bus->func = func; in wfx_sdio_probe()
218 sdio_set_drvdata(func, bus); in wfx_sdio_probe()
220 sdio_claim_host(func); in wfx_sdio_probe()
221 ret = sdio_enable_func(func); in wfx_sdio_probe()
223 sdio_set_block_size(func, 64); in wfx_sdio_probe()
224 sdio_release_host(func); in wfx_sdio_probe()
228 bus->core = wfx_init_common(&func->dev, pdata, &wfx_sdio_hwbus_ops, bus); in wfx_sdio_probe()
241 sdio_claim_host(func); in wfx_sdio_probe()
242 sdio_disable_func(func); in wfx_sdio_probe()
243 sdio_release_host(func); in wfx_sdio_probe()
247 static void wfx_sdio_remove(struct sdio_func *func) in wfx_sdio_remove() argument
249 struct wfx_sdio_priv *bus = sdio_get_drvdata(func); in wfx_sdio_remove()
252 sdio_claim_host(func); in wfx_sdio_remove()
253 sdio_disable_func(func); in wfx_sdio_remove()
254 sdio_release_host(func); in wfx_sdio_remove()