diff options
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_device.h | 5 | ||||
-rw-r--r-- | arch/arm/plat-omap/omap_device.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_device.h b/arch/arm/plat-omap/include/plat/omap_device.h index bc36d05e13e4..ee405b36df4b 100644 --- a/arch/arm/plat-omap/include/plat/omap_device.h +++ b/arch/arm/plat-omap/include/plat/omap_device.h | |||
@@ -46,6 +46,7 @@ extern struct device omap_device_parent; | |||
46 | 46 | ||
47 | /* omap_device.flags values */ | 47 | /* omap_device.flags values */ |
48 | #define OMAP_DEVICE_SUSPENDED BIT(0) | 48 | #define OMAP_DEVICE_SUSPENDED BIT(0) |
49 | #define OMAP_DEVICE_NO_IDLE_ON_SUSPEND BIT(1) | ||
49 | 50 | ||
50 | /** | 51 | /** |
51 | * struct omap_device - omap_device wrapper for platform_devices | 52 | * struct omap_device - omap_device wrapper for platform_devices |
@@ -121,6 +122,10 @@ int omap_device_enable_hwmods(struct omap_device *od); | |||
121 | int omap_device_disable_clocks(struct omap_device *od); | 122 | int omap_device_disable_clocks(struct omap_device *od); |
122 | int omap_device_enable_clocks(struct omap_device *od); | 123 | int omap_device_enable_clocks(struct omap_device *od); |
123 | 124 | ||
125 | static inline void omap_device_disable_idle_on_suspend(struct omap_device *od) | ||
126 | { | ||
127 | od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND; | ||
128 | } | ||
124 | 129 | ||
125 | /* | 130 | /* |
126 | * Entries should be kept in latency order ascending | 131 | * Entries should be kept in latency order ascending |
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c index b93cfdc9a366..2526fa312b8a 100644 --- a/arch/arm/plat-omap/omap_device.c +++ b/arch/arm/plat-omap/omap_device.c | |||
@@ -573,6 +573,9 @@ static int _od_suspend_noirq(struct device *dev) | |||
573 | struct omap_device *od = to_omap_device(pdev); | 573 | struct omap_device *od = to_omap_device(pdev); |
574 | int ret; | 574 | int ret; |
575 | 575 | ||
576 | if (od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND) | ||
577 | return pm_generic_suspend_noirq(dev); | ||
578 | |||
576 | ret = pm_generic_suspend_noirq(dev); | 579 | ret = pm_generic_suspend_noirq(dev); |
577 | 580 | ||
578 | if (!ret && !pm_runtime_status_suspended(dev)) { | 581 | if (!ret && !pm_runtime_status_suspended(dev)) { |
@@ -590,6 +593,9 @@ static int _od_resume_noirq(struct device *dev) | |||
590 | struct platform_device *pdev = to_platform_device(dev); | 593 | struct platform_device *pdev = to_platform_device(dev); |
591 | struct omap_device *od = to_omap_device(pdev); | 594 | struct omap_device *od = to_omap_device(pdev); |
592 | 595 | ||
596 | if (od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND) | ||
597 | return pm_generic_resume_noirq(dev); | ||
598 | |||
593 | if ((od->flags & OMAP_DEVICE_SUSPENDED) && | 599 | if ((od->flags & OMAP_DEVICE_SUSPENDED) && |
594 | !pm_runtime_status_suspended(dev)) { | 600 | !pm_runtime_status_suspended(dev)) { |
595 | od->flags &= ~OMAP_DEVICE_SUSPENDED; | 601 | od->flags &= ~OMAP_DEVICE_SUSPENDED; |