Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: enable MMC/SD/SDIO device to suspend/resume asynchronously

Now, PM core supports asynchronous suspend/resume mode for devices
during system suspend/resume, and the power state transition of one
device may be completed in separate kernel thread. PM core ensures
all power state transition dependency between devices. This patch
enables MMC/SD/SDIO card and SDIO function devices to suspend/resume
asynchronously. This will take advantage of multicore and improve
system suspend/resume speed. After applying this patch and enabling
all SDIO function's child devices to suspend/resume asynchronously
on ASUS T100TA, the system suspend-to-idle time is reduced from
1645ms to 1108ms, and the system resume time is reduced from 940ms
to 918ms.

Signed-off-by: Zhonghui Fu <zhonghui.fu@linux.intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Fu, Zhonghui and committed by
Ulf Hansson
ec076cd2 5c671c41

+3
+2
drivers/mmc/core/bus.c
··· 349 349 350 350 card->dev.of_node = mmc_of_find_child_device(card->host, 0); 351 351 352 + device_enable_async_suspend(&card->dev); 353 + 352 354 ret = device_add(&card->dev); 353 355 if (ret) 354 356 return ret;
+1
drivers/mmc/core/sdio_bus.c
··· 322 322 323 323 sdio_set_of_node(func); 324 324 sdio_acpi_set_handle(func); 325 + device_enable_async_suspend(&func->dev); 325 326 ret = device_add(&func->dev); 326 327 if (ret == 0) 327 328 sdio_func_set_present(func);