Lines Matching refs:func
45 struct sdio_func *func = dev_to_sdio_func(glue->dev); in wl1271_sdio_set_block_size() local
47 sdio_claim_host(func); in wl1271_sdio_set_block_size()
48 sdio_set_block_size(func, blksz); in wl1271_sdio_set_block_size()
49 sdio_release_host(func); in wl1271_sdio_set_block_size()
57 struct sdio_func *func = dev_to_sdio_func(glue->dev); in wl12xx_sdio_raw_read() local
59 sdio_claim_host(func); in wl12xx_sdio_raw_read()
62 ((u8 *)buf)[0] = sdio_f0_readb(func, addr, &ret); in wl12xx_sdio_raw_read()
67 ret = sdio_readsb(func, buf, addr, len); in wl12xx_sdio_raw_read()
69 ret = sdio_memcpy_fromio(func, buf, addr, len); in wl12xx_sdio_raw_read()
75 sdio_release_host(func); in wl12xx_sdio_raw_read()
95 struct sdio_func *func = dev_to_sdio_func(glue->dev); in wl12xx_sdio_raw_write() local
97 sdio_claim_host(func); in wl12xx_sdio_raw_write()
107 sdio_f0_writeb(func, ((u8 *)buf)[0], addr, &ret); in wl12xx_sdio_raw_write()
115 ret = sdio_writesb(func, addr, buf, len); in wl12xx_sdio_raw_write()
117 ret = sdio_memcpy_toio(func, addr, buf, len); in wl12xx_sdio_raw_write()
120 sdio_release_host(func); in wl12xx_sdio_raw_write()
131 struct sdio_func *func = dev_to_sdio_func(glue->dev); in wl12xx_sdio_power_on() local
132 struct mmc_card *card = func->card; in wl12xx_sdio_power_on()
142 sdio_claim_host(func); in wl12xx_sdio_power_on()
149 sdio_enable_func(func); in wl12xx_sdio_power_on()
150 sdio_release_host(func); in wl12xx_sdio_power_on()
157 struct sdio_func *func = dev_to_sdio_func(glue->dev); in wl12xx_sdio_power_off() local
158 struct mmc_card *card = func->card; in wl12xx_sdio_power_off()
160 sdio_claim_host(func); in wl12xx_sdio_power_off()
161 sdio_disable_func(func); in wl12xx_sdio_power_off()
162 sdio_release_host(func); in wl12xx_sdio_power_off()
255 static int wl1271_probe(struct sdio_func *func, in wl1271_probe() argument
267 if (func->num != 0x02) in wl1271_probe()
270 pdev_data = devm_kzalloc(&func->dev, sizeof(*pdev_data), GFP_KERNEL); in wl1271_probe()
276 glue = devm_kzalloc(&func->dev, sizeof(*glue), GFP_KERNEL); in wl1271_probe()
280 glue->dev = &func->dev; in wl1271_probe()
283 func->card->quirks |= MMC_QUIRK_LENIENT_FN0; in wl1271_probe()
286 func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; in wl1271_probe()
288 ret = wlcore_probe_of(&func->dev, &irq, &wakeirq, pdev_data); in wl1271_probe()
293 mmcflags = sdio_get_host_pm_caps(func); in wl1271_probe()
299 sdio_set_drvdata(func, glue); in wl1271_probe()
302 pm_runtime_put_noidle(&func->dev); in wl1271_probe()
310 if (func->card->cccr.sdio_vsn == SDIO_SDIO_REV_3_00) in wl1271_probe()
322 glue->core->dev.parent = &func->dev; in wl1271_probe()
363 static void wl1271_remove(struct sdio_func *func) in wl1271_remove() argument
365 struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func); in wl1271_remove()
368 pm_runtime_get_noresume(&func->dev); in wl1271_remove()
378 struct sdio_func *func = dev_to_sdio_func(dev); in wl1271_suspend() local
379 struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func); in wl1271_suspend()
394 sdio_flags = sdio_get_host_pm_caps(func); in wl1271_suspend()
404 ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); in wl1271_suspend()