Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0fad2540 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

msm: lpm-levels: use correct enums for level modes



struct lpm_cluster_level's mode is an array of enum representing
SPM low power modes. The current code compares the values in it
with enum msm_pm_sleep_mode which represents cpu sleep modes.

Fix this by comparing mode with SPM low power modes.

Change-Id: I49ae054298f4f8f71a4a4476c541db3ec69935d0
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent 2a4b1904
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -472,9 +472,10 @@ static int cluster_configure(struct lpm_cluster *cluster, int idx,
		/*
		 * Notify that the cluster is entering a low power mode
		 */
		if (level->mode[i] == MSM_PM_SLEEP_MODE_POWER_COLLAPSE)
		if (level->mode[i] == MSM_SPM_MODE_POWER_COLLAPSE) {
			cpu_cluster_pm_enter();
		}
	}
	if (level->notify_rpm) {
		struct cpumask nextcpu;
		uint32_t us;
@@ -614,9 +615,10 @@ static void cluster_unprepare(struct lpm_cluster *cluster,
		BUG_ON(ret);

		if (cluster->levels[last_level].mode[i] ==
				MSM_PM_SLEEP_MODE_POWER_COLLAPSE)
				MSM_SPM_MODE_POWER_COLLAPSE) {
			cpu_cluster_pm_exit();
		}
	}
unlock_return:
	spin_unlock(&cluster->sync_lock);
	cluster_unprepare(cluster->parent, &cluster->child_cpus,