aboutsummaryrefslogtreecommitdiff
path: root/drivers/power/pda_power.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2010-04-12 23:33:22 +0200
committerAnton Vorontsov <cbouatmailru@gmail.com>2010-04-16 19:14:34 +0400
commita3bcbbee83f55cbaec9b2ad748e7300c7feb2192 (patch)
tree76f253affed1fc8da36b6e7dccbed626dc6dbcd5 /drivers/power/pda_power.c
parentb5874f33bbaf00586d05de37706491ee37057e11 (diff)
pda_power: Add function callbacks for suspend and resume
Add function prototypes for power management events so they can be handled and used by platform implementations. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Dmitry Baryshkov <dbaryshkov@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/pda_power.c')
-rw-r--r--drivers/power/pda_power.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c
index a232de6a570..69f8aa3a6a4 100644
--- a/drivers/power/pda_power.c
+++ b/drivers/power/pda_power.c
@@ -404,6 +404,13 @@ static int usb_wakeup_enabled;
static int pda_power_suspend(struct platform_device *pdev, pm_message_t state)
{
+ if (pdata->suspend) {
+ int ret = pdata->suspend(state);
+
+ if (ret)
+ return ret;
+ }
+
if (device_may_wakeup(&pdev->dev)) {
if (ac_irq)
ac_wakeup_enabled = !enable_irq_wake(ac_irq->start);
@@ -423,6 +430,9 @@ static int pda_power_resume(struct platform_device *pdev)
disable_irq_wake(ac_irq->start);
}
+ if (pdata->resume)
+ return pdata->resume();
+
return 0;
}
#else