Skip to content

Commit

Permalink
mmc: print debug messages for runtime PM actions
Browse files Browse the repository at this point in the history
At http://www.mail-archive.com/linux-mmc@vger.kernel.org/msg08371.html
(thread: "mmc: sdio: reset card during power_restore") we found and
fixed a bug where mmc's runtime power management functions were not being
called. We have now also made improvements to the SDIO powerup routine
which could possibly mask this kind of issue in future.

Add debug messages to the runtime PM hooks so that it is easy to verify
if and when runtime PM is happening.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Signed-off-by: Chris Ball <cjb@laptop.org>
  • Loading branch information
Daniel Drake authored and Chris Ball committed Jul 21, 2011
1 parent ecc0244 commit bb9cab9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions drivers/mmc/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1832,6 +1832,10 @@ int mmc_power_save_host(struct mmc_host *host)
{
int ret = 0;

#ifdef CONFIG_MMC_DEBUG
pr_info("%s: %s: powering down\n", mmc_hostname(host), __func__);
#endif

mmc_bus_get(host);

if (!host->bus_ops || host->bus_dead || !host->bus_ops->power_restore) {
Expand All @@ -1854,6 +1858,10 @@ int mmc_power_restore_host(struct mmc_host *host)
{
int ret;

#ifdef CONFIG_MMC_DEBUG
pr_info("%s: %s: powering up\n", mmc_hostname(host), __func__);
#endif

mmc_bus_get(host);

if (!host->bus_ops || host->bus_dead || !host->bus_ops->power_restore) {
Expand Down

0 comments on commit bb9cab9

Please sign in to comment.