diff options
author | Sourav Poddar <sourav.poddar@ti.com> | 2013-04-26 16:25:34 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@linaro.org> | 2013-05-16 10:09:09 -0400 |
commit | 4b7ec5accecdb136c7afaf8739a06d5335cc05aa (patch) | |
tree | f64eb17440141028d3e6312a40f7eb63d100ddcb /arch | |
parent | 4425fb13d12f25501b56f06b960203ecd8de2573 (diff) |
arm: omap2+: omap_device: remove no_idle_on_suspend
Remove "no_idle_on_suspend" check, since respective
driver should be able to prevent idling of an
omap device whenever required.
Driver's can get same behavior by just returning -EBUSY
from their ->runtime_suspend only during suspend.
Cc: Santosh Shilimkar <santosh.shilimkar@ti.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Rajendra nayak <rnayak@ti.com>
Cc: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sourav Poddar <sourav.poddar@ti.com>
Reviewed-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/omap_device.c | 9 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_device.h | 10 |
2 files changed, 2 insertions, 17 deletions
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c index e6d230700b2b..68be532f8688 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
@@ -170,9 +170,6 @@ static int omap_device_build_from_dt(struct platform_device *pdev) | |||
170 | r->name = dev_name(&pdev->dev); | 170 | r->name = dev_name(&pdev->dev); |
171 | } | 171 | } |
172 | 172 | ||
173 | if (of_get_property(node, "ti,no_idle_on_suspend", NULL)) | ||
174 | omap_device_disable_idle_on_suspend(pdev); | ||
175 | |||
176 | pdev->dev.pm_domain = &omap_device_pm_domain; | 173 | pdev->dev.pm_domain = &omap_device_pm_domain; |
177 | 174 | ||
178 | odbfd_exit1: | 175 | odbfd_exit1: |
@@ -621,8 +618,7 @@ static int _od_suspend_noirq(struct device *dev) | |||
621 | 618 | ||
622 | if (!ret && !pm_runtime_status_suspended(dev)) { | 619 | if (!ret && !pm_runtime_status_suspended(dev)) { |
623 | if (pm_generic_runtime_suspend(dev) == 0) { | 620 | if (pm_generic_runtime_suspend(dev) == 0) { |
624 | if (!(od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND)) | 621 | omap_device_idle(pdev); |
625 | omap_device_idle(pdev); | ||
626 | od->flags |= OMAP_DEVICE_SUSPENDED; | 622 | od->flags |= OMAP_DEVICE_SUSPENDED; |
627 | } | 623 | } |
628 | } | 624 | } |
@@ -638,8 +634,7 @@ static int _od_resume_noirq(struct device *dev) | |||
638 | if ((od->flags & OMAP_DEVICE_SUSPENDED) && | 634 | if ((od->flags & OMAP_DEVICE_SUSPENDED) && |
639 | !pm_runtime_status_suspended(dev)) { | 635 | !pm_runtime_status_suspended(dev)) { |
640 | od->flags &= ~OMAP_DEVICE_SUSPENDED; | 636 | od->flags &= ~OMAP_DEVICE_SUSPENDED; |
641 | if (!(od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND)) | 637 | omap_device_enable(pdev); |
642 | omap_device_enable(pdev); | ||
643 | pm_generic_runtime_resume(dev); | 638 | pm_generic_runtime_resume(dev); |
644 | } | 639 | } |
645 | 640 | ||
diff --git a/arch/arm/mach-omap2/omap_device.h b/arch/arm/mach-omap2/omap_device.h index 044c31d50e5b..17ca1aec2710 100644 --- a/arch/arm/mach-omap2/omap_device.h +++ b/arch/arm/mach-omap2/omap_device.h | |||
@@ -38,7 +38,6 @@ extern struct dev_pm_domain omap_device_pm_domain; | |||
38 | 38 | ||
39 | /* omap_device.flags values */ | 39 | /* omap_device.flags values */ |
40 | #define OMAP_DEVICE_SUSPENDED BIT(0) | 40 | #define OMAP_DEVICE_SUSPENDED BIT(0) |
41 | #define OMAP_DEVICE_NO_IDLE_ON_SUSPEND BIT(1) | ||
42 | 41 | ||
43 | /** | 42 | /** |
44 | * struct omap_device - omap_device wrapper for platform_devices | 43 | * struct omap_device - omap_device wrapper for platform_devices |
@@ -101,13 +100,4 @@ static inline struct omap_device *to_omap_device(struct platform_device *pdev) | |||
101 | { | 100 | { |
102 | return pdev ? pdev->archdata.od : NULL; | 101 | return pdev ? pdev->archdata.od : NULL; |
103 | } | 102 | } |
104 | |||
105 | static inline | ||
106 | void omap_device_disable_idle_on_suspend(struct platform_device *pdev) | ||
107 | { | ||
108 | struct omap_device *od = to_omap_device(pdev); | ||
109 | |||
110 | od->flags |= OMAP_DEVICE_NO_IDLE_ON_SUSPEND; | ||
111 | } | ||
112 | |||
113 | #endif | 103 | #endif |