cpuquiet: Account for the corner case frequency when setting state
Sai Charan Gurrappadi [Thu, 5 Jul 2012 17:47:23 +0000 (10:47 -0700)]
Now consider frequency greater than or equal to idle_top_freq as UP

Change-Id: I1332d46d1e42a00b3b31897b158eaf4ccfbaf8f5
Signed-off-by: Sai Charan Gurrappadi <sgurrappadi@nvidia.com>
Reviewed-on: http://git-master/r/113678
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Aleksandr Frid <afrid@nvidia.com>
Reviewed-by: Peter De Schrijver <pdeschrijver@nvidia.com>
Reviewed-by: Peter Boonstoppel <pboonstoppel@nvidia.com>
Reviewed-by: Yu-Huan Hsu <yhsu@nvidia.com>
GVS: Gerrit_Virtual_Submit

drivers/cpuquiet/governors/balanced.c

index da98362..f0d2e03 100644 (file)
@@ -282,7 +282,7 @@ static int balanced_cpufreq_transition(struct notifier_block *nb,
 
                switch (balanced_state) {
                case IDLE:
-                       if (cpu_freq > idle_top_freq) {
+                       if (cpu_freq >= idle_top_freq) {
                                balanced_state = UP;
                                queue_delayed_work(
                                        balanced_wq, &balanced_work, up_delay);
@@ -296,7 +296,7 @@ static int balanced_cpufreq_transition(struct notifier_block *nb,
                        }
                        break;
                case DOWN:
-                       if (cpu_freq > idle_top_freq) {
+                       if (cpu_freq >= idle_top_freq) {
                                balanced_state = UP;
                                queue_delayed_work(
                                        balanced_wq, &balanced_work, up_delay);
@@ -347,6 +347,7 @@ static struct attribute *balanced_attributes[] = {
        &idle_top_freq_attr.attr,
        &up_delay_attr.attr,
        &down_delay_attr.attr,
+       &load_sample_rate_attr.attr,
        NULL,
 };