Skip to contentSkip to conversation

mmc: Use runtime pm for blkdevice

PATCH RESEND Superseded Ulf Hansson 2 participants 2 messages Apr 17, 2013 – Apr 24, 2013 MMC, SD and SDIO

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v3 cover mmc: Use runtime pm for blkdevice

From: Ulf Hansson <[email protected]>

SDIO has been using runtime pm for a while to handle runtime power save operations. This patchset is enabling the option to make the sd/mmc blockdevices to use runtime pm as well.

The runtime pm implementation for the block device will make use of autosuspend to defer power save operation to after request inactivty for a certain time.

Corresponding pm_runtime_get|put calls has been added at those places that do requires the card to be fully powered to communicate.

Patch 4 can be considered as a proof of concept patch. It implements aggressive power management for (e)MMC/SD. This feature has also been discussed on the mmc mailing list previously.

Next step would be to implement the IDLE BKOPS on top of the runtime pm callbacks.

Changes in v3:
- Make sure the card device is powered from a runtime perspective when needed. This is also the indirect reason to why the new patch 1 has been added to this patchset.
- Added a proof of concept patch, in patch 4.
- Replace acks with cc, since quite some changes has been done.

Changes in v2:
- Removed the stated patch below from this patchset. It can be handled separately. "mmc: core: Remove power_restore bus_ops for mmc and sd"
- Rebased patches on latest mmc-next.
- Added Acks.

Ulf Hansson (4):
mmc: core: Stop bkops for eMMC only from mmc suspend
mmc: core: Add bus_ops for runtime pm callbacks
mmc: block: Enable runtime pm for mmc blkdevice
mmc: core: Support aggressive power management for (e)MMC/SD

 drivers/mmc/card/block.c   |   32 +++++++++++++++++++++-----
 drivers/mmc/core/bus.c     |   14 ++++++++++--
 drivers/mmc/core/core.c    |   47 +++++++++++++++++++++------------------
 drivers/mmc/core/core.h    |    3 +++
 drivers/mmc/core/debugfs.c |    8 +++----
 drivers/mmc/core/mmc.c     |   53 ++++++++++++++++++++++++++++++++++++++++++--
 drivers/mmc/core/sd.c      |   46 ++++++++++++++++++++++++++++++++++++--
 drivers/mmc/core/sdio.c    |   16 +++++++++++++
 include/linux/mmc/core.h   |    3 +++
 include/linux/mmc/host.h   |    2 +-
 10 files changed, 185 insertions(+), 39 deletions(-)
Signature · 1 line
1.7.10
#1 lore raw
Quoted 51 lines · Ulf Hansson

From: Ulf Hansson <[email protected]>

SDIO has been using runtime pm for a while to handle runtime power save operations. This patchset is enabling the option to make the sd/mmc blockdevices to use runtime pm as well.

The runtime pm implementation for the block device will make use of autosuspend to defer power save operation to after request inactivty for a certain time.

Corresponding pm_runtime_get|put calls has been added at those places that do requires the card to be fully powered to communicate.

Patch 4 can be considered as a proof of concept patch. It implements aggressive power management for (e)MMC/SD. This feature has also been discussed on the mmc mailing list previously.

Next step would be to implement the IDLE BKOPS on top of the runtime pm callbacks.

Changes in v3:
- Make sure the card device is powered from a runtime perspective when needed. This is also the indirect reason to why the new patch 1 has been added to this patchset.
- Added a proof of concept patch, in patch 4.
- Replace acks with cc, since quite some changes has been done.

Changes in v2:
- Removed the stated patch below from this patchset. It can be handled separately. "mmc: core: Remove power_restore bus_ops for mmc and sd"
- Rebased patches on latest mmc-next.
- Added Acks.

Ulf Hansson (4):
mmc: core: Stop bkops for eMMC only from mmc suspend
mmc: core: Add bus_ops for runtime pm callbacks
mmc: block: Enable runtime pm for mmc blkdevice
mmc: core: Support aggressive power management for (e)MMC/SD

 drivers/mmc/card/block.c   |   32 +++++++++++++++++++++-----
 drivers/mmc/core/bus.c     |   14 ++++++++++--
 drivers/mmc/core/core.c    |   47 +++++++++++++++++++++------------------
 drivers/mmc/core/core.h    |    3 +++
 drivers/mmc/core/debugfs.c |    8 +++----
 drivers/mmc/core/mmc.c     |   53 ++++++++++++++++++++++++++++++++++++++++++--
 drivers/mmc/core/sd.c      |   46 ++++++++++++++++++++++++++++++++++++--
 drivers/mmc/core/sdio.c    |   16 +++++++++++++
 include/linux/mmc/core.h   |    3 +++
 include/linux/mmc/host.h   |    2 +-
 10 files changed, 185 insertions(+), 39 deletions(-)
Quoted 3 lines

--
1.7.10

Adrian and Maya, do you think patchset is acceptable from your point? Can we advise Chris to merge it for 3.10 or do we need another round? :-)

Kind regards
Ulf Hansson