aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/omap_device.c')
-rw-r--r--arch/arm/mach-omap2/omap_device.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/omap_device.c b/arch/arm/mach-omap2/omap_device.c
index 828f538b1c4e..01ef59def44b 100644
--- a/arch/arm/mach-omap2/omap_device.c
+++ b/arch/arm/mach-omap2/omap_device.c
@@ -184,6 +184,10 @@ static int omap_device_build_from_dt(struct platform_device *pdev)
184odbfd_exit1: 184odbfd_exit1:
185 kfree(hwmods); 185 kfree(hwmods);
186odbfd_exit: 186odbfd_exit:
187 /* if data/we are at fault.. load up a fail handler */
188 if (ret)
189 pdev->dev.pm_domain = &omap_device_fail_pm_domain;
190
187 return ret; 191 return ret;
188} 192}
189 193
@@ -606,6 +610,19 @@ static int _od_runtime_resume(struct device *dev)
606 610
607 return pm_generic_runtime_resume(dev); 611 return pm_generic_runtime_resume(dev);
608} 612}
613
614static int _od_fail_runtime_suspend(struct device *dev)
615{
616 dev_warn(dev, "%s: FIXME: missing hwmod/omap_dev info\n", __func__);
617 return -ENODEV;
618}
619
620static int _od_fail_runtime_resume(struct device *dev)
621{
622 dev_warn(dev, "%s: FIXME: missing hwmod/omap_dev info\n", __func__);
623 return -ENODEV;
624}
625
609#endif 626#endif
610 627
611#ifdef CONFIG_SUSPEND 628#ifdef CONFIG_SUSPEND
@@ -659,6 +676,13 @@ static int _od_resume_noirq(struct device *dev)
659#define _od_resume_noirq NULL 676#define _od_resume_noirq NULL
660#endif 677#endif
661 678
679struct dev_pm_domain omap_device_fail_pm_domain = {
680 .ops = {
681 SET_RUNTIME_PM_OPS(_od_fail_runtime_suspend,
682 _od_fail_runtime_resume, NULL)
683 }
684};
685
662struct dev_pm_domain omap_device_pm_domain = { 686struct dev_pm_domain omap_device_pm_domain = {
663 .ops = { 687 .ops = {
664 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, 688 SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume,