On 6 February 2014 15:35, <rogerable@xxxxxxxxxxx> wrote:[snip]
From: Roger Tseng <rogerable@xxxxxxxxxxx>
Realtek USB SD/MMC host driver provides mmc host support based on the Realtek
USB card reader MFD driver.
Signed-off-by: Roger Tseng <rogerable@xxxxxxxxxxx>
---
drivers/mmc/host/Kconfig | 7 +
drivers/mmc/host/Makefile | 1 +
drivers/mmc/host/rtsx_usb_sdmmc.c | 1500 +++++++++++++++++++++++++++++++++++++
3 files changed, 1508 insertions(+)
create mode 100644 drivers/mmc/host/rtsx_usb_sdmmc.c
Yes, and to keep some internal state of the controller.+#ifdef CONFIG_PM_RUNTIME
There are stubs for pm_runtime* functions, thus the ifdefs can be removed.
Please go though the complete patch and remove all instances.
+ pm_runtime_put(sdmmc_dev(host));
I don't know so much about USB mmc hosts hardware, but I just wanted
to find out if I have understood this correct.
You can't do fine grained power management of the USB parent device,
since it needs to be runtime resumed to be able keep the power the
card? Once it becomes runtime suspended, the power to the card will
thus also be dropped?
...+#ifdef CONFIG_PM
I suppose this should be CONFIG_PM_SLEEP?
...+ err = mmc_suspend_host(mmc);
This won't compile. The mmc_suspend_host API has been removed.
...+ return mmc_resume_host(mmc);
This won't compile. The mmc_resume_host API has been removed.
+static struct platform_driver rtsx_usb_sdmmc_driver = {
+ .probe = rtsx_usb_sdmmc_drv_probe,
+ .remove = rtsx_usb_sdmmc_drv_remove,
+ .id_table = rtsx_usb_sdmmc_ids,
+ .suspend = rtsx_usb_sdmmc_suspend,
+ .resume = rtsx_usb_sdmmc_resume,
Please use the modern pm_ops instead of the legacy suspend/resume callbacks.
I suggest you then also switch to use the SIMPLE_DEV_PM_OPS macro.
Kind regards--
Ulf Hansson