Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 357577
b: refs/heads/master
c: dc781d0
h: refs/heads/master
i:
  357575: cb47c1f
v: v3
  • Loading branch information
Mark Brown authored and Samuel Ortiz committed Feb 13, 2013
1 parent 48f4116 commit b157c55
Show file tree
Hide file tree
Showing 2 changed files with 27 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: 595e5bf75cea0664eeb63d8df20716f66f4aa459
refs/heads/master: dc781d0e10fca29123ddde45429d777725c0fde5
26 changes: 26 additions & 0 deletions trunk/drivers/mfd/arizona-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,36 @@ static int arizona_runtime_suspend(struct device *dev)
}
#endif

#ifdef CONFIG_PM_SLEEP
static int arizona_resume_noirq(struct device *dev)
{
struct arizona *arizona = dev_get_drvdata(dev);

dev_dbg(arizona->dev, "Early resume, disabling IRQ\n");
disable_irq(arizona->irq);

return 0;
}

static int arizona_resume(struct device *dev)
{
struct arizona *arizona = dev_get_drvdata(dev);

dev_dbg(arizona->dev, "Late resume, reenabling IRQ\n");
enable_irq(arizona->irq);

return 0;
}
#endif

const struct dev_pm_ops arizona_pm_ops = {
SET_RUNTIME_PM_OPS(arizona_runtime_suspend,
arizona_runtime_resume,
NULL)
SET_SYSTEM_SLEEP_PM_OPS(NULL, arizona_resume)
#ifdef CONFIG_PM_SLEEP
.resume_noirq = arizona_resume_noirq,
#endif
};
EXPORT_SYMBOL_GPL(arizona_pm_ops);

Expand Down

0 comments on commit b157c55

Please sign in to comment.