diff options
author | Nishanth Menon <nm@ti.com> | 2011-02-14 10:44:17 -0500 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2011-06-20 17:12:31 -0400 |
commit | ac77a6f7a9352d10c4942c24c8fbf61ee54ea196 (patch) | |
tree | 5d8787b8564c3ede939bfdd12fb54fba1ea76a8c /arch/arm/mach-omap2/smartreflex.c | |
parent | 1279ba5916f6635610c639186be84afaef831fb3 (diff) |
OMAP3+: SR: enable/disable SR only on need
Since we already know the state of the autocomp enablement, we can
see if the requested state is different from the current state and
enable/disable SR only on the need basis.
Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'arch/arm/mach-omap2/smartreflex.c')
-rw-r--r-- | arch/arm/mach-omap2/smartreflex.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c index 616ef62b3fa5..3bd9facd8e0d 100644 --- a/arch/arm/mach-omap2/smartreflex.c +++ b/arch/arm/mach-omap2/smartreflex.c | |||
@@ -807,10 +807,13 @@ static int omap_sr_autocomp_store(void *data, u64 val) | |||
807 | return -EINVAL; | 807 | return -EINVAL; |
808 | } | 808 | } |
809 | 809 | ||
810 | if (!val) | 810 | /* control enable/disable only if there is a delta in value */ |
811 | sr_stop_vddautocomp(sr_info); | 811 | if (sr_info->autocomp_active != val) { |
812 | else | 812 | if (!val) |
813 | sr_start_vddautocomp(sr_info); | 813 | sr_stop_vddautocomp(sr_info); |
814 | else | ||
815 | sr_start_vddautocomp(sr_info); | ||
816 | } | ||
814 | 817 | ||
815 | return 0; | 818 | return 0; |
816 | } | 819 | } |