Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351127
b: refs/heads/master
c: 8259293
h: refs/heads/master
i:
  351125: a7f4236
  351123: 2138b77
  351119: 435f787
v: v3
  • Loading branch information
Ulf Hansson authored and Russell King committed Jan 23, 2013
1 parent 111f30c commit ba758d3
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 599c1d5c750ddf528c7c6d3cdc466708f0502e66
refs/heads/master: 8259293aee1d44d7ebf0c644ef48db835653ebc3
29 changes: 29 additions & 0 deletions trunk/drivers/mmc/host/mmci.c
Original file line number Diff line number Diff line change
Expand Up @@ -1614,8 +1614,37 @@ static int mmci_resume(struct device *dev)
}
#endif

#ifdef CONFIG_PM_RUNTIME
static int mmci_runtime_suspend(struct device *dev)
{
struct amba_device *adev = to_amba_device(dev);
struct mmc_host *mmc = amba_get_drvdata(adev);

if (mmc) {
struct mmci_host *host = mmc_priv(mmc);
clk_disable_unprepare(host->clk);
}

return 0;
}

static int mmci_runtime_resume(struct device *dev)
{
struct amba_device *adev = to_amba_device(dev);
struct mmc_host *mmc = amba_get_drvdata(adev);

if (mmc) {
struct mmci_host *host = mmc_priv(mmc);
clk_prepare_enable(host->clk);
}

return 0;
}
#endif

static const struct dev_pm_ops mmci_dev_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(mmci_suspend, mmci_resume)
SET_RUNTIME_PM_OPS(mmci_runtime_suspend, mmci_runtime_resume, NULL)
};

static struct amba_id mmci_ids[] = {
Expand Down

0 comments on commit ba758d3

Please sign in to comment.