Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 296361
b: refs/heads/master
c: 2796e39
h: refs/heads/master
i:
  296359: 2c0e831
v: v3
  • Loading branch information
Russell King committed Feb 3, 2012
1 parent 70350e2 commit 8c6b02c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 45c7f75fd4b57035cd35954986a2faefb07dac9d
refs/heads/master: 2796e397373a15ece69267ed1bbb9f61435a3ac7
18 changes: 12 additions & 6 deletions trunk/drivers/mfd/mcp-sa11x0.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <linux/delay.h>
#include <linux/spinlock.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
#include <linux/mfd/mcp.h>

#include <mach/hardware.h>
Expand Down Expand Up @@ -266,33 +267,38 @@ static int mcp_sa11x0_remove(struct platform_device *dev)
return 0;
}

static int mcp_sa11x0_suspend(struct platform_device *dev, pm_message_t state)
#ifdef CONFIG_PM_SLEEP
static int mcp_sa11x0_suspend(struct device *dev)
{
struct mcp_sa11x0 *m = priv(platform_get_drvdata(dev));
struct mcp_sa11x0 *m = priv(dev_get_drvdata(dev));

writel(m->mccr0 & ~MCCR0_MCE, MCCR0(m));

return 0;
}

static int mcp_sa11x0_resume(struct platform_device *dev)
static int mcp_sa11x0_resume(struct device *dev)
{
struct mcp_sa11x0 *m = priv(platform_get_drvdata(dev));
struct mcp_sa11x0 *m = priv(dev_get_drvdata(dev));

writel_relaxed(m->mccr1, MCCR1(m));
writel_relaxed(m->mccr0, MCCR0(m));

return 0;
}
#endif

static const struct dev_pm_ops mcp_sa11x0_pm_ops = {
SET_SYSTEM_SLEEP_PM_OPS(mcp_sa11x0_suspend, mcp_sa11x0_resume)
};

static struct platform_driver mcp_sa11x0_driver = {
.probe = mcp_sa11x0_probe,
.remove = mcp_sa11x0_remove,
.suspend = mcp_sa11x0_suspend,
.resume = mcp_sa11x0_resume,
.driver = {
.name = DRIVER_NAME,
.owner = THIS_MODULE,
.pm = &mcp_sa11x0_pm_ops,
},
};

Expand Down

0 comments on commit 8c6b02c

Please sign in to comment.