[COMMON] thermal: samsung: logging exynos_ss_thermal
authorHyeonseong Gil <hs.gil@samsung.com>
Fri, 22 Jul 2016 08:56:51 +0000 (17:56 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:13:05 +0000 (17:13 +0900)
Logging temperature and cpu max frequency on exynos_ss

Resolved migration conflicts from kernel 4.9 to 4.14.
- rename cpufreq_device -> cpufreq_cdev
- rename cool_dev -> cdev

Change-Id: If30e0780800f5ec3a56684750ab6c3c88dabae91
Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
drivers/thermal/cpu_cooling.c
drivers/thermal/samsung/exynos_tmu.c

index 0a3880b59d6b009ec037ac95b222b3ec36358aca..796ab1ca3ea5bdc0c24165e646d84e8391e8bccd 100644 (file)
@@ -31,6 +31,7 @@
 #include <linux/slab.h>
 #include <linux/cpu.h>
 #include <linux/cpu_cooling.h>
+#include <linux/exynos-ss.h>
 
 #include <trace/events/thermal.h>
 
@@ -149,8 +150,10 @@ static int cpufreq_thermal_notifier(struct notifier_block *nb,
                 */
                clipped_freq = cpufreq_cdev->clipped_freq;
 
-               if (policy->max > clipped_freq)
+               if (policy->max > clipped_freq) {
                        cpufreq_verify_within_limits(policy, 0, clipped_freq);
+                       exynos_ss_thermal(NULL, 0, cpufreq_cdev->cdev->type, clipped_freq);
+               }
                break;
        }
        mutex_unlock(&cooling_list_lock);
index 74ab5ef687f387b8cc2157f63e3d5dca16bd1313..eb5f482ffd47208fa0680ab8748b393a38682a3c 100644 (file)
@@ -41,6 +41,7 @@
 #include <linux/gpu_cooling.h>
 #include <linux/isp_cooling.h>
 #include <linux/slab.h>
+#include <linux/exynos-ss.h>
 #include <soc/samsung/tmu.h>
 #include <soc/samsung/ect_parser.h>
 
@@ -660,6 +661,7 @@ static int exynos_get_temp(void *p, int *temp)
 
        mutex_unlock(&thermal_suspend_lock);
 
+       exynos_ss_thermal(data->pdata, *temp / 1000, data->tmu_name, 0);
        return 0;
 }