]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - glsdk/meta-ti-glsdk.git/blob - recipes-kernel/linux/linux-3.0/for_3.1/pm-misc/0002-OMAP3-SR-enable-disable-SR-only-on-need.patch
linux 3.0: initial recipe that will track 3.0rc till 3.0 final
[glsdk/meta-ti-glsdk.git] / recipes-kernel / linux / linux-3.0 / for_3.1 / pm-misc / 0002-OMAP3-SR-enable-disable-SR-only-on-need.patch
1 From 2c555d8ee3544326033cb3b0ead6c0eb48cb4919 Mon Sep 17 00:00:00 2001
2 From: Nishanth Menon <nm@ti.com>
3 Date: Mon, 14 Feb 2011 21:14:17 +0530
4 Subject: [PATCH 2/7] OMAP3+: SR: enable/disable SR only on need
6 Since we already know the state of the autocomp enablement, we can
7 see if the requested state is different from the current state and
8 enable/disable SR only on the need basis.
10 Signed-off-by: Nishanth Menon <nm@ti.com>
11 Signed-off-by: Kevin Hilman <khilman@ti.com>
12 ---
13  arch/arm/mach-omap2/smartreflex.c |   11 +++++++----
14  1 files changed, 7 insertions(+), 4 deletions(-)
16 diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
17 index 998b57f..a4b4319 100644
18 --- a/arch/arm/mach-omap2/smartreflex.c
19 +++ b/arch/arm/mach-omap2/smartreflex.c
20 @@ -809,10 +809,13 @@ static int omap_sr_autocomp_store(void *data, u64 val)
21                 return -EINVAL;
22         }
23  
24 -       if (!val)
25 -               sr_stop_vddautocomp(sr_info);
26 -       else
27 -               sr_start_vddautocomp(sr_info);
28 +       /* control enable/disable only if there is a delta in value */
29 +       if (sr_info->autocomp_active != val) {
30 +               if (!val)
31 +                       sr_stop_vddautocomp(sr_info);
32 +               else
33 +                       sr_start_vddautocomp(sr_info);
34 +       }
35  
36         return 0;
37  }
38 -- 
39 1.6.6.1