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 9298bc0ab171..50b19a3027bc 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c | |||
@@ -1315,8 +1315,9 @@ static struct irq_chip mpuio_irq_chip = { | |||
1315 | 1315 | ||
1316 | #include <linux/platform_device.h> | 1316 | #include <linux/platform_device.h> |
1317 | 1317 | ||
1318 | static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t mesg) | 1318 | static int omap_mpuio_suspend_noirq(struct device *dev) |
1319 | { | 1319 | { |
1320 | struct platform_device *pdev = to_platform_device(dev); | ||
1320 | struct gpio_bank *bank = platform_get_drvdata(pdev); | 1321 | struct gpio_bank *bank = platform_get_drvdata(pdev); |
1321 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; | 1322 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; |
1322 | unsigned long flags; | 1323 | unsigned long flags; |
@@ -1329,8 +1330,9 @@ static int omap_mpuio_suspend_late(struct platform_device *pdev, pm_message_t me | |||
1329 | return 0; | 1330 | return 0; |
1330 | } | 1331 | } |
1331 | 1332 | ||
1332 | static int omap_mpuio_resume_early(struct platform_device *pdev) | 1333 | static int omap_mpuio_resume_noirq(struct device *dev) |
1333 | { | 1334 | { |
1335 | struct platform_device *pdev = to_platform_device(dev); | ||
1334 | struct gpio_bank *bank = platform_get_drvdata(pdev); | 1336 | struct gpio_bank *bank = platform_get_drvdata(pdev); |
1335 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; | 1337 | void __iomem *mask_reg = bank->base + OMAP_MPUIO_GPIO_MASKIT; |
1336 | unsigned long flags; | 1338 | unsigned long flags; |
@@ -1342,14 +1344,18 @@ static int omap_mpuio_resume_early(struct platform_device *pdev) | |||
1342 | return 0; | 1344 | return 0; |
1343 | } | 1345 | } |
1344 | 1346 | ||
1347 | static struct dev_pm_ops omap_mpuio_dev_pm_ops = { | ||
1348 | .suspend_noirq = omap_mpuio_suspend_noirq, | ||
1349 | .resume_noirq = omap_mpuio_resume_noirq, | ||
1350 | }; | ||
1351 | |||
1345 | /* use platform_driver for this, now that there's no longer any | 1352 | /* use platform_driver for this, now that there's no longer any |
1346 | * point to sys_device (other than not disturbing old code). | 1353 | * point to sys_device (other than not disturbing old code). |
1347 | */ | 1354 | */ |
1348 | static struct platform_driver omap_mpuio_driver = { | 1355 | static struct platform_driver omap_mpuio_driver = { |
1349 | .suspend_late = omap_mpuio_suspend_late, | ||
1350 | .resume_early = omap_mpuio_resume_early, | ||
1351 | .driver = { | 1356 | .driver = { |
1352 | .name = "mpuio", | 1357 | .name = "mpuio", |
1358 | .pm = &omap_mpuio_dev_pm_ops, | ||
1353 | }, | 1359 | }, |
1354 | }; | 1360 | }; |
1355 | 1361 | ||