aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-14 23:03:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-14 23:03:54 -0400
commitf86054c24565d09d1997f03192761dabf6b8a9c9 (patch)
tree64a48fd9d03b39932c768ea28eb8edf6cecbeaf1 /arch/arm
parentc91d7d54ea9e75ec18c733969ba16dd7ab94fc99 (diff)
parent33f82d141c897f39cd8bce592d88cb3c5af58342 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: (23 commits) at_hdmac: Rework suspend_late()/resume_early() PM: Reset transition_started at dpm_resume_noirq PM: Update kerneldoc comments in drivers/base/power/main.c PM: Add convenience macro to make switching to dev_pm_ops less error-prone hp-wmi: Switch driver to dev_pm_ops floppy: Switch driver to dev_pm_ops PM: Trivial fixes PM / Hibernate / Memory hotplug: Always use for_each_populated_zone() PM/Hibernate: Do not try to allocate too much memory too hard (rev. 2) PM/Hibernate: Do not release preallocated memory unnecessarily (rev. 2) PM/Hibernate: Rework shrinking of memory PM: Fix typo in label name s/Platofrm_finish/Platform_finish/ PM: Run-time PM platform device bus support PM: Introduce core framework for run-time PM of I/O devices (rev. 17) Driver Core: Make PM operations a const pointer PM: Remove platform device suspend_late()/resume_early() V2 USB: Rework musb suspend()/resume_early() I2C: Rework i2c-s3c2410 suspend_late()/resume() V2 I2C: Rework i2c-pxa suspend_late()/resume_early() DMA: Rework txx9dmac suspend_late()/resume_early() ... Fix trivial conflict in drivers/base/platform.c (due to same constification patch being merged in both sides, along with some other PM work in the PM branch)
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/include/asm/device.h3
-rw-r--r--arch/arm/plat-omap/debug-leds.c11
-rw-r--r--arch/arm/plat-omap/gpio.c14
3 files changed, 20 insertions, 8 deletions
diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h
index c61642b40603..9f390ce335cb 100644
--- a/arch/arm/include/asm/device.h
+++ b/arch/arm/include/asm/device.h
@@ -12,4 +12,7 @@ struct dev_archdata {
12#endif 12#endif
13}; 13};
14 14
15struct pdev_archdata {
16};
17
15#endif 18#endif
diff --git a/arch/arm/plat-omap/debug-leds.c b/arch/arm/plat-omap/debug-leds.c
index be4eefda4767..9395898dd49a 100644
--- a/arch/arm/plat-omap/debug-leds.c
+++ b/arch/arm/plat-omap/debug-leds.c
@@ -281,24 +281,27 @@ static int /* __init */ fpga_probe(struct platform_device *pdev)
281 return 0; 281 return 0;
282} 282}
283 283
284static int fpga_suspend_late(struct platform_device *pdev, pm_message_t mesg) 284static int fpga_suspend_noirq(struct device *dev)
285{ 285{
286 __raw_writew(~0, &fpga->leds); 286 __raw_writew(~0, &fpga->leds);
287 return 0; 287 return 0;
288} 288}
289 289
290static int fpga_resume_early(struct platform_device *pdev) 290static int fpga_resume_noirq(struct device *dev)
291{ 291{
292 __raw_writew(~hw_led_state, &fpga->leds); 292 __raw_writew(~hw_led_state, &fpga->leds);
293 return 0; 293 return 0;
294} 294}
295 295
296static struct dev_pm_ops fpga_dev_pm_ops = {
297 .suspend_noirq = fpga_suspend_noirq,
298 .resume_noirq = fpga_resume_noirq,
299};
296 300
297static struct platform_driver led_driver = { 301static struct platform_driver led_driver = {
298 .driver.name = "omap_dbg_led", 302 .driver.name = "omap_dbg_led",
303 .driver.pm = &fpga_dev_pm_ops,
299 .probe = fpga_probe, 304 .probe = fpga_probe,
300 .suspend_late = fpga_suspend_late,
301 .resume_early = fpga_resume_early,
302}; 305};
303 306
304static int __init fpga_init(void) 307static int __init fpga_init(void)
diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index fd21937fe110..176c86e5531d 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -1418,8 +1418,9 @@ static struct irq_chip mpuio_irq_chip = {
1418 1418
1419#include <linux/platform_device.h> 1419#include <linux/platform_device.h>
1420 1420
1421static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t mesg) 1421static int omap_mpuio_suspend_noirq(struct device *dev)
1422{ 1422{
1423 struct platform_device *pdev = to_platform_device(dev);
1423 struct gpio_bank *bank = platform_get_drvdata(pdev); 1424 struct gpio_bank *bank = platform_get_drvdata(pdev);
1424 void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; 1425 void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT;
1425 unsigned long flags; 1426 unsigned long flags;
@@ -1432,8 +1433,9 @@ static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t me
1432 return 0; 1433 return 0;
1433} 1434}
1434 1435
1435static int omap_mpuio_resume_early(struct platform_device *pdev) 1436static int omap_mpuio_resume_noirq(struct device *dev)
1436{ 1437{
1438 struct platform_device *pdev = to_platform_device(dev);
1437 struct gpio_bank *bank = platform_get_drvdata(pdev); 1439 struct gpio_bank *bank = platform_get_drvdata(pdev);
1438 void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; 1440 void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT;
1439 unsigned long flags; 1441 unsigned long flags;
@@ -1445,14 +1447,18 @@ static int omap_mpuio_resume_early(struct platform_device *pdev)
1445 return 0; 1447 return 0;
1446} 1448}
1447 1449
1450static struct dev_pm_ops omap_mpuio_dev_pm_ops = {
1451 .suspend_noirq = omap_mpuio_suspend_noirq,
1452 .resume_noirq = omap_mpuio_resume_noirq,
1453};
1454
1448/* use platform_driver for this, now that there's no longer any 1455/* use platform_driver for this, now that there's no longer any
1449 * point to sys_device (other than not disturbing old code). 1456 * point to sys_device (other than not disturbing old code).
1450 */ 1457 */
1451static struct platform_driver omap_mpuio_driver = { 1458static struct platform_driver omap_mpuio_driver = {
1452 .suspend_late = omap_mpuio_suspend_late,
1453 .resume_early = omap_mpuio_resume_early,
1454 .driver = { 1459 .driver = {
1455 .name = "mpuio", 1460 .name = "mpuio",
1461 .pm = &omap_mpuio_dev_pm_ops,
1456 }, 1462 },
1457}; 1463};
1458 1464