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

Commit cbd1a403 authored by Ram Chandrasekar's avatar Ram Chandrasekar
Browse files

drivers: thermal: Skip cpu notifier registration for platform devices



Platform CPU cooling device will directly vote to the hardware to
achieve thermal CPU cooling. So there is no need for updating the
cpufreq policy max and min when a new frequency switch happens.

Remove the cpufreq notifier registration from CPU cooling device, when
platform CPU cooling device is available.

Change-Id: I3719d70e8cf1e10349f07409889d8b1bc1bd4456
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent ebac0555
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1105,7 +1105,7 @@ __cpufreq_cooling_register(struct device_node *np,
	mutex_unlock(&cooling_list_lock);

	/* Register the notifier for first cpufreq cooling device */
	if (!cpufreq_dev_count++)
	if (!cpufreq_dev_count++ && !cpufreq_dev->plat_ops)
		cpufreq_register_notifier(&thermal_cpufreq_notifier_block,
					  CPUFREQ_POLICY_NOTIFIER);
	if (!cpuhp_registered) {
@@ -1285,7 +1285,7 @@ void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev)

	/* Unregister the notifier for the last cpufreq cooling device */
	mutex_lock(&cooling_cpufreq_lock);
	if (!--cpufreq_dev_count)
	if (!--cpufreq_dev_count && !cpufreq_dev->plat_ops)
		cpufreq_unregister_notifier(&thermal_cpufreq_notifier_block,
					    CPUFREQ_POLICY_NOTIFIER);