Lines Matching full:func
59 static void wilc_sdio_interrupt(struct sdio_func *func) in wilc_sdio_interrupt() argument
61 sdio_release_host(func); in wilc_sdio_interrupt()
62 wilc_handle_isr(sdio_get_drvdata(func)); in wilc_sdio_interrupt()
63 sdio_claim_host(func); in wilc_sdio_interrupt()
68 struct sdio_func *func = container_of(wilc->dev, struct sdio_func, dev); in wilc_sdio_cmd52() local
72 sdio_claim_host(func); in wilc_sdio_cmd52()
74 func->num = cmd->function; in wilc_sdio_cmd52()
77 sdio_writeb(func, cmd->data, cmd->address, &ret); in wilc_sdio_cmd52()
78 data = sdio_readb(func, cmd->address, &ret); in wilc_sdio_cmd52()
81 sdio_writeb(func, cmd->data, cmd->address, &ret); in wilc_sdio_cmd52()
84 data = sdio_readb(func, cmd->address, &ret); in wilc_sdio_cmd52()
88 sdio_release_host(func); in wilc_sdio_cmd52()
91 dev_err(&func->dev, "%s..failed, err(%d)\n", __func__, ret); in wilc_sdio_cmd52()
97 struct sdio_func *func = container_of(wilc->dev, struct sdio_func, dev); in wilc_sdio_cmd53() local
102 sdio_claim_host(func); in wilc_sdio_cmd53()
104 func->num = cmd->function; in wilc_sdio_cmd53()
105 func->cur_blksize = cmd->block_size; in wilc_sdio_cmd53()
123 ret = sdio_memcpy_toio(func, cmd->address, buf, size); in wilc_sdio_cmd53()
125 ret = sdio_memcpy_fromio(func, buf, cmd->address, size); in wilc_sdio_cmd53()
131 sdio_release_host(func); in wilc_sdio_cmd53()
134 dev_err(&func->dev, "%s..failed, err(%d)\n", __func__, ret); in wilc_sdio_cmd53()
139 static int wilc_sdio_probe(struct sdio_func *func, in wilc_sdio_probe() argument
158 ret = wilc_cfg80211_init(&wilc, &func->dev, WILC_HIF_SDIO, in wilc_sdio_probe()
164 struct device_node *np = func->card->dev.of_node; in wilc_sdio_probe()
173 sdio_set_drvdata(func, wilc); in wilc_sdio_probe()
175 wilc->dev = &func->dev; in wilc_sdio_probe()
177 wilc->rtc_clk = devm_clk_get_optional_enabled(&func->card->dev, "rtc"); in wilc_sdio_probe()
200 dev_info(&func->dev, "Driver Initializing success\n"); in wilc_sdio_probe()
212 static void wilc_sdio_remove(struct sdio_func *func) in wilc_sdio_remove() argument
214 struct wilc *wilc = sdio_get_drvdata(func); in wilc_sdio_remove()
226 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_reset() local
235 dev_err(&func->dev, "Fail cmd 52, reset cmd ...\n"); in wilc_sdio_reset()
250 struct sdio_func *func = container_of(dev->dev, struct sdio_func, dev); in wilc_sdio_enable_interrupt() local
253 sdio_claim_host(func); in wilc_sdio_enable_interrupt()
254 ret = sdio_claim_irq(func, wilc_sdio_interrupt); in wilc_sdio_enable_interrupt()
255 sdio_release_host(func); in wilc_sdio_enable_interrupt()
258 dev_err(&func->dev, "can't claim sdio_irq, err(%d)\n", ret); in wilc_sdio_enable_interrupt()
266 struct sdio_func *func = container_of(dev->dev, struct sdio_func, dev); in wilc_sdio_disable_interrupt() local
269 sdio_claim_host(func); in wilc_sdio_disable_interrupt()
270 ret = sdio_release_irq(func); in wilc_sdio_disable_interrupt()
272 dev_err(&func->dev, "can't release sdio_irq, err(%d)\n", ret); in wilc_sdio_disable_interrupt()
273 sdio_release_host(func); in wilc_sdio_disable_interrupt()
284 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_set_func0_csa_address() local
298 dev_err(&func->dev, "Failed cmd52, set %04x data...\n", in wilc_sdio_set_func0_csa_address()
307 dev_err(&func->dev, "Failed cmd52, set %04x data...\n", in wilc_sdio_set_func0_csa_address()
316 dev_err(&func->dev, "Failed cmd52, set %04x data...\n", in wilc_sdio_set_func0_csa_address()
327 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_set_block_size() local
338 dev_err(&func->dev, "Failed cmd52, set %04x data...\n", in wilc_sdio_set_block_size()
347 dev_err(&func->dev, "Failed cmd52, set %04x data...\n", in wilc_sdio_set_block_size()
362 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_write_reg() local
378 dev_err(&func->dev, in wilc_sdio_write_reg()
401 dev_err(&func->dev, in wilc_sdio_write_reg()
410 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_write() local
419 * func 0 access in wilc_sdio_write()
425 * func 1 access in wilc_sdio_write()
449 dev_err(&func->dev, in wilc_sdio_write()
473 dev_err(&func->dev, in wilc_sdio_write()
484 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_read_reg() local
497 dev_err(&func->dev, in wilc_sdio_read_reg()
521 dev_err(&func->dev, in wilc_sdio_read_reg()
533 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_read() local
542 * func 0 access in wilc_sdio_read()
548 * func 1 access in wilc_sdio_read()
572 dev_err(&func->dev, in wilc_sdio_read()
596 dev_err(&func->dev, in wilc_sdio_read()
613 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_deinit() local
627 dev_err(&func->dev, "Failed to disable functions interrupts\n"); in wilc_sdio_deinit()
636 dev_err(&func->dev, in wilc_sdio_deinit()
646 dev_err(&func->dev, in wilc_sdio_deinit()
655 dev_err(&func->dev, in wilc_sdio_deinit()
666 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_init() local
682 dev_err(&func->dev, "Fail cmd 52, enable csa...\n"); in wilc_sdio_init()
691 dev_err(&func->dev, "Fail cmd 52, set func 0 block size...\n"); in wilc_sdio_init()
706 dev_err(&func->dev, in wilc_sdio_init()
712 * make sure func 1 is up in wilc_sdio_init()
723 dev_err(&func->dev, in wilc_sdio_init()
732 dev_err(&func->dev, "Fail func 1 is not ready...\n"); in wilc_sdio_init()
737 * func 1 is ready, set func 1 block size in wilc_sdio_init()
741 dev_err(&func->dev, "Fail set func 1 block size...\n"); in wilc_sdio_init()
746 * func 1 interrupt enable in wilc_sdio_init()
755 dev_err(&func->dev, "Fail cmd 52, set IEN register...\n"); in wilc_sdio_init()
765 dev_err(&func->dev, "Fail cmd read chip id...\n"); in wilc_sdio_init()
768 dev_err(&func->dev, "chipid (%08x)\n", chipid); in wilc_sdio_init()
802 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_read_int() local
828 dev_err(&func->dev, "Unexpected interrupt (1) int=%lx\n", in wilc_sdio_read_int()
838 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_clear_int_ext() local
866 dev_err(&func->dev, in wilc_sdio_clear_int_ext()
877 struct sdio_func *func = dev_to_sdio_func(wilc->dev); in wilc_sdio_sync_ext() local
881 dev_err(&func->dev, "Too many interrupts (%d)...\n", nint); in wilc_sdio_sync_ext()
894 dev_err(&func->dev, "Failed read reg (%08x)...\n", in wilc_sdio_sync_ext()
901 dev_err(&func->dev, "Failed write reg (%08x)...\n", in wilc_sdio_sync_ext()
911 dev_err(&func->dev, "Failed read reg (%08x)...\n", in wilc_sdio_sync_ext()
920 dev_err(&func->dev, "Failed write reg (%08x)...\n", in wilc_sdio_sync_ext()
927 dev_err(&func->dev, in wilc_sdio_sync_ext()
938 dev_err(&func->dev, in wilc_sdio_sync_ext()
970 struct sdio_func *func = dev_to_sdio_func(dev); in wilc_sdio_suspend() local
971 struct wilc *wilc = sdio_get_drvdata(func); in wilc_sdio_suspend()
988 dev_err(&func->dev, "Fail reset sdio\n"); in wilc_sdio_suspend()
997 struct sdio_func *func = dev_to_sdio_func(dev); in wilc_sdio_resume() local
998 struct wilc *wilc = sdio_get_drvdata(func); in wilc_sdio_resume()