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

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

drivers: thermal-core: Queue thermal zone update post suspend



Thermal zone update for all the cores will happen in the post suspend
notifier context. This process can take a variable amount of time
depending upon the sensors that are read as a part of this.

To avoid delaying the system resume, queue the thermal zone device
update from the resume context.

Change-Id: Ibd563065b1486c3ecbbbf9013b909d5fc661be24
Signed-off-by: default avatarRam Chandrasekar <rkumbako@codeaurora.org>
parent c64569d3
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -2587,9 +2587,11 @@ static int thermal_pm_notify(struct notifier_block *nb,
	case PM_POST_SUSPEND:
		atomic_set(&in_suspend, 0);
		list_for_each_entry(tz, &thermal_tz_list, node) {
			mutex_lock(&tz->lock);
			thermal_zone_device_reset(tz);
			thermal_zone_device_update(tz,
						   THERMAL_EVENT_UNSPECIFIED);
			mod_delayed_work(system_freezable_power_efficient_wq,
						&tz->poll_queue, 0);
			mutex_unlock(&tz->lock);
		}
		break;
	default: