diff options
author | Tero Kristo <tero.kristo@nokia.com> | 2008-11-26 05:26:24 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-09-02 18:08:25 -0400 |
commit | 68d4778c701b7e22ddfd64e3afb6628c92718ad2 (patch) | |
tree | c61556bd625a4c62f4429d00088f7abbae2d5a52 /arch/arm/mach-omap2/pm34xx.c | |
parent | 2811d6b3237c9b77007a6b2b10ee5b576da0574e (diff) |
OMAP: PM: Added suspend target state control to debugfs for OMAP3
Target state can be read / programmed via files under:
[debugfs]/pm_debug/[pwrdm]/suspend
Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-omap2/pm34xx.c')
-rw-r--r-- | arch/arm/mach-omap2/pm34xx.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c index 331dfca93ed5..26f2aca9abe8 100644 --- a/arch/arm/mach-omap2/pm34xx.c +++ b/arch/arm/mach-omap2/pm34xx.c | |||
@@ -664,6 +664,30 @@ static void __init prcm_setup_regs(void) | |||
664 | omap3_d2d_idle(); | 664 | omap3_d2d_idle(); |
665 | } | 665 | } |
666 | 666 | ||
667 | int omap3_pm_get_suspend_state(struct powerdomain *pwrdm) | ||
668 | { | ||
669 | struct power_state *pwrst; | ||
670 | |||
671 | list_for_each_entry(pwrst, &pwrst_list, node) { | ||
672 | if (pwrst->pwrdm == pwrdm) | ||
673 | return pwrst->next_state; | ||
674 | } | ||
675 | return -EINVAL; | ||
676 | } | ||
677 | |||
678 | int omap3_pm_set_suspend_state(struct powerdomain *pwrdm, int state) | ||
679 | { | ||
680 | struct power_state *pwrst; | ||
681 | |||
682 | list_for_each_entry(pwrst, &pwrst_list, node) { | ||
683 | if (pwrst->pwrdm == pwrdm) { | ||
684 | pwrst->next_state = state; | ||
685 | return 0; | ||
686 | } | ||
687 | } | ||
688 | return -EINVAL; | ||
689 | } | ||
690 | |||
667 | static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) | 691 | static int __init pwrdms_setup(struct powerdomain *pwrdm, void *unused) |
668 | { | 692 | { |
669 | struct power_state *pwrst; | 693 | struct power_state *pwrst; |