14 #include <linux/export.h>
15 #include <linux/device.h>
17 #include <linux/slab.h>
18 #include <linux/stat.h>
28 #define to_mmc_driver(d) container_of(d, struct mmc_driver, drv)
43 return sprintf(buf,
"SDcombo\n");
107 static int mmc_bus_probe(
struct device *dev)
112 return drv->
probe(card);
115 static int mmc_bus_remove(
struct device *dev)
125 #ifdef CONFIG_PM_SLEEP
126 static int mmc_bus_suspend(
struct device *dev)
137 static int mmc_bus_resume(
struct device *dev)
149 #ifdef CONFIG_PM_RUNTIME
151 static int mmc_runtime_suspend(
struct device *dev)
158 static int mmc_runtime_resume(
struct device *dev)
165 static int mmc_runtime_idle(
struct device *dev)
167 return pm_runtime_suspend(dev);
172 static const struct dev_pm_ops mmc_bus_pm_ops = {
180 .dev_attrs = mmc_dev_attrs,
181 .match = mmc_bus_match,
182 .uevent = mmc_bus_uevent,
183 .probe = mmc_bus_probe,
184 .remove = mmc_bus_remove,
185 .pm = &mmc_bus_pm_ops,
204 drv->
drv.bus = &mmc_bus_type;
216 drv->
drv.bus = &mmc_bus_type;
222 static void mmc_release_card(
struct device *dev)
250 card->
dev.bus = &mmc_bus_type;
251 card->
dev.release = mmc_release_card;
264 const char *uhs_bus_speed_mode =
"";
265 static const char *
const uhs_speeds[] = {
276 switch (card->
type) {
307 pr_info(
"%s: new %s%s%s card on SPI\n",
313 pr_info(
"%s: new %s%s%s%s%s card at address %04x\n",
319 uhs_bus_speed_mode, type, card->
rca);
322 #ifdef CONFIG_DEBUG_FS
341 #ifdef CONFIG_DEBUG_FS
347 pr_info(
"%s: SPI card removed\n",
350 pr_info(
"%s: card %04x removed\n",