Lines Matching +full:1 +full:- +full:sdxc

1 // SPDX-License-Identifier: GPL-2.0-only
36 switch (card->type) { in type_show()
46 return -EFAULT; in type_show()
65 switch (card->type) { in mmc_bus_uevent()
90 card->cis.vendor, card->cis.device); in mmc_bus_uevent()
95 card->major_rev, card->minor_rev); in mmc_bus_uevent()
99 for (i = 0; i < card->num_info; i++) { in mmc_bus_uevent()
100 retval = add_uevent_var(env, "SDIO_INFO%u=%s", i+1, card->info[i]); in mmc_bus_uevent()
107 * SDIO (non-combo) cards are not handled by mmc_block driver and do not in mmc_bus_uevent()
128 struct mmc_driver *drv = to_mmc_driver(dev->driver); in mmc_bus_probe()
131 return drv->probe(card); in mmc_bus_probe()
136 struct mmc_driver *drv = to_mmc_driver(dev->driver); in mmc_bus_remove()
139 drv->remove(card); in mmc_bus_remove()
144 struct mmc_driver *drv = to_mmc_driver(dev->driver); in mmc_bus_shutdown()
146 struct mmc_host *host = card->host; in mmc_bus_shutdown()
149 if (dev->driver && drv->shutdown) in mmc_bus_shutdown()
150 drv->shutdown(card); in mmc_bus_shutdown()
152 if (host->bus_ops->shutdown) { in mmc_bus_shutdown()
153 ret = host->bus_ops->shutdown(host); in mmc_bus_shutdown()
164 struct mmc_host *host = card->host; in mmc_bus_suspend()
171 ret = host->bus_ops->suspend(host); in mmc_bus_suspend()
181 struct mmc_host *host = card->host; in mmc_bus_resume()
184 ret = host->bus_ops->resume(host); in mmc_bus_resume()
198 struct mmc_host *host = card->host; in mmc_runtime_suspend()
200 return host->bus_ops->runtime_suspend(host); in mmc_runtime_suspend()
206 struct mmc_host *host = card->host; in mmc_runtime_resume()
208 return host->bus_ops->runtime_resume(host); in mmc_runtime_resume()
238 * mmc_register_driver - register a media driver
243 drv->drv.bus = &mmc_bus_type; in mmc_register_driver()
244 return driver_register(&drv->drv); in mmc_register_driver()
250 * mmc_unregister_driver - unregister a media driver
255 drv->drv.bus = &mmc_bus_type; in mmc_unregister_driver()
256 driver_unregister(&drv->drv); in mmc_unregister_driver()
267 kfree(card->info); in mmc_release_card()
281 return ERR_PTR(-ENOMEM); in mmc_alloc_card()
283 card->host = host; in mmc_alloc_card()
285 device_initialize(&card->dev); in mmc_alloc_card()
287 card->dev.parent = mmc_classdev(host); in mmc_alloc_card()
288 card->dev.bus = &mmc_bus_type; in mmc_alloc_card()
289 card->dev.release = mmc_release_card; in mmc_alloc_card()
290 card->dev.type = type; in mmc_alloc_card()
312 dev_set_name(&card->dev, "%s:%04x", mmc_hostname(card->host), card->rca); in mmc_add_card()
313 dev_set_removable(&card->dev, in mmc_add_card()
314 mmc_card_is_removable(card->host) ? in mmc_add_card()
317 switch (card->type) { in mmc_add_card()
325 type = "SDXC"; in mmc_add_card()
334 type = "SD-combo"; in mmc_add_card()
336 type = "SDHC-combo"; in mmc_add_card()
344 (card->sd_bus_speed < ARRAY_SIZE(uhs_speeds))) in mmc_add_card()
345 uhs_bus_speed_mode = uhs_speeds[card->sd_bus_speed]; in mmc_add_card()
347 if (mmc_host_is_spi(card->host)) { in mmc_add_card()
349 mmc_hostname(card->host), in mmc_add_card()
355 mmc_hostname(card->host), in mmc_add_card()
362 uhs_bus_speed_mode, type, card->rca); in mmc_add_card()
366 card->dev.of_node = mmc_of_find_child_device(card->host, 0); in mmc_add_card()
368 device_enable_async_suspend(&card->dev); in mmc_add_card()
370 ret = device_add(&card->dev); in mmc_add_card()
385 struct mmc_host *host = card->host; in mmc_remove_card()
390 if (mmc_host_is_spi(card->host)) { in mmc_remove_card()
392 mmc_hostname(card->host)); in mmc_remove_card()
395 mmc_hostname(card->host), card->rca); in mmc_remove_card()
397 device_del(&card->dev); in mmc_remove_card()
398 of_node_put(card->dev.of_node); in mmc_remove_card()
401 if (host->cqe_enabled) { in mmc_remove_card()
402 host->cqe_ops->cqe_disable(host); in mmc_remove_card()
403 host->cqe_enabled = false; in mmc_remove_card()
406 put_device(&card->dev); in mmc_remove_card()