diff options
Diffstat (limited to 'arch/arm/plat-omap/gpio.c')
-rw-r--r-- | arch/arm/plat-omap/gpio.c | 14 |
1 files changed, 10 insertions, 4 deletions
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 | ||
1421 | static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t mesg) | 1421 | static 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 | ||
1435 | static int omap_mpuio_resume_early(struct platform_device *pdev) | 1436 | static 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 | ||
1450 | static 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 | */ |
1451 | static struct platform_driver omap_mpuio_driver = { | 1458 | static 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 | ||