From 4d70ada1ad4a4f5773455931f0a5241599f86c5f Mon Sep 17 00:00:00 2001 From: Soomin Kim Date: Thu, 28 Jul 2016 14:52:04 +0900 Subject: [PATCH] [COMMON] thermal: samsung: Parse thermal sensor type 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 --- drivers/thermal/samsung/exynos_tmu.c | 3 +++ drivers/thermal/samsung/exynos_tmu.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index c9faf776cc64..146bf82ed7db 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -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; } diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index c6d378c4d76c..3f95a976ec7e 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h @@ -62,6 +62,7 @@ struct exynos_tmu_platform_data { u8 default_temp_offset; enum soc_type type; + u32 sensor_type; u32 cal_type; }; -- 2.20.1