Skip to content

Commit ec076cd

Browse files
Fu, Zhonghuistorulf
authored andcommitted
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>
1 parent 5c671c4 commit ec076cd

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

drivers/mmc/core/bus.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,8 @@ int mmc_add_card(struct mmc_card *card)
349349

350350
card->dev.of_node = mmc_of_find_child_device(card->host, 0);
351351

352+
device_enable_async_suspend(&card->dev);
353+
352354
ret = device_add(&card->dev);
353355
if (ret)
354356
return ret;

drivers/mmc/core/sdio_bus.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,7 @@ int sdio_add_func(struct sdio_func *func)
322322

323323
sdio_set_of_node(func);
324324
sdio_acpi_set_handle(func);
325+
device_enable_async_suspend(&func->dev);
325326
ret = device_add(&func->dev);
326327
if (ret == 0)
327328
sdio_func_set_present(func);

0 commit comments

Comments
 (0)