diff options
author | Arnd Bergmann <arnd@arndb.de> | 2013-06-20 15:40:15 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2013-06-20 15:40:15 -0400 |
commit | 8fe14e5a74d3f45589c83c06ed63b5c8a376a824 (patch) | |
tree | c8e30fcbc8145a09960ead3ccc17fea5aacebe05 /arch/arm/mach-omap2 | |
parent | 30d2266c685ce9f560e5023e4add58f890554a46 (diff) | |
parent | b536dd412b4364df2f9495c6550ee38f6ad3b0fe (diff) |
Merge tag 'omap-for-v3.11/gpmc-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into next/drivers
From Tony Lindgren:
GPMC suspend patch that was left out of the earlier
omap-for-v3.11/gpmc-signed branch because of a compile error
it caused. The compile error is fixed in this version.
* tag 'omap-for-v3.11/gpmc-part2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
ARM: OMAP2+: gpmc: Low power transition support
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/gpmc.c | 21 |
1 files changed, 19 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/gpmc.c b/arch/arm/mach-omap2/gpmc.c index bac18b3ebbfb..1c7969e965d7 100644 --- a/arch/arm/mach-omap2/gpmc.c +++ b/arch/arm/mach-omap2/gpmc.c | |||
@@ -1669,6 +1669,24 @@ static int gpmc_remove(struct platform_device *pdev) | |||
1669 | return 0; | 1669 | return 0; |
1670 | } | 1670 | } |
1671 | 1671 | ||
1672 | #ifdef CONFIG_PM_SLEEP | ||
1673 | static int gpmc_suspend(struct device *dev) | ||
1674 | { | ||
1675 | omap3_gpmc_save_context(); | ||
1676 | pm_runtime_put_sync(dev); | ||
1677 | return 0; | ||
1678 | } | ||
1679 | |||
1680 | static int gpmc_resume(struct device *dev) | ||
1681 | { | ||
1682 | pm_runtime_get_sync(dev); | ||
1683 | omap3_gpmc_restore_context(); | ||
1684 | return 0; | ||
1685 | } | ||
1686 | #endif | ||
1687 | |||
1688 | static SIMPLE_DEV_PM_OPS(gpmc_pm_ops, gpmc_suspend, gpmc_resume); | ||
1689 | |||
1672 | static struct platform_driver gpmc_driver = { | 1690 | static struct platform_driver gpmc_driver = { |
1673 | .probe = gpmc_probe, | 1691 | .probe = gpmc_probe, |
1674 | .remove = gpmc_remove, | 1692 | .remove = gpmc_remove, |
@@ -1676,6 +1694,7 @@ static struct platform_driver gpmc_driver = { | |||
1676 | .name = DEVICE_NAME, | 1694 | .name = DEVICE_NAME, |
1677 | .owner = THIS_MODULE, | 1695 | .owner = THIS_MODULE, |
1678 | .of_match_table = of_match_ptr(gpmc_dt_ids), | 1696 | .of_match_table = of_match_ptr(gpmc_dt_ids), |
1697 | .pm = &gpmc_pm_ops, | ||
1679 | }, | 1698 | }, |
1680 | }; | 1699 | }; |
1681 | 1700 | ||
@@ -1738,7 +1757,6 @@ static irqreturn_t gpmc_handle_irq(int irq, void *dev) | |||
1738 | return IRQ_HANDLED; | 1757 | return IRQ_HANDLED; |
1739 | } | 1758 | } |
1740 | 1759 | ||
1741 | #ifdef CONFIG_ARCH_OMAP3 | ||
1742 | static struct omap3_gpmc_regs gpmc_context; | 1760 | static struct omap3_gpmc_regs gpmc_context; |
1743 | 1761 | ||
1744 | void omap3_gpmc_save_context(void) | 1762 | void omap3_gpmc_save_context(void) |
@@ -1803,4 +1821,3 @@ void omap3_gpmc_restore_context(void) | |||
1803 | } | 1821 | } |
1804 | } | 1822 | } |
1805 | } | 1823 | } |
1806 | #endif /* CONFIG_ARCH_OMAP3 */ | ||