[COMMON] thermal: samsung: Parse thermal sensor type
authorSoomin Kim <sm8326.kim@samsung.com>
Thu, 28 Jul 2016 05:52:04 +0000 (14:52 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:13:12 +0000 (17:13 +0900)
Some control value should be set according to sensor type.
So, define the member variable to exynos_tmu_platform_data
sturct and parse it from DT.

Change-Id: Ic0ab32c1c5bc37ad8c86909a1beb2d53504d88d3
Signed-off-by: Soomin Kim <sm8326.kim@samsung.com>
drivers/thermal/samsung/exynos_tmu.c
drivers/thermal/samsung/exynos_tmu.h

index c9faf776cc645780dd6f83fe3aed6c1c2730a8ac..146bf82ed7dbdb6b8a3471b9b5340e4081996e82 100644 (file)
@@ -956,6 +956,9 @@ static int exynos_of_sensor_conf(struct device_node *np,
 
        of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type);
 
+       if (of_property_read_u32(np, "samsung,tmu_sensor_type", &pdata->sensor_type))
+               pr_err("%s: failed to get thermel sensor type\n", __func__);
+
        of_node_put(np);
        return 0;
 }
index c6d378c4d76ceeab74593c30cd8a452af9beea57..3f95a976ec7e948da3cd17b3d09b888805b68bea 100644 (file)
@@ -62,6 +62,7 @@ struct exynos_tmu_platform_data {
        u8 default_temp_offset;
 
        enum soc_type type;
+       u32 sensor_type;
        u32 cal_type;
 };