diff options
Diffstat (limited to 'arch/arm/mach-omap2/omap_device.c')
-rw-r--r-- | arch/arm/mach-omap2/omap_device.c | 24 |
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 53f0735817bb..e0a398cf28d8 100644 --- a/arch/arm/mach-omap2/omap_device.c +++ b/arch/arm/mach-omap2/omap_device.c | |||
@@ -183,6 +183,10 @@ static int omap_device_build_from_dt(struct platform_device *pdev) | |||
183 | odbfd_exit1: | 183 | odbfd_exit1: |
184 | kfree(hwmods); | 184 | kfree(hwmods); |
185 | odbfd_exit: | 185 | odbfd_exit: |
186 | /* if data/we are at fault.. load up a fail handler */ | ||
187 | if (ret) | ||
188 | pdev->dev.pm_domain = &omap_device_fail_pm_domain; | ||
189 | |||
186 | return ret; | 190 | return ret; |
187 | } | 191 | } |
188 | 192 | ||
@@ -604,6 +608,19 @@ static int _od_runtime_resume(struct device *dev) | |||
604 | 608 | ||
605 | return pm_generic_runtime_resume(dev); | 609 | return pm_generic_runtime_resume(dev); |
606 | } | 610 | } |
611 | |||
612 | static int _od_fail_runtime_suspend(struct device *dev) | ||
613 | { | ||
614 | dev_warn(dev, "%s: FIXME: missing hwmod/omap_dev info\n", __func__); | ||
615 | return -ENODEV; | ||
616 | } | ||
617 | |||
618 | static int _od_fail_runtime_resume(struct device *dev) | ||
619 | { | ||
620 | dev_warn(dev, "%s: FIXME: missing hwmod/omap_dev info\n", __func__); | ||
621 | return -ENODEV; | ||
622 | } | ||
623 | |||
607 | #endif | 624 | #endif |
608 | 625 | ||
609 | #ifdef CONFIG_SUSPEND | 626 | #ifdef CONFIG_SUSPEND |
@@ -657,6 +674,13 @@ static int _od_resume_noirq(struct device *dev) | |||
657 | #define _od_resume_noirq NULL | 674 | #define _od_resume_noirq NULL |
658 | #endif | 675 | #endif |
659 | 676 | ||
677 | struct dev_pm_domain omap_device_fail_pm_domain = { | ||
678 | .ops = { | ||
679 | SET_RUNTIME_PM_OPS(_od_fail_runtime_suspend, | ||
680 | _od_fail_runtime_resume, NULL) | ||
681 | } | ||
682 | }; | ||
683 | |||
660 | struct dev_pm_domain omap_device_pm_domain = { | 684 | struct dev_pm_domain omap_device_pm_domain = { |
661 | .ops = { | 685 | .ops = { |
662 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, | 686 | SET_RUNTIME_PM_OPS(_od_runtime_suspend, _od_runtime_resume, |