Lines Matching refs:func
46 struct sdio_func *func = dev_to_sdio_func(glue->dev); in wl1271_sdio_set_block_size() local
48 sdio_claim_host(func); in wl1271_sdio_set_block_size()
49 sdio_set_block_size(func, blksz); in wl1271_sdio_set_block_size()
50 sdio_release_host(func); in wl1271_sdio_set_block_size()
58 struct sdio_func *func = dev_to_sdio_func(glue->dev); in wl12xx_sdio_raw_read() local
60 sdio_claim_host(func); in wl12xx_sdio_raw_read()
63 ((u8 *)buf)[0] = sdio_f0_readb(func, addr, &ret); in wl12xx_sdio_raw_read()
68 ret = sdio_readsb(func, buf, addr, len); in wl12xx_sdio_raw_read()
70 ret = sdio_memcpy_fromio(func, buf, addr, len); in wl12xx_sdio_raw_read()
76 sdio_release_host(func); in wl12xx_sdio_raw_read()
96 struct sdio_func *func = dev_to_sdio_func(glue->dev); in wl12xx_sdio_raw_write() local
98 sdio_claim_host(func); in wl12xx_sdio_raw_write()
108 sdio_f0_writeb(func, ((u8 *)buf)[0], addr, &ret); in wl12xx_sdio_raw_write()
116 ret = sdio_writesb(func, addr, buf, len); in wl12xx_sdio_raw_write()
118 ret = sdio_memcpy_toio(func, addr, buf, len); in wl12xx_sdio_raw_write()
121 sdio_release_host(func); in wl12xx_sdio_raw_write()
132 struct sdio_func *func = dev_to_sdio_func(glue->dev); in wl12xx_sdio_power_on() local
133 struct mmc_card *card = func->card; in wl12xx_sdio_power_on()
144 sdio_claim_host(func); in wl12xx_sdio_power_on()
151 sdio_enable_func(func); in wl12xx_sdio_power_on()
152 sdio_release_host(func); in wl12xx_sdio_power_on()
159 struct sdio_func *func = dev_to_sdio_func(glue->dev); in wl12xx_sdio_power_off() local
160 struct mmc_card *card = func->card; in wl12xx_sdio_power_off()
162 sdio_claim_host(func); in wl12xx_sdio_power_off()
163 sdio_disable_func(func); in wl12xx_sdio_power_off()
164 sdio_release_host(func); in wl12xx_sdio_power_off()
257 static int wl1271_probe(struct sdio_func *func, in wl1271_probe() argument
269 if (func->num != 0x02) in wl1271_probe()
272 pdev_data = devm_kzalloc(&func->dev, sizeof(*pdev_data), GFP_KERNEL); in wl1271_probe()
278 glue = devm_kzalloc(&func->dev, sizeof(*glue), GFP_KERNEL); in wl1271_probe()
282 glue->dev = &func->dev; in wl1271_probe()
285 func->card->quirks |= MMC_QUIRK_LENIENT_FN0; in wl1271_probe()
288 func->card->quirks |= MMC_QUIRK_BLKSZ_FOR_BYTE_MODE; in wl1271_probe()
290 ret = wlcore_probe_of(&func->dev, &irq, &wakeirq, pdev_data); in wl1271_probe()
295 mmcflags = sdio_get_host_pm_caps(func); in wl1271_probe()
301 sdio_set_drvdata(func, glue); in wl1271_probe()
304 pm_runtime_put_noidle(&func->dev); in wl1271_probe()
312 if (func->card->cccr.sdio_vsn == SDIO_SDIO_REV_3_00) in wl1271_probe()
324 glue->core->dev.parent = &func->dev; in wl1271_probe()
370 static void wl1271_remove(struct sdio_func *func) in wl1271_remove() argument
372 struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func); in wl1271_remove()
375 pm_runtime_get_noresume(&func->dev); in wl1271_remove()
385 struct sdio_func *func = dev_to_sdio_func(dev); in wl1271_suspend() local
386 struct wl12xx_sdio_glue *glue = sdio_get_drvdata(func); in wl1271_suspend()
401 sdio_flags = sdio_get_host_pm_caps(func); in wl1271_suspend()
411 ret = sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER); in wl1271_suspend()