diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:00:13 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:00:13 -0400 |
commit | 15953654cc312429740fd58fb37a5a3d63a54376 (patch) | |
tree | bbb6bf8d4ea943545e29ce896848182c4f206298 /drivers/power/pda_power.c | |
parent | c3ed9ea4ab460080dea9449c709be9316c670c72 (diff) | |
parent | 24af3202459d9a25643009b1ab8ab5ff04d94b49 (diff) |
Merge git://git.infradead.org/battery-2.6
* git://git.infradead.org/battery-2.6:
ds2760_battery: Document ABI change
ds2760_battery: Make charge_now and charge_full writeable
power_supply: Add support for writeable properties
power_supply: Use attribute groups
power_supply: Add test_power driver
tosa_battery: Fix build error due to direct driver_data usage
wm97xx_battery: Quieten sparse warning (bat_set_pdata not declared)
ds2782_battery: Get rid of magic numbers in driver_data
ds2782_battery: Add support for ds2786 battery gas gauge
pda_power: Add function callbacks for suspend and resume
wm831x_power: Use genirq
Driver for Zipit Z2 battery chip
ds2782_battery: Fix clientdata on removal
Diffstat (limited to 'drivers/power/pda_power.c')
-rw-r--r-- | drivers/power/pda_power.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/power/pda_power.c b/drivers/power/pda_power.c index a232de6a5703..69f8aa3a6a4b 100644 --- a/drivers/power/pda_power.c +++ b/drivers/power/pda_power.c | |||
@@ -404,6 +404,13 @@ static int usb_wakeup_enabled; | |||
404 | 404 | ||
405 | static int pda_power_suspend(struct platform_device *pdev, pm_message_t state) | 405 | static int pda_power_suspend(struct platform_device *pdev, pm_message_t state) |
406 | { | 406 | { |
407 | if (pdata->suspend) { | ||
408 | int ret = pdata->suspend(state); | ||
409 | |||
410 | if (ret) | ||
411 | return ret; | ||
412 | } | ||
413 | |||
407 | if (device_may_wakeup(&pdev->dev)) { | 414 | if (device_may_wakeup(&pdev->dev)) { |
408 | if (ac_irq) | 415 | if (ac_irq) |
409 | ac_wakeup_enabled = !enable_irq_wake(ac_irq->start); | 416 | ac_wakeup_enabled = !enable_irq_wake(ac_irq->start); |
@@ -423,6 +430,9 @@ static int pda_power_resume(struct platform_device *pdev) | |||
423 | disable_irq_wake(ac_irq->start); | 430 | disable_irq_wake(ac_irq->start); |
424 | } | 431 | } |
425 | 432 | ||
433 | if (pdata->resume) | ||
434 | return pdata->resume(); | ||
435 | |||
426 | return 0; | 436 | return 0; |
427 | } | 437 | } |
428 | #else | 438 | #else |