diff options
Diffstat (limited to 'arch/arm/mach-omap2/powerdomain.c')
-rw-r--r-- | arch/arm/mach-omap2/powerdomain.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/powerdomain.c b/arch/arm/mach-omap2/powerdomain.c index 4a91d38d7b1a..f9f0bca1926a 100644 --- a/arch/arm/mach-omap2/powerdomain.c +++ b/arch/arm/mach-omap2/powerdomain.c | |||
@@ -980,6 +980,34 @@ bool pwrdm_has_hdwr_sar(struct powerdomain *pwrdm) | |||
980 | } | 980 | } |
981 | 981 | ||
982 | /** | 982 | /** |
983 | * pwrdm_set_lowpwrstchange - Request a low power state change | ||
984 | * @pwrdm: struct powerdomain * | ||
985 | * | ||
986 | * Allows a powerdomain to transtion to a lower power sleep state | ||
987 | * from an existing sleep state without waking up the powerdomain. | ||
988 | * Returns -EINVAL if the powerdomain pointer is null or if the | ||
989 | * powerdomain does not support LOWPOWERSTATECHANGE, or returns 0 | ||
990 | * upon success. | ||
991 | */ | ||
992 | int pwrdm_set_lowpwrstchange(struct powerdomain *pwrdm) | ||
993 | { | ||
994 | if (!pwrdm) | ||
995 | return -EINVAL; | ||
996 | |||
997 | if (!(pwrdm->flags & PWRDM_HAS_LOWPOWERSTATECHANGE)) | ||
998 | return -EINVAL; | ||
999 | |||
1000 | pr_debug("powerdomain: %s: setting LOWPOWERSTATECHANGE bit\n", | ||
1001 | pwrdm->name); | ||
1002 | |||
1003 | prm_rmw_mod_reg_bits(OMAP4430_LOWPOWERSTATECHANGE_MASK, | ||
1004 | (1 << OMAP4430_LOWPOWERSTATECHANGE_SHIFT), | ||
1005 | pwrdm->prcm_offs, pwrstctrl_reg_offs); | ||
1006 | |||
1007 | return 0; | ||
1008 | } | ||
1009 | |||
1010 | /** | ||
983 | * pwrdm_wait_transition - wait for powerdomain power transition to finish | 1011 | * pwrdm_wait_transition - wait for powerdomain power transition to finish |
984 | * @pwrdm: struct powerdomain * to wait for | 1012 | * @pwrdm: struct powerdomain * to wait for |
985 | * | 1013 | * |