Commits
zhang sanshan committed 41e349daca5
MA-16686 [Android_8QM_MEK]Suspend: System can't enter deep suspend. (100%) If cpu have one cluster, cpu0 is online when enter suspend. system do not call cpufreq_cooling_unregister when last cpu enter offline. If cpu have two cluster, cpu0 is in the first cluster and the last cpu(cpu5 for imx8qm) for second cluster enter suspend, it will call cpufreq_cooling_unregister. policy_is_inactive for cpu1-4 is false while the value is true for cpu5. if system call thermal_cooling_device_unregister in process of suspend, it will active wakeupsource "NETLINK" as below which cause system can't enter suspend. thermal_cooling_device_unregister -> device_del -> kobject_uevent_env -> netlink_broadcast_filtered sock_def_readable -> __pm_stay_awake -> wakeup_source_report_event this patch do below refine for cpufreq cooling devices when suspend/resume. 1. do not register again if cooling device have been registered. 2. remove the unregister process of cooling device when suspend. Change-Id: Ib9ed3281866e9cd002fc1e1492428aa41001ed2d Signed-off-by: zhang sanshan <pete.zhang@nxp.com>