aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-omap/omap_device.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-03-27 19:03:32 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-03-27 19:03:32 -0400
commitd61b7a572b292e2be409e13b4b3adf475f18fb29 (patch)
treee9d30390860147136c05e66abf1edda1bc5b0562 /arch/arm/plat-omap/omap_device.c
parent18d9946bc7e2252fe3c0f2f609ac383c627edefd (diff)
parentf4e2467bad53023589cbff18dd1ab6e0aa3f004c (diff)
Merge tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull "ARM: global cleanups" from Arnd Bergmann: "Quite a bit of code gets removed, and some stuff moved around, mostly the old samsung s3c24xx stuff. There should be no functional changes in this series otherwise. Some cleanups have dependencies on other arm-soc branches and will be sent in the second round. Signed-off-by: Arnd Bergmann <arnd@arndb.de>" Fixed up trivial conflicts mainly due to #include's being changes on both sides. * tag 'cleanup' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (121 commits) ep93xx: Remove unnecessary includes of ep93xx-regs.h ep93xx: Move EP93XX_SYSCON defines to SoC private header ep93xx: Move crunch code to mach-ep93xx directory ep93xx: Make syscon access functions private to SoC ep93xx: Configure GPIO ports in core code ep93xx: Move peripheral defines to local SoC header ep93xx: Convert the watchdog driver into a platform device. ep93xx: Use ioremap for backlight driver ep93xx: Move GPIO defines to gpio-ep93xx.h ep93xx: Don't use system controller defines in audio drivers ep93xx: Move PHYS_BASE defines to local SoC header file ARM: EXYNOS: Add clock register addresses for EXYNOS4X12 bus devfreq driver ARM: EXYNOS: add clock registers for exynos4x12-cpufreq PM / devfreq: update the name of EXYNOS clock registers that were omitted PM / devfreq: update the name of EXYNOS clock register ARM: EXYNOS: change the prefix S5P_ to EXYNOS4_ for clock ARM: EXYNOS: use static declaration on regarding clock ARM: EXYNOS: replace clock.c for other new EXYNOS SoCs ARM: OMAP2+: Fix build error after merge ARM: S3C24XX: remove call to s3c24xx_setup_clocks ...
Diffstat (limited to 'arch/arm/plat-omap/omap_device.c')
-rw-r--r--arch/arm/plat-omap/omap_device.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c
index 2d00ab01d150..6de28ea3cd65 100644
--- a/arch/arm/plat-omap/omap_device.c
+++ b/arch/arm/plat-omap/omap_device.c
@@ -314,8 +314,6 @@ static void _add_hwmod_clocks_clkdev(struct omap_device *od,
314} 314}
315 315
316 316
317static struct dev_pm_domain omap_device_pm_domain;
318
319/** 317/**
320 * omap_device_build_from_dt - build an omap_device with multiple hwmods 318 * omap_device_build_from_dt - build an omap_device with multiple hwmods
321 * @pdev_name: name of the platform_device driver to use 319 * @pdev_name: name of the platform_device driver to use
@@ -756,14 +754,12 @@ static int _od_suspend_noirq(struct device *dev)
756 struct omap_device *od = to_omap_device(pdev); 754 struct omap_device *od = to_omap_device(pdev);
757 int ret; 755 int ret;
758 756
759 if (od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND)
760 return pm_generic_suspend_noirq(dev);
761
762 ret = pm_generic_suspend_noirq(dev); 757 ret = pm_generic_suspend_noirq(dev);
763 758
764 if (!ret && !pm_runtime_status_suspended(dev)) { 759 if (!ret && !pm_runtime_status_suspended(dev)) {
765 if (pm_generic_runtime_suspend(dev) == 0) { 760 if (pm_generic_runtime_suspend(dev) == 0) {
766 omap_device_idle(pdev); 761 if (!(od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND))
762 omap_device_idle(pdev);
767 od->flags |= OMAP_DEVICE_SUSPENDED; 763 od->flags |= OMAP_DEVICE_SUSPENDED;
768 } 764 }
769 } 765 }
@@ -776,13 +772,11 @@ static int _od_resume_noirq(struct device *dev)
776 struct platform_device *pdev = to_platform_device(dev); 772 struct platform_device *pdev = to_platform_device(dev);
777 struct omap_device *od = to_omap_device(pdev); 773 struct omap_device *od = to_omap_device(pdev);
778 774
779 if (od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND)
780 return pm_generic_resume_noirq(dev);
781
782 if ((od->flags & OMAP_DEVICE_SUSPENDED) && 775 if ((od->flags & OMAP_DEVICE_SUSPENDED) &&
783 !pm_runtime_status_suspended(dev)) { 776 !pm_runtime_status_suspended(dev)) {
784 od->flags &= ~OMAP_DEVICE_SUSPENDED; 777 od->flags &= ~OMAP_DEVICE_SUSPENDED;
785 omap_device_enable(pdev); 778 if (!(od->flags & OMAP_DEVICE_NO_IDLE_ON_SUSPEND))
779 omap_device_enable(pdev);
786 pm_generic_runtime_resume(dev); 780 pm_generic_runtime_resume(dev);
787 } 781 }
788 782
@@ -793,7 +787,7 @@ static int _od_resume_noirq(struct device *dev)
793#define _od_resume_noirq NULL 787#define _od_resume_noirq NULL
794#endif 788#endif
795 789
796static struct dev_pm_domain omap_device_pm_domain = { 790struct dev_pm_domain omap_device_pm_domain = {
797 .ops = { 791 .ops = {
798 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, 792 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume,
799 _od_runtime_idle) 793 _od_runtime_idle)
@@ -815,7 +809,6 @@ int omap_device_register(struct platform_device *pdev)
815{ 809{
816 pr_debug("omap_device: %s: registering\n", pdev->name); 810 pr_debug("omap_device: %s: registering\n", pdev->name);
817 811
818 pdev->dev.parent = &omap_device_parent;
819 pdev->dev.pm_domain = &omap_device_pm_domain; 812 pdev->dev.pm_domain = &omap_device_pm_domain;
820 return platform_device_add(pdev); 813 return platform_device_add(pdev);
821} 814}
@@ -1124,11 +1117,6 @@ int omap_device_enable_clocks(struct omap_device *od)
1124 return 0; 1117 return 0;
1125} 1118}
1126 1119
1127struct device omap_device_parent = {
1128 .init_name = "omap",
1129 .parent = &platform_bus,
1130};
1131
1132static struct notifier_block platform_nb = { 1120static struct notifier_block platform_nb = {
1133 .notifier_call = _omap_device_notifier_call, 1121 .notifier_call = _omap_device_notifier_call,
1134}; 1122};
@@ -1136,6 +1124,6 @@ static struct notifier_block platform_nb = {
1136static int __init omap_device_init(void) 1124static int __init omap_device_init(void)
1137{ 1125{
1138 bus_register_notifier(&platform_bus_type, &platform_nb); 1126 bus_register_notifier(&platform_bus_type, &platform_nb);
1139 return device_register(&omap_device_parent); 1127 return 0;
1140} 1128}
1141core_initcall(omap_device_init); 1129core_initcall(omap_device_init);