All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/14] thermal: exynos: pending fixes and cleanups
       [not found] <CGME20180416101225epcas2p42e345645d822cd869dbdb449becf1c7a@epcas2p4.samsung.com>
@ 2018-04-16 10:11 ` Bartlomiej Zolnierkiewicz
       [not found]   ` <CGME20180416101339epcas2p171d462b70a85a6fff3bb939fca6d469d@epcas2p1.samsung.com>
                     ` (13 more replies)
  0 siblings, 14 replies; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:11 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

Hi Eduardo,

Per your request (https://marc.info/?l=linux-pm&m=152378232213070&w=2)
this patchset contains pending Exynos thermal driver fixes and cleanups.

It is based on:
- "[PATCH v3] thermal: exynos: Reading temperature makes sense only
  when TMU is turned on" from Marek Szyprowski
  (https://www.spinics.net/lists/linux-samsung-soc/msg62248.html)
- "[PATCH] thermal: exynos: Propagate error value from tmu_read()"
  from Marek Szyprowski
  (https://www.spinics.net/lists/linux-samsung-soc/msg62252.html)
- "[PATCH] thermal: exynos: Read soc_type from match data" from
  Maciej Purski
  (https://www.spinics.net/lists/linux-samsung-soc/msg62138.html)
- "[PATCH 00/12] thermal: exynos: sanitize DeviceTree support"
  (https://www.spinics.net/lists/linux-samsung-soc/msg62335.html)

Changes:
- fix warnings in "thermal: exynos: remove parsing of
  samsung,tmu_default_temp_offset property" patch
  (in a way suggested by Daniel Lezcano)
- split dts changes on ARM & ARM64 parts
  (as requested by Krzysztof Kozlowski)
- drop "dt-bindings: thermal: remove no longer needed samsung
  thermal properties" patch
  (the patch is already present in linux-soc-thermal-tree)
- drop "thermal: exynos: remove separate thermal_exynos.h header
  file" patch
  (to be resend once dts changes are merged)

Tested on Exynos4210 based Trats board and Exynos5422 based Odroid-XU3
Lite board.

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics


Bartlomiej Zolnierkiewicz (11):
  thermal: exynos: remove unused "type" field from struct
    exynos_tmu_platform_data
  thermal: exynos: remove parsing of samsung,tmu_default_temp_offset
    property
  thermal: exynos: remove parsing of
    samsung,tmu_[first,second]_point_trim properties
  thermal: exynos: remove parsing of samsung,tmu_noise_cancel_mode
    property
  thermal: exynos: remove parsing of samsung,tmu[_min,_max]_efuse_value
    properties
  thermal: exynos: remove parsing of samsung,tmu_reference_voltage
    property
  thermal: exynos: remove parsing of samsung,tmu_gain property
  thermal: exynos: remove parsing of samsung,tmu_cal_type property
  thermal: exynos: remove separate exynos_tmu.h header file
  ARM: dts: exynos: remove no longer needed samsung thermal properties
  arm64: dts: exynos: remove no longer needed samsung thermal properties

Maciej Purski (1):
  thermal: exynos: Read soc_type from match data

Marek Szyprowski (2):
  thermal: exynos: Reading temperature makes sense only when TMU is
    turned on
  thermal: exynos: Propagate error value from tmu_read()

 arch/arm/boot/dts/exynos3250.dtsi                  |   2 +-
 arch/arm/boot/dts/exynos4.dtsi                     |   2 +-
 arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi  |  20 --
 arch/arm/boot/dts/exynos5250.dtsi                  |   2 +-
 arch/arm/boot/dts/exynos5410.dtsi                  |   8 +-
 arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi  |  21 --
 arch/arm/boot/dts/exynos5420.dtsi                  |  10 +-
 arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi  |  20 --
 arch/arm/boot/dts/exynos5440.dtsi                  |   6 +-
 .../dts/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi |  20 --
 .../dts/exynos/exynos5433-tmu-sensor-conf.dtsi     |  19 --
 arch/arm64/boot/dts/exynos/exynos5433.dtsi         |  10 +-
 .../boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi   |  21 --
 arch/arm64/boot/dts/exynos/exynos7.dtsi            |   2 +-
 drivers/thermal/samsung/exynos_tmu.c               | 294 ++++++++++-----------
 drivers/thermal/samsung/exynos_tmu.h               |  75 ------
 16 files changed, 165 insertions(+), 367 deletions(-)
 delete mode 100644 arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi
 delete mode 100644 arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi
 delete mode 100644 arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi
 delete mode 100644 arch/arm64/boot/dts/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi
 delete mode 100644 arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi
 delete mode 100644 arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi
 delete mode 100644 drivers/thermal/samsung/exynos_tmu.h

-- 
1.9.1

^ permalink raw reply	[flat|nested] 43+ messages in thread

* [PATCH 01/14] thermal: exynos: Reading temperature makes sense only when TMU is turned on
       [not found]   ` <CGME20180416101339epcas2p171d462b70a85a6fff3bb939fca6d469d@epcas2p1.samsung.com>
@ 2018-04-16 10:11     ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:06       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:11 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie,
	Marek Szyprowski

From: Marek Szyprowski <m.szyprowski@samsung.com>

When thermal sensor is not yet enabled, reading temperature might return
random value. This might even result in stopping system booting when such
temperature is higher than the critical value. Fix this by checking if TMU
has been actually enabled before reading the temperature.

This change fixes booting of Exynos4210-based board with TMU enabled (for
example Samsung Trats board), which was broken since v4.4 kernel release.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Fixes: 9e4249b40340 ("thermal: exynos: Fix first temperature read after registering sensor")
CC: stable@vger.kernel.org # v4.6+
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index ed805c7..986cbd0 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -185,6 +185,7 @@
  * @regulator: pointer to the TMU regulator structure.
  * @reg_conf: pointer to structure to register with core thermal.
  * @ntrip: number of supported trip points.
+ * @enabled: current status of TMU device
  * @tmu_initialize: SoC specific TMU initialization method
  * @tmu_control: SoC specific TMU control method
  * @tmu_read: SoC specific TMU temperature read method
@@ -205,6 +206,7 @@ struct exynos_tmu_data {
 	struct regulator *regulator;
 	struct thermal_zone_device *tzd;
 	unsigned int ntrip;
+	bool enabled;
 
 	int (*tmu_initialize)(struct platform_device *pdev);
 	void (*tmu_control)(struct platform_device *pdev, bool on);
@@ -398,6 +400,7 @@ static void exynos_tmu_control(struct platform_device *pdev, bool on)
 	mutex_lock(&data->lock);
 	clk_enable(data->clk);
 	data->tmu_control(pdev, on);
+	data->enabled = on;
 	clk_disable(data->clk);
 	mutex_unlock(&data->lock);
 }
@@ -890,7 +893,7 @@ static int exynos_get_temp(void *p, int *temp)
 {
 	struct exynos_tmu_data *data = p;
 
-	if (!data || !data->tmu_read)
+	if (!data || !data->tmu_read || !data->enabled)
 		return -EINVAL;
 
 	mutex_lock(&data->lock);
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 02/14] thermal: exynos: Propagate error value from tmu_read()
       [not found]   ` <CGME20180416101350epcas1p46d9415458ec463afb2a071a9f765f0ed@epcas1p4.samsung.com>
@ 2018-04-16 10:11     ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:16       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:11 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie,
	Marek Szyprowski

From: Marek Szyprowski <m.szyprowski@samsung.com>

tmu_read() in case of Exynos4210 might return error for out of bound
values. Current code ignores such value, what leads to reporting critical
temperature value. Add proper error code propagation to exynos_get_temp()
function.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
CC: stable@vger.kernel.org # v4.6+
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 986cbd0..ac83f72 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -892,6 +892,7 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on)
 static int exynos_get_temp(void *p, int *temp)
 {
 	struct exynos_tmu_data *data = p;
+	int value, ret = 0;
 
 	if (!data || !data->tmu_read || !data->enabled)
 		return -EINVAL;
@@ -899,12 +900,16 @@ static int exynos_get_temp(void *p, int *temp)
 	mutex_lock(&data->lock);
 	clk_enable(data->clk);
 
-	*temp = code_to_temp(data, data->tmu_read(data)) * MCELSIUS;
+	value = data->tmu_read(data);
+	if (value < 0)
+		ret = value;
+	else
+		*temp = code_to_temp(data, value) * MCELSIUS;
 
 	clk_disable(data->clk);
 	mutex_unlock(&data->lock);
 
-	return 0;
+	return ret;
 }
 
 #ifdef CONFIG_THERMAL_EMULATION
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 03/14] thermal: exynos: Read soc_type from match data
       [not found]   ` <CGME20180416101353epcas2p1793d6079b1a1fbb8b4841ee562b22155@epcas2p1.samsung.com>
@ 2018-04-16 10:11     ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:19       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:11 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie,
	Maciej Purski

From: Maciej Purski <m.purski@samsung.com>

Device context's field data->soc is currently obtained by comparing
of_compatible's. Provide soc_type as .data field in device's match
table, as it is done in most drivers.

Signed-off-by: Maciej Purski <m.purski@samsung.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 74 +++++++++++++++++-------------------
 1 file changed, 34 insertions(+), 40 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index ac83f72..d7a3c3c 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -29,7 +29,7 @@
 #include <linux/io.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
-#include <linux/of.h>
+#include <linux/of_device.h>
 #include <linux/of_address.h>
 #include <linux/of_irq.h>
 #include <linux/platform_device.h>
@@ -1105,47 +1105,41 @@ static irqreturn_t exynos_tmu_irq(int irq, void *id)
 }
 
 static const struct of_device_id exynos_tmu_match[] = {
-	{ .compatible = "samsung,exynos3250-tmu", },
-	{ .compatible = "samsung,exynos4210-tmu", },
-	{ .compatible = "samsung,exynos4412-tmu", },
-	{ .compatible = "samsung,exynos5250-tmu", },
-	{ .compatible = "samsung,exynos5260-tmu", },
-	{ .compatible = "samsung,exynos5420-tmu", },
-	{ .compatible = "samsung,exynos5420-tmu-ext-triminfo", },
-	{ .compatible = "samsung,exynos5433-tmu", },
-	{ .compatible = "samsung,exynos5440-tmu", },
-	{ .compatible = "samsung,exynos7-tmu", },
-	{ /* sentinel */ },
+	{
+		.compatible = "samsung,exynos3250-tmu",
+		.data = (const void *)SOC_ARCH_EXYNOS3250,
+	}, {
+		.compatible = "samsung,exynos4210-tmu",
+		.data = (const void *)SOC_ARCH_EXYNOS4210,
+	}, {
+		.compatible = "samsung,exynos4412-tmu",
+		.data = (const void *)SOC_ARCH_EXYNOS4412,
+	}, {
+		.compatible = "samsung,exynos5250-tmu",
+		.data = (const void *)SOC_ARCH_EXYNOS5250,
+	}, {
+		.compatible = "samsung,exynos5260-tmu",
+		.data = (const void *)SOC_ARCH_EXYNOS5260,
+	}, {
+		.compatible = "samsung,exynos5420-tmu",
+		.data = (const void *)SOC_ARCH_EXYNOS5420,
+	}, {
+		.compatible = "samsung,exynos5420-tmu-ext-triminfo",
+		.data = (const void *)SOC_ARCH_EXYNOS5420_TRIMINFO,
+	}, {
+		.compatible = "samsung,exynos5433-tmu",
+		.data = (const void *)SOC_ARCH_EXYNOS5433,
+	}, {
+		.compatible = "samsung,exynos5440-tmu",
+		.data = (const void *)SOC_ARCH_EXYNOS5440,
+	}, {
+		.compatible = "samsung,exynos7-tmu",
+		.data = (const void *)SOC_ARCH_EXYNOS7,
+	},
+	{ },
 };
 MODULE_DEVICE_TABLE(of, exynos_tmu_match);
 
-static int exynos_of_get_soc_type(struct device_node *np)
-{
-	if (of_device_is_compatible(np, "samsung,exynos3250-tmu"))
-		return SOC_ARCH_EXYNOS3250;
-	else if (of_device_is_compatible(np, "samsung,exynos4210-tmu"))
-		return SOC_ARCH_EXYNOS4210;
-	else if (of_device_is_compatible(np, "samsung,exynos4412-tmu"))
-		return SOC_ARCH_EXYNOS4412;
-	else if (of_device_is_compatible(np, "samsung,exynos5250-tmu"))
-		return SOC_ARCH_EXYNOS5250;
-	else if (of_device_is_compatible(np, "samsung,exynos5260-tmu"))
-		return SOC_ARCH_EXYNOS5260;
-	else if (of_device_is_compatible(np, "samsung,exynos5420-tmu"))
-		return SOC_ARCH_EXYNOS5420;
-	else if (of_device_is_compatible(np,
-					 "samsung,exynos5420-tmu-ext-triminfo"))
-		return SOC_ARCH_EXYNOS5420_TRIMINFO;
-	else if (of_device_is_compatible(np, "samsung,exynos5433-tmu"))
-		return SOC_ARCH_EXYNOS5433;
-	else if (of_device_is_compatible(np, "samsung,exynos5440-tmu"))
-		return SOC_ARCH_EXYNOS5440;
-	else if (of_device_is_compatible(np, "samsung,exynos7-tmu"))
-		return SOC_ARCH_EXYNOS7;
-
-	return -EINVAL;
-}
-
 static int exynos_of_sensor_conf(struct device_node *np,
 				 struct exynos_tmu_platform_data *pdata)
 {
@@ -1219,7 +1213,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 
 	exynos_of_sensor_conf(pdev->dev.of_node, pdata);
 	data->pdata = pdata;
-	data->soc = exynos_of_get_soc_type(pdev->dev.of_node);
+	data->soc = (enum soc_type)of_device_get_match_data(&pdev->dev);
 
 	switch (data->soc) {
 	case SOC_ARCH_EXYNOS4210:
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 04/14] thermal: exynos: remove unused "type" field from struct exynos_tmu_platform_data
       [not found]   ` <CGME20180416101357epcas2p16992f345f7dcebd90e3d4e50afbeeb88@epcas2p1.samsung.com>
@ 2018-04-16 10:11     ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:50       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:11 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

Remove unused "type" field from struct exynos_tmu_platform_data.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index 5149c2a..8c468b6 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -47,7 +47,6 @@ enum soc_type {
  *	0 < reference_voltage <= 31
  * @noise_cancel_mode: noise cancellation mode
  *	000, 100, 101, 110 and 111 can be different modes
- * @type: determines the type of SOC
  * @efuse_value: platform defined fuse value
  * @min_efuse_value: minimum valid trimming data
  * @max_efuse_value: maximum valid trimming data
@@ -68,7 +67,6 @@ struct exynos_tmu_platform_data {
 	u8 second_point_trim;
 	u8 default_temp_offset;
 
-	enum soc_type type;
 	u32 cal_type;
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 05/14] thermal: exynos: remove parsing of samsung,tmu_default_temp_offset property
       [not found]   ` <CGME20180416101400epcas1p45e65b37b922a5d0265de7879eeb1df87@epcas1p4.samsung.com>
@ 2018-04-16 10:11     ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:55       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:11 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

Trimming (one point based or two points based) is always used for
the temperature calibration and the default non-trimming code is
never reached. Remove it and then remove no longer needed parsing
of samsung,tmu_default_temp_offset property.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 48 ++++++++++--------------------------
 drivers/thermal/samsung/exynos_tmu.h |  2 --
 2 files changed, 13 insertions(+), 37 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index d7a3c3c..958a7c4 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -249,24 +249,14 @@ static void exynos_report_trigger(struct exynos_tmu_data *p)
 static int temp_to_code(struct exynos_tmu_data *data, u8 temp)
 {
 	struct exynos_tmu_platform_data *pdata = data->pdata;
-	int temp_code;
-
-	switch (pdata->cal_type) {
-	case TYPE_TWO_POINT_TRIMMING:
-		temp_code = (temp - pdata->first_point_trim) *
-			(data->temp_error2 - data->temp_error1) /
-			(pdata->second_point_trim - pdata->first_point_trim) +
-			data->temp_error1;
-		break;
-	case TYPE_ONE_POINT_TRIMMING:
-		temp_code = temp + data->temp_error1 - pdata->first_point_trim;
-		break;
-	default:
-		temp_code = temp + pdata->default_temp_offset;
-		break;
-	}
 
-	return temp_code;
+	if (pdata->cal_type == TYPE_ONE_POINT_TRIMMING)
+		return temp + data->temp_error1 - pdata->first_point_trim;
+
+	return (temp - pdata->first_point_trim) *
+		(data->temp_error2 - data->temp_error1) /
+		(pdata->second_point_trim - pdata->first_point_trim) +
+		data->temp_error1;
 }
 
 /*
@@ -276,24 +266,14 @@ static int temp_to_code(struct exynos_tmu_data *data, u8 temp)
 static int code_to_temp(struct exynos_tmu_data *data, u16 temp_code)
 {
 	struct exynos_tmu_platform_data *pdata = data->pdata;
-	int temp;
 
-	switch (pdata->cal_type) {
-	case TYPE_TWO_POINT_TRIMMING:
-		temp = (temp_code - data->temp_error1) *
-			(pdata->second_point_trim - pdata->first_point_trim) /
-			(data->temp_error2 - data->temp_error1) +
-			pdata->first_point_trim;
-		break;
-	case TYPE_ONE_POINT_TRIMMING:
-		temp = temp_code - data->temp_error1 + pdata->first_point_trim;
-		break;
-	default:
-		temp = temp_code - pdata->default_temp_offset;
-		break;
-	}
+	if (pdata->cal_type == TYPE_ONE_POINT_TRIMMING)
+		return temp_code - data->temp_error1 + pdata->first_point_trim;
 
-	return temp;
+	return (temp_code - data->temp_error1) *
+		(pdata->second_point_trim - pdata->first_point_trim) /
+		(data->temp_error2 - data->temp_error1) +
+		pdata->first_point_trim;
 }
 
 static void sanitize_temp_error(struct exynos_tmu_data *data, u32 trim_info)
@@ -1166,8 +1146,6 @@ static int exynos_of_sensor_conf(struct device_node *np,
 	pdata->first_point_trim = (u8)value;
 	of_property_read_u32(np, "samsung,tmu_second_point_trim", &value);
 	pdata->second_point_trim = (u8)value;
-	of_property_read_u32(np, "samsung,tmu_default_temp_offset", &value);
-	pdata->default_temp_offset = (u8)value;
 
 	of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type);
 
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index 8c468b6..a7e81b4 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -50,7 +50,6 @@ enum soc_type {
  * @efuse_value: platform defined fuse value
  * @min_efuse_value: minimum valid trimming data
  * @max_efuse_value: maximum valid trimming data
- * @default_temp_offset: default temperature offset in case of no trimming
  * @cal_type: calibration type for temperature
  *
  * This structure is required for configuration of exynos_tmu driver.
@@ -65,7 +64,6 @@ struct exynos_tmu_platform_data {
 	u32 max_efuse_value;
 	u8 first_point_trim;
 	u8 second_point_trim;
-	u8 default_temp_offset;
 
 	u32 cal_type;
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 06/14] thermal: exynos: remove parsing of samsung,tmu_[first,second]_point_trim properties
       [not found]   ` <CGME20180416101403epcas2p23c050a54c2cc8af9c8be76061d560937@epcas2p2.samsung.com>
@ 2018-04-16 10:11     ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:57       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:11 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

All SoCs use the same values (25, 85) for trim points (except
Exynos5440 which currently specifices value 70 for the second trim
point -> it seems to be a mistake because documentation uses value
85 and two points based trimming has never been used by the driver
for this SoC anyway) so just make it explicit and remove parsing of
samsung,tmu_[first,second]_point_trim properties.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 20 +++++++++-----------
 drivers/thermal/samsung/exynos_tmu.h |  2 --
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 958a7c4..7ec8061 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -165,6 +165,9 @@
 #define EXYNOS7_EMUL_DATA_SHIFT			7
 #define EXYNOS7_EMUL_DATA_MASK			0x1ff
 
+#define EXYNOS_FIRST_POINT_TRIM			25
+#define EXYNOS_SECOND_POINT_TRIM		85
+
 #define MCELSIUS	1000
 /**
  * struct exynos_tmu_data : A structure to hold the private data of the TMU
@@ -251,11 +254,11 @@ static int temp_to_code(struct exynos_tmu_data *data, u8 temp)
 	struct exynos_tmu_platform_data *pdata = data->pdata;
 
 	if (pdata->cal_type == TYPE_ONE_POINT_TRIMMING)
-		return temp + data->temp_error1 - pdata->first_point_trim;
+		return temp + data->temp_error1 - EXYNOS_FIRST_POINT_TRIM;
 
-	return (temp - pdata->first_point_trim) *
+	return (temp - EXYNOS_FIRST_POINT_TRIM) *
 		(data->temp_error2 - data->temp_error1) /
-		(pdata->second_point_trim - pdata->first_point_trim) +
+		(EXYNOS_SECOND_POINT_TRIM - EXYNOS_FIRST_POINT_TRIM) +
 		data->temp_error1;
 }
 
@@ -268,12 +271,12 @@ static int code_to_temp(struct exynos_tmu_data *data, u16 temp_code)
 	struct exynos_tmu_platform_data *pdata = data->pdata;
 
 	if (pdata->cal_type == TYPE_ONE_POINT_TRIMMING)
-		return temp_code - data->temp_error1 + pdata->first_point_trim;
+		return temp_code - data->temp_error1 + EXYNOS_FIRST_POINT_TRIM;
 
 	return (temp_code - data->temp_error1) *
-		(pdata->second_point_trim - pdata->first_point_trim) /
+		(EXYNOS_SECOND_POINT_TRIM - EXYNOS_FIRST_POINT_TRIM) /
 		(data->temp_error2 - data->temp_error1) +
-		pdata->first_point_trim;
+		EXYNOS_FIRST_POINT_TRIM;
 }
 
 static void sanitize_temp_error(struct exynos_tmu_data *data, u32 trim_info)
@@ -1142,11 +1145,6 @@ static int exynos_of_sensor_conf(struct device_node *np,
 	of_property_read_u32(np, "samsung,tmu_max_efuse_value",
 			     &pdata->max_efuse_value);
 
-	of_property_read_u32(np, "samsung,tmu_first_point_trim", &value);
-	pdata->first_point_trim = (u8)value;
-	of_property_read_u32(np, "samsung,tmu_second_point_trim", &value);
-	pdata->second_point_trim = (u8)value;
-
 	of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type);
 
 	of_node_put(np);
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index a7e81b4..a5d8c9c 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -62,8 +62,6 @@ struct exynos_tmu_platform_data {
 	u32 efuse_value;
 	u32 min_efuse_value;
 	u32 max_efuse_value;
-	u8 first_point_trim;
-	u8 second_point_trim;
 
 	u32 cal_type;
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 07/14] thermal: exynos: remove parsing of samsung,tmu_noise_cancel_mode property
       [not found]   ` <CGME20180416101406epcas2p267a664bb26a00bdca6c4c176f9ce08ed@epcas2p2.samsung.com>
@ 2018-04-16 10:11     ` Bartlomiej Zolnierkiewicz
  2018-04-16 13:03       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:11 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

All SoCs use the same value (4) for the noise cancel mode so just
make it explicit and remove parsing of samsung,tmu_noise_cancel_mode
property.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 10 ++++------
 drivers/thermal/samsung/exynos_tmu.h |  3 ---
 2 files changed, 4 insertions(+), 9 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 7ec8061..1fa162d 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -168,6 +168,8 @@
 #define EXYNOS_FIRST_POINT_TRIM			25
 #define EXYNOS_SECOND_POINT_TRIM		85
 
+#define EXYNOS_NOISE_CANCEL_MODE		4
+
 #define MCELSIUS	1000
 /**
  * struct exynos_tmu_data : A structure to hold the private data of the TMU
@@ -368,10 +370,8 @@ static u32 get_con_reg(struct exynos_tmu_data *data, u32 con)
 	con &= ~(EXYNOS_TMU_BUF_SLOPE_SEL_MASK << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT);
 	con |= (pdata->gain << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT);
 
-	if (pdata->noise_cancel_mode) {
-		con &= ~(EXYNOS_TMU_TRIP_MODE_MASK << EXYNOS_TMU_TRIP_MODE_SHIFT);
-		con |= (pdata->noise_cancel_mode << EXYNOS_TMU_TRIP_MODE_SHIFT);
-	}
+	con &= ~(EXYNOS_TMU_TRIP_MODE_MASK << EXYNOS_TMU_TRIP_MODE_SHIFT);
+	con |= (EXYNOS_NOISE_CANCEL_MODE << EXYNOS_TMU_TRIP_MODE_SHIFT);
 
 	return con;
 }
@@ -1135,8 +1135,6 @@ static int exynos_of_sensor_conf(struct device_node *np,
 	pdata->gain = (u8)value;
 	of_property_read_u32(np, "samsung,tmu_reference_voltage", &value);
 	pdata->reference_voltage = (u8)value;
-	of_property_read_u32(np, "samsung,tmu_noise_cancel_mode", &value);
-	pdata->noise_cancel_mode = (u8)value;
 
 	of_property_read_u32(np, "samsung,tmu_efuse_value",
 			     &pdata->efuse_value);
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index a5d8c9c..b111a01 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -45,8 +45,6 @@ enum soc_type {
  * @reference_voltage: reference voltage of amplifier
  *	in the positive-TC generator block
  *	0 < reference_voltage <= 31
- * @noise_cancel_mode: noise cancellation mode
- *	000, 100, 101, 110 and 111 can be different modes
  * @efuse_value: platform defined fuse value
  * @min_efuse_value: minimum valid trimming data
  * @max_efuse_value: maximum valid trimming data
@@ -57,7 +55,6 @@ enum soc_type {
 struct exynos_tmu_platform_data {
 	u8 gain;
 	u8 reference_voltage;
-	u8 noise_cancel_mode;
 
 	u32 efuse_value;
 	u32 min_efuse_value;
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 08/14] thermal: exynos: remove parsing of samsung,tmu[_min,_max]_efuse_value properties
       [not found]   ` <CGME20180416101409epcas1p4f8e0279a94322d1cc423ced6dfce3362@epcas1p4.samsung.com>
@ 2018-04-16 10:11     ` Bartlomiej Zolnierkiewicz
  2018-04-16 13:15       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:11 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

Since pdata efuse values are SoC (not platform) specific just move
them from platform data to struct exynos_tmu_data instance. Then
remove parsing of samsung,tmu[_,min_,max]_efuse_value properties.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 49 +++++++++++++++++++++++-------------
 drivers/thermal/samsung/exynos_tmu.h |  7 ------
 2 files changed, 32 insertions(+), 24 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 1fa162d..9a0e961 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -185,6 +185,9 @@
  * @clk: pointer to the clock structure.
  * @clk_sec: pointer to the clock structure for accessing the base_second.
  * @sclk: pointer to the clock structure for accessing the tmu special clk.
+ * @efuse_value: SoC defined fuse value
+ * @min_efuse_value: minimum valid trimming data
+ * @max_efuse_value: maximum valid trimming data
  * @temp_error1: fused value of the first point trim.
  * @temp_error2: fused value of the second point trim.
  * @regulator: pointer to the TMU regulator structure.
@@ -207,6 +210,9 @@ struct exynos_tmu_data {
 	struct work_struct irq_work;
 	struct mutex lock;
 	struct clk *clk, *clk_sec, *sclk;
+	u32 efuse_value;
+	u32 min_efuse_value;
+	u32 max_efuse_value;
 	u16 temp_error1, temp_error2;
 	struct regulator *regulator;
 	struct thermal_zone_device *tzd;
@@ -283,20 +289,18 @@ static int code_to_temp(struct exynos_tmu_data *data, u16 temp_code)
 
 static void sanitize_temp_error(struct exynos_tmu_data *data, u32 trim_info)
 {
-	struct exynos_tmu_platform_data *pdata = data->pdata;
-
 	data->temp_error1 = trim_info & EXYNOS_TMU_TEMP_MASK;
 	data->temp_error2 = ((trim_info >> EXYNOS_TRIMINFO_85_SHIFT) &
 				EXYNOS_TMU_TEMP_MASK);
 
 	if (!data->temp_error1 ||
-		(pdata->min_efuse_value > data->temp_error1) ||
-		(data->temp_error1 > pdata->max_efuse_value))
-		data->temp_error1 = pdata->efuse_value & EXYNOS_TMU_TEMP_MASK;
+	    (data->min_efuse_value > data->temp_error1) ||
+	    (data->temp_error1 > data->max_efuse_value))
+		data->temp_error1 = data->efuse_value & EXYNOS_TMU_TEMP_MASK;
 
 	if (!data->temp_error2)
 		data->temp_error2 =
-			(pdata->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) &
+			(data->efuse_value >> EXYNOS_TRIMINFO_85_SHIFT) &
 			EXYNOS_TMU_TEMP_MASK;
 }
 
@@ -655,7 +659,6 @@ static int exynos7_tmu_initialize(struct platform_device *pdev)
 {
 	struct exynos_tmu_data *data = platform_get_drvdata(pdev);
 	struct thermal_zone_device *tz = data->tzd;
-	struct exynos_tmu_platform_data *pdata = data->pdata;
 	unsigned int status, trim_info;
 	unsigned int rising_threshold = 0, falling_threshold = 0;
 	int ret = 0, threshold_code, i;
@@ -672,9 +675,9 @@ static int exynos7_tmu_initialize(struct platform_device *pdev)
 
 	data->temp_error1 = trim_info & EXYNOS7_TMU_TEMP_MASK;
 	if (!data->temp_error1 ||
-	    (pdata->min_efuse_value > data->temp_error1) ||
-	    (data->temp_error1 > pdata->max_efuse_value))
-		data->temp_error1 = pdata->efuse_value & EXYNOS_TMU_TEMP_MASK;
+	    (data->min_efuse_value > data->temp_error1) ||
+	    (data->temp_error1 > data->max_efuse_value))
+		data->temp_error1 = data->efuse_value & EXYNOS_TMU_TEMP_MASK;
 
 	/* Write temperature code for rising and falling threshold */
 	for (i = (of_thermal_get_ntrips(tz) - 1); i >= 0; i--) {
@@ -1136,13 +1139,6 @@ static int exynos_of_sensor_conf(struct device_node *np,
 	of_property_read_u32(np, "samsung,tmu_reference_voltage", &value);
 	pdata->reference_voltage = (u8)value;
 
-	of_property_read_u32(np, "samsung,tmu_efuse_value",
-			     &pdata->efuse_value);
-	of_property_read_u32(np, "samsung,tmu_min_efuse_value",
-			     &pdata->min_efuse_value);
-	of_property_read_u32(np, "samsung,tmu_max_efuse_value",
-			     &pdata->max_efuse_value);
-
 	of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type);
 
 	of_node_put(np);
@@ -1196,6 +1192,9 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_read = exynos4210_tmu_read;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 4;
+		data->efuse_value = 55;
+		data->min_efuse_value = 40;
+		data->max_efuse_value = 100;
 		break;
 	case SOC_ARCH_EXYNOS3250:
 	case SOC_ARCH_EXYNOS4412:
@@ -1209,6 +1208,13 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos4412_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 4;
+		data->efuse_value = 55;
+		if (data->soc != SOC_ARCH_EXYNOS5420 &&
+		    data->soc != SOC_ARCH_EXYNOS5420_TRIMINFO)
+			data->min_efuse_value = 40;
+		else
+			data->min_efuse_value = 0;
+		data->max_efuse_value = 100;
 		break;
 	case SOC_ARCH_EXYNOS5433:
 		data->tmu_initialize = exynos5433_tmu_initialize;
@@ -1217,6 +1223,9 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos4412_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 8;
+		data->efuse_value = 75;
+		data->min_efuse_value = 40;
+		data->max_efuse_value = 150;
 		break;
 	case SOC_ARCH_EXYNOS5440:
 		data->tmu_initialize = exynos5440_tmu_initialize;
@@ -1225,6 +1234,9 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos5440_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos5440_tmu_clear_irqs;
 		data->ntrip = 4;
+		data->efuse_value = 0x5d2d;
+		data->min_efuse_value = 16;
+		data->max_efuse_value = 76;
 		break;
 	case SOC_ARCH_EXYNOS7:
 		data->tmu_initialize = exynos7_tmu_initialize;
@@ -1233,6 +1245,9 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos4412_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 8;
+		data->efuse_value = 75;
+		data->min_efuse_value = 15;
+		data->max_efuse_value = 100;
 		break;
 	default:
 		dev_err(&pdev->dev, "Platform not supported\n");
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index b111a01..4c49312 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -45,9 +45,6 @@ enum soc_type {
  * @reference_voltage: reference voltage of amplifier
  *	in the positive-TC generator block
  *	0 < reference_voltage <= 31
- * @efuse_value: platform defined fuse value
- * @min_efuse_value: minimum valid trimming data
- * @max_efuse_value: maximum valid trimming data
  * @cal_type: calibration type for temperature
  *
  * This structure is required for configuration of exynos_tmu driver.
@@ -56,10 +53,6 @@ struct exynos_tmu_platform_data {
 	u8 gain;
 	u8 reference_voltage;
 
-	u32 efuse_value;
-	u32 min_efuse_value;
-	u32 max_efuse_value;
-
 	u32 cal_type;
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 09/14] thermal: exynos: remove parsing of samsung,tmu_reference_voltage property
       [not found]   ` <CGME20180416101412epcas2p241ac78d221c7c288e79fc410dd90d6ab@epcas2p2.samsung.com>
@ 2018-04-16 10:12     ` Bartlomiej Zolnierkiewicz
  2018-04-16 13:16       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:12 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

Since pdata reference_voltage values are SoC (not platform) specific
just move it from platform data to struct exynos_tmu_data instance.
Then remove parsing of samsung,tmu_reference_voltage property.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 18 +++++++++++++++---
 drivers/thermal/samsung/exynos_tmu.h |  4 ----
 2 files changed, 15 insertions(+), 7 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 9a0e961..6db6ef6 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -123,6 +123,8 @@
 
 #define EXYNOS5433_PD_DET_EN			1
 
+#define EXYNOS5433_G3D_BASE			0x10070000
+
 /*exynos5440 specific registers*/
 #define EXYNOS5440_TMU_S0_7_TRIM		0x000
 #define EXYNOS5440_TMU_S0_7_CTRL		0x020
@@ -190,6 +192,9 @@
  * @max_efuse_value: maximum valid trimming data
  * @temp_error1: fused value of the first point trim.
  * @temp_error2: fused value of the second point trim.
+ * @reference_voltage: reference voltage of amplifier
+ *	in the positive-TC generator block
+ *	0 < reference_voltage <= 31
  * @regulator: pointer to the TMU regulator structure.
  * @reg_conf: pointer to structure to register with core thermal.
  * @ntrip: number of supported trip points.
@@ -214,6 +219,7 @@ struct exynos_tmu_data {
 	u32 min_efuse_value;
 	u32 max_efuse_value;
 	u16 temp_error1, temp_error2;
+	u8 reference_voltage;
 	struct regulator *regulator;
 	struct thermal_zone_device *tzd;
 	unsigned int ntrip;
@@ -369,7 +375,7 @@ static u32 get_con_reg(struct exynos_tmu_data *data, u32 con)
 		con |= (EXYNOS4412_MUX_ADDR_VALUE << EXYNOS4412_MUX_ADDR_SHIFT);
 
 	con &= ~(EXYNOS_TMU_REF_VOLTAGE_MASK << EXYNOS_TMU_REF_VOLTAGE_SHIFT);
-	con |= pdata->reference_voltage << EXYNOS_TMU_REF_VOLTAGE_SHIFT;
+	con |= data->reference_voltage << EXYNOS_TMU_REF_VOLTAGE_SHIFT;
 
 	con &= ~(EXYNOS_TMU_BUF_SLOPE_SEL_MASK << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT);
 	con |= (pdata->gain << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT);
@@ -1136,8 +1142,6 @@ static int exynos_of_sensor_conf(struct device_node *np,
 
 	ret = of_property_read_u32(np, "samsung,tmu_gain", &value);
 	pdata->gain = (u8)value;
-	of_property_read_u32(np, "samsung,tmu_reference_voltage", &value);
-	pdata->reference_voltage = (u8)value;
 
 	of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type);
 
@@ -1192,6 +1196,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_read = exynos4210_tmu_read;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 4;
+		data->reference_voltage = 7;
 		data->efuse_value = 55;
 		data->min_efuse_value = 40;
 		data->max_efuse_value = 100;
@@ -1208,6 +1213,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos4412_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 4;
+		data->reference_voltage = 16;
 		data->efuse_value = 55;
 		if (data->soc != SOC_ARCH_EXYNOS5420 &&
 		    data->soc != SOC_ARCH_EXYNOS5420_TRIMINFO)
@@ -1223,6 +1229,10 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos4412_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 8;
+		if (res.start == EXYNOS5433_G3D_BASE)
+			data->reference_voltage = 23;
+		else
+			data->reference_voltage = 16;
 		data->efuse_value = 75;
 		data->min_efuse_value = 40;
 		data->max_efuse_value = 150;
@@ -1234,6 +1244,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos5440_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos5440_tmu_clear_irqs;
 		data->ntrip = 4;
+		data->reference_voltage = 16;
 		data->efuse_value = 0x5d2d;
 		data->min_efuse_value = 16;
 		data->max_efuse_value = 76;
@@ -1245,6 +1256,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos4412_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 8;
+		data->reference_voltage = 17;
 		data->efuse_value = 75;
 		data->min_efuse_value = 15;
 		data->max_efuse_value = 100;
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index 4c49312..9f4318c 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -42,16 +42,12 @@ enum soc_type {
  * struct exynos_tmu_platform_data
  * @gain: gain of amplifier in the positive-TC generator block
  *	0 < gain <= 15
- * @reference_voltage: reference voltage of amplifier
- *	in the positive-TC generator block
- *	0 < reference_voltage <= 31
  * @cal_type: calibration type for temperature
  *
  * This structure is required for configuration of exynos_tmu driver.
  */
 struct exynos_tmu_platform_data {
 	u8 gain;
-	u8 reference_voltage;
 
 	u32 cal_type;
 };
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 10/14] thermal: exynos: remove parsing of samsung,tmu_gain property
       [not found]   ` <CGME20180416101415epcas1p1b1108c9d654a7b2832179b5c1f49ff4a@epcas1p1.samsung.com>
@ 2018-04-16 10:12     ` Bartlomiej Zolnierkiewicz
  2018-04-16 13:18       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:12 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

Since pdata gain values are SoC (not platform) specific just move
it from platform data to struct exynos_tmu_data instance. Then
remove parsing of samsung,tmu_gain property.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 18 +++++++++---------
 drivers/thermal/samsung/exynos_tmu.h |  4 ----
 2 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 6db6ef6..3cdbc09 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -192,6 +192,8 @@
  * @max_efuse_value: maximum valid trimming data
  * @temp_error1: fused value of the first point trim.
  * @temp_error2: fused value of the second point trim.
+ * @gain: gain of amplifier in the positive-TC generator block
+ *	0 < gain <= 15
  * @reference_voltage: reference voltage of amplifier
  *	in the positive-TC generator block
  *	0 < reference_voltage <= 31
@@ -219,6 +221,7 @@ struct exynos_tmu_data {
 	u32 min_efuse_value;
 	u32 max_efuse_value;
 	u16 temp_error1, temp_error2;
+	u8 gain;
 	u8 reference_voltage;
 	struct regulator *regulator;
 	struct thermal_zone_device *tzd;
@@ -368,8 +371,6 @@ static int exynos_tmu_initialize(struct platform_device *pdev)
 
 static u32 get_con_reg(struct exynos_tmu_data *data, u32 con)
 {
-	struct exynos_tmu_platform_data *pdata = data->pdata;
-
 	if (data->soc == SOC_ARCH_EXYNOS4412 ||
 	    data->soc == SOC_ARCH_EXYNOS3250)
 		con |= (EXYNOS4412_MUX_ADDR_VALUE << EXYNOS4412_MUX_ADDR_SHIFT);
@@ -378,7 +379,7 @@ static u32 get_con_reg(struct exynos_tmu_data *data, u32 con)
 	con |= data->reference_voltage << EXYNOS_TMU_REF_VOLTAGE_SHIFT;
 
 	con &= ~(EXYNOS_TMU_BUF_SLOPE_SEL_MASK << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT);
-	con |= (pdata->gain << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT);
+	con |= (data->gain << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT);
 
 	con &= ~(EXYNOS_TMU_TRIP_MODE_MASK << EXYNOS_TMU_TRIP_MODE_SHIFT);
 	con |= (EXYNOS_NOISE_CANCEL_MODE << EXYNOS_TMU_TRIP_MODE_SHIFT);
@@ -1135,14 +1136,8 @@ static irqreturn_t exynos_tmu_irq(int irq, void *id)
 static int exynos_of_sensor_conf(struct device_node *np,
 				 struct exynos_tmu_platform_data *pdata)
 {
-	u32 value;
-	int ret;
-
 	of_node_get(np);
 
-	ret = of_property_read_u32(np, "samsung,tmu_gain", &value);
-	pdata->gain = (u8)value;
-
 	of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type);
 
 	of_node_put(np);
@@ -1196,6 +1191,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_read = exynos4210_tmu_read;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 4;
+		data->gain = 15;
 		data->reference_voltage = 7;
 		data->efuse_value = 55;
 		data->min_efuse_value = 40;
@@ -1213,6 +1209,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos4412_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 4;
+		data->gain = 8;
 		data->reference_voltage = 16;
 		data->efuse_value = 55;
 		if (data->soc != SOC_ARCH_EXYNOS5420 &&
@@ -1229,6 +1226,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos4412_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 8;
+		data->gain = 8;
 		if (res.start == EXYNOS5433_G3D_BASE)
 			data->reference_voltage = 23;
 		else
@@ -1244,6 +1242,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos5440_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos5440_tmu_clear_irqs;
 		data->ntrip = 4;
+		data->gain = 5;
 		data->reference_voltage = 16;
 		data->efuse_value = 0x5d2d;
 		data->min_efuse_value = 16;
@@ -1256,6 +1255,7 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		data->tmu_set_emulation = exynos4412_tmu_set_emulation;
 		data->tmu_clear_irqs = exynos4210_tmu_clear_irqs;
 		data->ntrip = 8;
+		data->gain = 9;
 		data->reference_voltage = 17;
 		data->efuse_value = 75;
 		data->min_efuse_value = 15;
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index 9f4318c..689453d 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -40,15 +40,11 @@ enum soc_type {
 
 /**
  * struct exynos_tmu_platform_data
- * @gain: gain of amplifier in the positive-TC generator block
- *	0 < gain <= 15
  * @cal_type: calibration type for temperature
  *
  * This structure is required for configuration of exynos_tmu driver.
  */
 struct exynos_tmu_platform_data {
-	u8 gain;
-
 	u32 cal_type;
 };
 
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 11/14] thermal: exynos: remove parsing of samsung,tmu_cal_type property
       [not found]   ` <CGME20180416101419epcas2p17dfedf3e376603baa8a4e52ffc82f0cb@epcas2p1.samsung.com>
@ 2018-04-16 10:12     ` Bartlomiej Zolnierkiewicz
  2018-04-16 13:19       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:12 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

Since calibration type for temperature is SoC (not platform) specific
just move it from platform data to struct exynos_tmu_data instance.
Then remove parsing of samsung,tmu_cal_type property. Also remove no
longer needed platform data structure.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 43 ++++++++----------------------------
 drivers/thermal/samsung/exynos_tmu.h | 10 ---------
 2 files changed, 9 insertions(+), 44 deletions(-)

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 3cdbc09..7975f33 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -177,7 +177,6 @@
  * struct exynos_tmu_data : A structure to hold the private data of the TMU
 	driver
  * @id: identifier of the one instance of the TMU controller.
- * @pdata: pointer to the tmu platform/configuration data
  * @base: base address of the single instance of the TMU controller.
  * @base_second: base address of the common registers of the TMU controller.
  * @irq: irq number of the TMU controller.
@@ -187,6 +186,7 @@
  * @clk: pointer to the clock structure.
  * @clk_sec: pointer to the clock structure for accessing the base_second.
  * @sclk: pointer to the clock structure for accessing the tmu special clk.
+ * @cal_type: calibration type for temperature
  * @efuse_value: SoC defined fuse value
  * @min_efuse_value: minimum valid trimming data
  * @max_efuse_value: maximum valid trimming data
@@ -209,7 +209,6 @@
  */
 struct exynos_tmu_data {
 	int id;
-	struct exynos_tmu_platform_data *pdata;
 	void __iomem *base;
 	void __iomem *base_second;
 	int irq;
@@ -217,6 +216,7 @@ struct exynos_tmu_data {
 	struct work_struct irq_work;
 	struct mutex lock;
 	struct clk *clk, *clk_sec, *sclk;
+	u32 cal_type;
 	u32 efuse_value;
 	u32 min_efuse_value;
 	u32 max_efuse_value;
@@ -268,9 +268,7 @@ static void exynos_report_trigger(struct exynos_tmu_data *p)
  */
 static int temp_to_code(struct exynos_tmu_data *data, u8 temp)
 {
-	struct exynos_tmu_platform_data *pdata = data->pdata;
-
-	if (pdata->cal_type == TYPE_ONE_POINT_TRIMMING)
+	if (data->cal_type == TYPE_ONE_POINT_TRIMMING)
 		return temp + data->temp_error1 - EXYNOS_FIRST_POINT_TRIM;
 
 	return (temp - EXYNOS_FIRST_POINT_TRIM) *
@@ -285,9 +283,7 @@ static int temp_to_code(struct exynos_tmu_data *data, u8 temp)
  */
 static int code_to_temp(struct exynos_tmu_data *data, u16 temp_code)
 {
-	struct exynos_tmu_platform_data *pdata = data->pdata;
-
-	if (pdata->cal_type == TYPE_ONE_POINT_TRIMMING)
+	if (data->cal_type == TYPE_ONE_POINT_TRIMMING)
 		return temp_code - data->temp_error1 + EXYNOS_FIRST_POINT_TRIM;
 
 	return (temp_code - data->temp_error1) *
@@ -519,7 +515,6 @@ static int exynos4412_tmu_initialize(struct platform_device *pdev)
 static int exynos5433_tmu_initialize(struct platform_device *pdev)
 {
 	struct exynos_tmu_data *data = platform_get_drvdata(pdev);
-	struct exynos_tmu_platform_data *pdata = data->pdata;
 	struct thermal_zone_device *tz = data->tzd;
 	unsigned int status, trim_info;
 	unsigned int rising_threshold = 0, falling_threshold = 0;
@@ -546,14 +541,12 @@ static int exynos5433_tmu_initialize(struct platform_device *pdev)
 				>> EXYNOS5433_TRIMINFO_CALIB_SEL_SHIFT;
 
 	switch (cal_type) {
-	case EXYNOS5433_TRIMINFO_ONE_POINT_TRIMMING:
-		pdata->cal_type = TYPE_ONE_POINT_TRIMMING;
-		break;
 	case EXYNOS5433_TRIMINFO_TWO_POINT_TRIMMING:
-		pdata->cal_type = TYPE_TWO_POINT_TRIMMING;
+		data->cal_type = TYPE_TWO_POINT_TRIMMING;
 		break;
+	case EXYNOS5433_TRIMINFO_ONE_POINT_TRIMMING:
 	default:
-		pdata->cal_type = TYPE_ONE_POINT_TRIMMING;
+		data->cal_type = TYPE_ONE_POINT_TRIMMING;
 		break;
 	}
 
@@ -1133,21 +1126,9 @@ static irqreturn_t exynos_tmu_irq(int irq, void *id)
 };
 MODULE_DEVICE_TABLE(of, exynos_tmu_match);
 
-static int exynos_of_sensor_conf(struct device_node *np,
-				 struct exynos_tmu_platform_data *pdata)
-{
-	of_node_get(np);
-
-	of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type);
-
-	of_node_put(np);
-	return 0;
-}
-
 static int exynos_map_dt_data(struct platform_device *pdev)
 {
 	struct exynos_tmu_data *data = platform_get_drvdata(pdev);
-	struct exynos_tmu_platform_data *pdata;
 	struct resource res;
 
 	if (!data || !pdev->dev.of_node)
@@ -1174,14 +1155,6 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		return -EADDRNOTAVAIL;
 	}
 
-	pdata = devm_kzalloc(&pdev->dev,
-			     sizeof(struct exynos_tmu_platform_data),
-			     GFP_KERNEL);
-	if (!pdata)
-		return -ENOMEM;
-
-	exynos_of_sensor_conf(pdev->dev.of_node, pdata);
-	data->pdata = pdata;
 	data->soc = (enum soc_type)of_device_get_match_data(&pdev->dev);
 
 	switch (data->soc) {
@@ -1266,6 +1239,8 @@ static int exynos_map_dt_data(struct platform_device *pdev)
 		return -EINVAL;
 	}
 
+	data->cal_type = TYPE_ONE_POINT_TRIMMING;
+
 	/*
 	 * Check if the TMU shares some registers and then try to map the
 	 * memory of common registers.
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
index 689453d..8f56f86 100644
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ b/drivers/thermal/samsung/exynos_tmu.h
@@ -38,14 +38,4 @@ enum soc_type {
 	SOC_ARCH_EXYNOS7,
 };
 
-/**
- * struct exynos_tmu_platform_data
- * @cal_type: calibration type for temperature
- *
- * This structure is required for configuration of exynos_tmu driver.
- */
-struct exynos_tmu_platform_data {
-	u32 cal_type;
-};
-
 #endif /* _EXYNOS_TMU_H */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 12/14] thermal: exynos: remove separate exynos_tmu.h header file
       [not found]   ` <CGME20180416101422epcas2p34c80b64c6c762b98ae4fecfe6a4db4f8@epcas2p3.samsung.com>
@ 2018-04-16 10:12     ` Bartlomiej Zolnierkiewicz
  2018-04-16 13:24       ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:12 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

exynos_tmu.h is used only by exynos_tmu.c so there is no need
for a separate include file.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 drivers/thermal/samsung/exynos_tmu.c | 18 +++++++++++++++-
 drivers/thermal/samsung/exynos_tmu.h | 41 ------------------------------------
 2 files changed, 17 insertions(+), 42 deletions(-)
 delete mode 100644 drivers/thermal/samsung/exynos_tmu.h

diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
index 7975f33..197f267 100644
--- a/drivers/thermal/samsung/exynos_tmu.c
+++ b/drivers/thermal/samsung/exynos_tmu.c
@@ -34,8 +34,10 @@
 #include <linux/of_irq.h>
 #include <linux/platform_device.h>
 #include <linux/regulator/consumer.h>
+#include <linux/cpu_cooling.h>
+
+#include <dt-bindings/thermal/thermal_exynos.h>
 
-#include "exynos_tmu.h"
 #include "../thermal_core.h"
 
 /* Exynos generic registers */
@@ -173,6 +175,20 @@
 #define EXYNOS_NOISE_CANCEL_MODE		4
 
 #define MCELSIUS	1000
+
+enum soc_type {
+	SOC_ARCH_EXYNOS3250 = 1,
+	SOC_ARCH_EXYNOS4210,
+	SOC_ARCH_EXYNOS4412,
+	SOC_ARCH_EXYNOS5250,
+	SOC_ARCH_EXYNOS5260,
+	SOC_ARCH_EXYNOS5420,
+	SOC_ARCH_EXYNOS5420_TRIMINFO,
+	SOC_ARCH_EXYNOS5433,
+	SOC_ARCH_EXYNOS5440,
+	SOC_ARCH_EXYNOS7,
+};
+
 /**
  * struct exynos_tmu_data : A structure to hold the private data of the TMU
 	driver
diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
deleted file mode 100644
index 8f56f86..0000000
--- a/drivers/thermal/samsung/exynos_tmu.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * exynos_tmu.h - Samsung EXYNOS TMU (Thermal Management Unit)
- *
- *  Copyright (C) 2011 Samsung Electronics
- *  Donggeun Kim <dg77.kim@samsung.com>
- *  Amit Daniel Kachhap <amit.daniel@samsung.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- */
-
-#ifndef _EXYNOS_TMU_H
-#define _EXYNOS_TMU_H
-#include <linux/cpu_cooling.h>
-#include <dt-bindings/thermal/thermal_exynos.h>
-
-enum soc_type {
-	SOC_ARCH_EXYNOS3250 = 1,
-	SOC_ARCH_EXYNOS4210,
-	SOC_ARCH_EXYNOS4412,
-	SOC_ARCH_EXYNOS5250,
-	SOC_ARCH_EXYNOS5260,
-	SOC_ARCH_EXYNOS5420,
-	SOC_ARCH_EXYNOS5420_TRIMINFO,
-	SOC_ARCH_EXYNOS5433,
-	SOC_ARCH_EXYNOS5440,
-	SOC_ARCH_EXYNOS7,
-};
-
-#endif /* _EXYNOS_TMU_H */
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 13/14] ARM: dts: exynos: remove no longer needed samsung thermal properties
       [not found]   ` <CGME20180416101425epcas1p46ab4d827e3a64c5c16b32a17f63dd9d0@epcas1p4.samsung.com>
@ 2018-04-16 10:12     ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:16       ` Krzysztof Kozlowski
  2018-06-20 19:17       ` Krzysztof Kozlowski
  0 siblings, 2 replies; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:12 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

Remove no longer needed samsung thermal properties.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 arch/arm/boot/dts/exynos3250.dtsi                 |  2 +-
 arch/arm/boot/dts/exynos4.dtsi                    |  2 +-
 arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi | 20 --------------------
 arch/arm/boot/dts/exynos5250.dtsi                 |  2 +-
 arch/arm/boot/dts/exynos5410.dtsi                 |  8 ++++----
 arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi | 21 ---------------------
 arch/arm/boot/dts/exynos5420.dtsi                 | 10 +++++-----
 arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi | 20 --------------------
 arch/arm/boot/dts/exynos5440.dtsi                 |  6 +++---
 9 files changed, 15 insertions(+), 76 deletions(-)
 delete mode 100644 arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi
 delete mode 100644 arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi
 delete mode 100644 arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi

diff --git a/arch/arm/boot/dts/exynos3250.dtsi b/arch/arm/boot/dts/exynos3250.dtsi
index 0a5f989..d6e014f 100644
--- a/arch/arm/boot/dts/exynos3250.dtsi
+++ b/arch/arm/boot/dts/exynos3250.dtsi
@@ -227,7 +227,7 @@
 			interrupts = <GIC_SPI 216 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&cmu CLK_TMU_APBIF>;
 			clock-names = "tmu_apbif";
-			#include "exynos4412-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 			status = "disabled";
 		};
 
diff --git a/arch/arm/boot/dts/exynos4.dtsi b/arch/arm/boot/dts/exynos4.dtsi
index 909a9f2..ca1921d 100644
--- a/arch/arm/boot/dts/exynos4.dtsi
+++ b/arch/arm/boot/dts/exynos4.dtsi
@@ -736,7 +736,7 @@
 			reg = <0x100C0000 0x100>;
 			interrupts = <2 4>;
 			status = "disabled";
-			#include "exynos4412-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		jpeg_codec: jpeg-codec@11840000 {
diff --git a/arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi b/arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi
deleted file mode 100644
index 489b58c..0000000
--- a/arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi
+++ /dev/null
@@ -1,20 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Device tree sources for Exynos4412 TMU sensor configuration
- *
- * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com>
- */
-
-#include <dt-bindings/thermal/thermal_exynos.h>
-
-#thermal-sensor-cells = <0>;
-samsung,tmu_gain = <8>;
-samsung,tmu_reference_voltage = <16>;
-samsung,tmu_noise_cancel_mode = <4>;
-samsung,tmu_efuse_value = <55>;
-samsung,tmu_min_efuse_value = <40>;
-samsung,tmu_max_efuse_value = <100>;
-samsung,tmu_first_point_trim = <25>;
-samsung,tmu_second_point_trim = <85>;
-samsung,tmu_default_temp_offset = <50>;
-samsung,tmu_cal_type = <TYPE_ONE_POINT_TRIMMING>;
diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index 45283a6..45242ba 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -282,7 +282,7 @@
 			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_TMU>;
 			clock-names = "tmu_apbif";
-			#include "exynos4412-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		sata: sata@122f0000 {
diff --git a/arch/arm/boot/dts/exynos5410.dtsi b/arch/arm/boot/dts/exynos5410.dtsi
index 55509c6..b8b68ec 100644
--- a/arch/arm/boot/dts/exynos5410.dtsi
+++ b/arch/arm/boot/dts/exynos5410.dtsi
@@ -93,7 +93,7 @@
 			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_TMU>;
 			clock-names = "tmu_apbif";
-			#include "exynos4412-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		tmu_cpu1: tmu@10064000 {
@@ -102,7 +102,7 @@
 			interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_TMU>;
 			clock-names = "tmu_apbif";
-			#include "exynos4412-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		tmu_cpu2: tmu@10068000 {
@@ -111,7 +111,7 @@
 			interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_TMU>;
 			clock-names = "tmu_apbif";
-			#include "exynos4412-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		tmu_cpu3: tmu@1006c000 {
@@ -120,7 +120,7 @@
 			interrupts = <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_TMU>;
 			clock-names = "tmu_apbif";
-			#include "exynos4412-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		mmc_0: mmc@12200000 {
diff --git a/arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi b/arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi
deleted file mode 100644
index fbc77cb..0000000
--- a/arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi
+++ /dev/null
@@ -1,21 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Device tree sources for Exynos5420 TMU sensor configuration
- *
- * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com>
- * Copyright (c) 2017 Krzysztof Kozlowski <krzk@kernel.org>
- */
-
-#include <dt-bindings/thermal/thermal_exynos.h>
-
-#thermal-sensor-cells = <0>;
-samsung,tmu_gain = <8>;
-samsung,tmu_reference_voltage = <16>;
-samsung,tmu_noise_cancel_mode = <4>;
-samsung,tmu_efuse_value = <55>;
-samsung,tmu_min_efuse_value = <0>;
-samsung,tmu_max_efuse_value = <100>;
-samsung,tmu_first_point_trim = <25>;
-samsung,tmu_second_point_trim = <85>;
-samsung,tmu_default_temp_offset = <50>;
-samsung,tmu_cal_type = <TYPE_ONE_POINT_TRIMMING>;
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 2f3cb2a..85d8656 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -722,7 +722,7 @@
 			interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_TMU>;
 			clock-names = "tmu_apbif";
-			#include "exynos5420-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		tmu_cpu1: tmu@10064000 {
@@ -731,7 +731,7 @@
 			interrupts = <GIC_SPI 183 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_TMU>;
 			clock-names = "tmu_apbif";
-			#include "exynos5420-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		tmu_cpu2: tmu@10068000 {
@@ -740,7 +740,7 @@
 			interrupts = <GIC_SPI 184 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_TMU>, <&clock CLK_TMU>;
 			clock-names = "tmu_apbif", "tmu_triminfo_apbif";
-			#include "exynos5420-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		tmu_cpu3: tmu@1006c000 {
@@ -749,7 +749,7 @@
 			interrupts = <GIC_SPI 185 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_TMU>, <&clock CLK_TMU_GPU>;
 			clock-names = "tmu_apbif", "tmu_triminfo_apbif";
-			#include "exynos5420-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		tmu_gpu: tmu@100a0000 {
@@ -758,7 +758,7 @@
 			interrupts = <GIC_SPI 215 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_TMU_GPU>, <&clock CLK_TMU>;
 			clock-names = "tmu_apbif", "tmu_triminfo_apbif";
-			#include "exynos5420-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		sysmmu_g2dr: sysmmu@0x10A60000 {
diff --git a/arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi b/arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi
deleted file mode 100644
index 0421c3d..0000000
--- a/arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi
+++ /dev/null
@@ -1,20 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Device tree sources for Exynos5440 TMU sensor configuration
- *
- * Copyright (c) 2014 Lukasz Majewski <l.majewski@samsung.com>
- */
-
-#include <dt-bindings/thermal/thermal_exynos.h>
-
-#thermal-sensor-cells = <0>;
-samsung,tmu_gain = <5>;
-samsung,tmu_reference_voltage = <16>;
-samsung,tmu_noise_cancel_mode = <4>;
-samsung,tmu_efuse_value = <0x5d2d>;
-samsung,tmu_min_efuse_value = <16>;
-samsung,tmu_max_efuse_value = <76>;
-samsung,tmu_first_point_trim = <25>;
-samsung,tmu_second_point_trim = <70>;
-samsung,tmu_default_temp_offset = <25>;
-samsung,tmu_cal_type = <TYPE_ONE_POINT_TRIMMING>;
diff --git a/arch/arm/boot/dts/exynos5440.dtsi b/arch/arm/boot/dts/exynos5440.dtsi
index f3abecc4..a6323a4 100644
--- a/arch/arm/boot/dts/exynos5440.dtsi
+++ b/arch/arm/boot/dts/exynos5440.dtsi
@@ -234,7 +234,7 @@
 			interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_B_125>;
 			clock-names = "tmu_apbif";
-			#include "exynos5440-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		tmuctrl_1: tmuctrl@16011c {
@@ -243,7 +243,7 @@
 			interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_B_125>;
 			clock-names = "tmu_apbif";
-			#include "exynos5440-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		tmuctrl_2: tmuctrl@160120 {
@@ -252,7 +252,7 @@
 			interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
 			clocks = <&clock CLK_B_125>;
 			clock-names = "tmu_apbif";
-			#include "exynos5440-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		sata@210000 {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* [PATCH 14/14] arm64: dts: exynos: remove no longer needed samsung thermal properties
       [not found]   ` <CGME20180416101428epcas1p1d9646bf1b56f0512a3fa3a6301b793c6@epcas1p1.samsung.com>
@ 2018-04-16 10:12     ` Bartlomiej Zolnierkiewicz
  2018-04-16 13:02       ` Daniel Lezcano
  2018-06-20 19:19       ` Krzysztof Kozlowski
  0 siblings, 2 replies; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 10:12 UTC (permalink / raw)
  To: Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel, b.zolnierkie

Remove no longer needed samsung thermal properties.

There should be no functional changes caused by this patch.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
---
 .../dts/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi  | 20 --------------------
 .../boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi | 19 -------------------
 arch/arm64/boot/dts/exynos/exynos5433.dtsi          | 10 +++++-----
 .../boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi    | 21 ---------------------
 arch/arm64/boot/dts/exynos/exynos7.dtsi             |  2 +-
 5 files changed, 6 insertions(+), 66 deletions(-)
 delete mode 100644 arch/arm64/boot/dts/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi
 delete mode 100644 arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi
 delete mode 100644 arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi

diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi
deleted file mode 100644
index f080357..0000000
--- a/arch/arm64/boot/dts/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi
+++ /dev/null
@@ -1,20 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Device tree sources for Exynos5433 TMU sensor configuration
- *
- * Copyright (c) 2016 Jonghwa Lee <jonghwa3.lee@samsung.com>
- */
-
-#include <dt-bindings/thermal/thermal_exynos.h>
-
-#thermal-sensor-cells = <0>;
-samsung,tmu_gain = <8>;
-samsung,tmu_reference_voltage = <23>;
-samsung,tmu_noise_cancel_mode = <4>;
-samsung,tmu_efuse_value = <75>;
-samsung,tmu_min_efuse_value = <40>;
-samsung,tmu_max_efuse_value = <150>;
-samsung,tmu_first_point_trim = <25>;
-samsung,tmu_second_point_trim = <85>;
-samsung,tmu_default_temp_offset = <50>;
-samsung,tmu_mux_addr = <6>;
diff --git a/arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi b/arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi
deleted file mode 100644
index cccae66..0000000
--- a/arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi
+++ /dev/null
@@ -1,19 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Device tree sources for Exynos5433 TMU sensor configuration
- *
- * Copyright (c) 2016 Chanwoo Choi <cw00.choi@samsung.com>
- */
-
-#include <dt-bindings/thermal/thermal_exynos.h>
-
-#thermal-sensor-cells = <0>;
-samsung,tmu_gain = <8>;
-samsung,tmu_reference_voltage = <16>;
-samsung,tmu_noise_cancel_mode = <4>;
-samsung,tmu_efuse_value = <75>;
-samsung,tmu_min_efuse_value = <40>;
-samsung,tmu_max_efuse_value = <150>;
-samsung,tmu_first_point_trim = <25>;
-samsung,tmu_second_point_trim = <85>;
-samsung,tmu_default_temp_offset = <50>;
diff --git a/arch/arm64/boot/dts/exynos/exynos5433.dtsi b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
index c0231d0..c414a27 100644
--- a/arch/arm64/boot/dts/exynos/exynos5433.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos5433.dtsi
@@ -637,7 +637,7 @@
 			clocks = <&cmu_peris CLK_PCLK_TMU0_APBIF>,
 				<&cmu_peris CLK_SCLK_TMU0>;
 			clock-names = "tmu_apbif", "tmu_sclk";
-			#include "exynos5433-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 			status = "disabled";
 		};
 
@@ -648,7 +648,7 @@
 			clocks = <&cmu_peris CLK_PCLK_TMU0_APBIF>,
 				<&cmu_peris CLK_SCLK_TMU0>;
 			clock-names = "tmu_apbif", "tmu_sclk";
-			#include "exynos5433-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 			status = "disabled";
 		};
 
@@ -659,7 +659,7 @@
 			clocks = <&cmu_peris CLK_PCLK_TMU1_APBIF>,
 				<&cmu_peris CLK_SCLK_TMU1>;
 			clock-names = "tmu_apbif", "tmu_sclk";
-			#include "exynos5433-tmu-g3d-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 			status = "disabled";
 		};
 
@@ -670,7 +670,7 @@
 			clocks = <&cmu_peris CLK_PCLK_TMU1_APBIF>,
 				<&cmu_peris CLK_SCLK_TMU1>;
 			clock-names = "tmu_apbif", "tmu_sclk";
-			#include "exynos5433-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 			status = "disabled";
 		};
 
@@ -681,7 +681,7 @@
 			clocks = <&cmu_peris CLK_PCLK_TMU1_APBIF>,
 				<&cmu_peris CLK_SCLK_TMU1>;
 			clock-names = "tmu_apbif", "tmu_sclk";
-			#include "exynos5433-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 			status = "disabled";
 		};
 
diff --git a/arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi b/arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi
deleted file mode 100644
index 4849471..0000000
--- a/arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi
+++ /dev/null
@@ -1,21 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/*
- * Device tree sources for Exynos7 TMU sensor configuration
- *
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
- *		http://www.samsung.com
- */
-
-#include <dt-bindings/thermal/thermal_exynos.h>
-
-#thermal-sensor-cells = <0>;
-samsung,tmu_gain = <9>;
-samsung,tmu_reference_voltage = <17>;
-samsung,tmu_noise_cancel_mode = <4>;
-samsung,tmu_efuse_value = <75>;
-samsung,tmu_min_efuse_value = <15>;
-samsung,tmu_max_efuse_value = <100>;
-samsung,tmu_first_point_trim = <25>;
-samsung,tmu_second_point_trim = <85>;
-samsung,tmu_default_temp_offset = <50>;
-samsung,tmu_cal_type = <TYPE_ONE_POINT_TRIMMING>;
diff --git a/arch/arm64/boot/dts/exynos/exynos7.dtsi b/arch/arm64/boot/dts/exynos/exynos7.dtsi
index ad9dce6..8834879 100644
--- a/arch/arm64/boot/dts/exynos/exynos7.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynos7.dtsi
@@ -589,7 +589,7 @@
 			clocks = <&clock_peris PCLK_TMU>,
 				 <&clock_peris SCLK_TMU>;
 			clock-names = "tmu_apbif", "tmu_sclk";
-			#include "exynos7-tmu-sensor-conf.dtsi"
+			#thermal-sensor-cells = <0>;
 		};
 
 		thermal-zones {
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 43+ messages in thread

* Re: [PATCH 01/14] thermal: exynos: Reading temperature makes sense only when TMU is turned on
  2018-04-16 10:11     ` [PATCH 01/14] thermal: exynos: Reading temperature makes sense only when TMU is turned on Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:06       ` Daniel Lezcano
       [not found]         ` <CGME20180416121746eucas1p1de1cf16bcf7d8fdccd87ac41db735ef6@eucas1p1.samsung.com>
  0 siblings, 1 reply; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 12:06 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel, Marek Szyprowski

On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> From: Marek Szyprowski <m.szyprowski@samsung.com>
> 
> When thermal sensor is not yet enabled, reading temperature might return
> random value. This might even result in stopping system booting when such
> temperature is higher than the critical value. Fix this by checking if TMU
> has been actually enabled before reading the temperature.
> 
> This change fixes booting of Exynos4210-based board with TMU enabled (for
> example Samsung Trats board), which was broken since v4.4 kernel release.

Why not move the thermal_zone_of_sensor_register *after* initializing
the sensor ?

> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> Fixes: 9e4249b40340 ("thermal: exynos: Fix first temperature read after registering sensor")
> CC: stable@vger.kernel.org # v4.6+
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 13/14] ARM: dts: exynos: remove no longer needed samsung thermal properties
  2018-04-16 10:12     ` [PATCH 13/14] ARM: dts: exynos: remove no longer needed samsung thermal properties Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:16       ` Krzysztof Kozlowski
  2018-06-20 19:17       ` Krzysztof Kozlowski
  1 sibling, 0 replies; 43+ messages in thread
From: Krzysztof Kozlowski @ 2018-04-16 12:16 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Eduardo Valentin, Zhang Rui, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel

On Mon, Apr 16, 2018 at 12:12 PM, Bartlomiej Zolnierkiewicz
<b.zolnierkie@samsung.com> wrote:
> Remove no longer needed samsung thermal properties.
>
> There should be no functional changes caused by this patch.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
>  arch/arm/boot/dts/exynos3250.dtsi                 |  2 +-
>  arch/arm/boot/dts/exynos4.dtsi                    |  2 +-
>  arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi | 20 --------------------
>  arch/arm/boot/dts/exynos5250.dtsi                 |  2 +-
>  arch/arm/boot/dts/exynos5410.dtsi                 |  8 ++++----
>  arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi | 21 ---------------------
>  arch/arm/boot/dts/exynos5420.dtsi                 | 10 +++++-----
>  arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi | 20 --------------------
>  arch/arm/boot/dts/exynos5440.dtsi                 |  6 +++---
>  9 files changed, 15 insertions(+), 76 deletions(-)
>  delete mode 100644 arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi
>  delete mode 100644 arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi
>  delete mode 100644 arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi

Thanks for splitting. Looks good. I'll take both (#13 and #14) after
thermal changes hit mainline (so probably for v4.19).
https://patchwork.kernel.org/bundle/krzk/for-v4.19/

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 02/14] thermal: exynos: Propagate error value from tmu_read()
  2018-04-16 10:11     ` [PATCH 02/14] thermal: exynos: Propagate error value from tmu_read() Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:16       ` Daniel Lezcano
       [not found]         ` <CGME20180416123502eucas1p1113fb99938a09a6f425e0ed6bfa6be60@eucas1p1.samsung.com>
  0 siblings, 1 reply; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 12:16 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel, Marek Szyprowski

On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> From: Marek Szyprowski <m.szyprowski@samsung.com>
> 
> tmu_read() in case of Exynos4210 might return error for out of bound
> values. Current code ignores such value, what leads to reporting critical
> temperature value. Add proper error code propagation to exynos_get_temp()
> function.

For me the comment in the function exynos4210_tmu_read

/* "temp_code" should range between 75 and 175 */

... is strange. I would double check this assertion before dealing with
the error value.

> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> CC: stable@vger.kernel.org # v4.6+
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
>  drivers/thermal/samsung/exynos_tmu.c | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
> index 986cbd0..ac83f72 100644
> --- a/drivers/thermal/samsung/exynos_tmu.c
> +++ b/drivers/thermal/samsung/exynos_tmu.c
> @@ -892,6 +892,7 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on)
>  static int exynos_get_temp(void *p, int *temp)
>  {
>  	struct exynos_tmu_data *data = p;
> +	int value, ret = 0;
>  
>  	if (!data || !data->tmu_read || !data->enabled)
>  		return -EINVAL;
> @@ -899,12 +900,16 @@ static int exynos_get_temp(void *p, int *temp)
>  	mutex_lock(&data->lock);
>  	clk_enable(data->clk);
>  
> -	*temp = code_to_temp(data, data->tmu_read(data)) * MCELSIUS;
> +	value = data->tmu_read(data);
> +	if (value < 0)
> +		ret = value;
> +	else
> +		*temp = code_to_temp(data, value) * MCELSIUS;
>  
>  	clk_disable(data->clk);
>  	mutex_unlock(&data->lock);
>  
> -	return 0;
> +	return ret;
>  }
>  
>  #ifdef CONFIG_THERMAL_EMULATION
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 01/14] thermal: exynos: Reading temperature makes sense only when TMU is turned on
       [not found]         ` <CGME20180416121746eucas1p1de1cf16bcf7d8fdccd87ac41db735ef6@eucas1p1.samsung.com>
@ 2018-04-16 12:17           ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:39             ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 12:17 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel, Marek Szyprowski

On Monday, April 16, 2018 02:06:41 PM Daniel Lezcano wrote:
> On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> > From: Marek Szyprowski <m.szyprowski@samsung.com>
> > 
> > When thermal sensor is not yet enabled, reading temperature might return
> > random value. This might even result in stopping system booting when such
> > temperature is higher than the critical value. Fix this by checking if TMU
> > has been actually enabled before reading the temperature.
> > 
> > This change fixes booting of Exynos4210-based board with TMU enabled (for
> > example Samsung Trats board), which was broken since v4.4 kernel release.
> 
> Why not move the thermal_zone_of_sensor_register *after* initializing
> the sensor ?

For initializing the sensor we need data obtained from
therm_zone_of_sensor_register() so it cannot be easily
done (especially since we also want the fix to be
ported to -stable kernels). For more detailed description
please see:

https://lkml.org/lkml/2018/4/10/376

> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > Fixes: 9e4249b40340 ("thermal: exynos: Fix first temperature read after registering sensor")
> > CC: stable@vger.kernel.org # v4.6+
> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 03/14] thermal: exynos: Read soc_type from match data
  2018-04-16 10:11     ` [PATCH 03/14] thermal: exynos: Read soc_type from match data Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:19       ` Daniel Lezcano
       [not found]         ` <CGME20180416124129eucas1p1545c737e0feb0f9f2c327b8597c46bce@eucas1p1.samsung.com>
  0 siblings, 1 reply; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 12:19 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel, Maciej Purski

On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> From: Maciej Purski <m.purski@samsung.com>
> 
> Device context's field data->soc is currently obtained by comparing
> of_compatible's. Provide soc_type as .data field in device's match
> table, as it is done in most drivers.
> 
> Signed-off-by: Maciej Purski <m.purski@samsung.com>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 02/14] thermal: exynos: Propagate error value from tmu_read()
       [not found]         ` <CGME20180416123502eucas1p1113fb99938a09a6f425e0ed6bfa6be60@eucas1p1.samsung.com>
@ 2018-04-16 12:35           ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:41             ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 12:35 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel, Marek Szyprowski

On Monday, April 16, 2018 02:16:56 PM Daniel Lezcano wrote:
> On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> > From: Marek Szyprowski <m.szyprowski@samsung.com>
> > 
> > tmu_read() in case of Exynos4210 might return error for out of bound
> > values. Current code ignores such value, what leads to reporting critical
> > temperature value. Add proper error code propagation to exynos_get_temp()
> > function.
> 
> For me the comment in the function exynos4210_tmu_read
> 
> /* "temp_code" should range between 75 and 175 */
> 
> ... is strange. I would double check this assertion before dealing with
> the error value.

static int exynos4210_tmu_read(struct exynos_tmu_data *data)
{
	int ret = readb(data->base + EXYNOS_TMU_REG_CURRENT_TEMP);

	/* "temp_code" should range between 75 and 175 */
	return (ret < 75 || ret > 175) ? -ENODATA : ret;
}

The value returned by Exynos4210 hardware should be > 75 && < 175 and
it is later used as the "temp_code" parameter for code_to_temp():

static int code_to_temp(struct exynos_tmu_data *data, u16 temp_code)
{
	if (data->cal_type == TYPE_ONE_POINT_TRIMMING)
		return temp_code - data->temp_error1 + EXYNOS_FIRST_POINT_TRIM;

	return (temp_code - data->temp_error1) *
		(EXYNOS_SECOND_POINT_TRIM - EXYNOS_FIRST_POINT_TRIM) /
		(data->temp_error2 - data->temp_error1) +
		EXYNOS_FIRST_POINT_TRIM;
}

so after the current fix the code finally matches the comment.

> > Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> > CC: stable@vger.kernel.org # v4.6+
> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > ---
> >  drivers/thermal/samsung/exynos_tmu.c | 9 +++++++--
> >  1 file changed, 7 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
> > index 986cbd0..ac83f72 100644
> > --- a/drivers/thermal/samsung/exynos_tmu.c
> > +++ b/drivers/thermal/samsung/exynos_tmu.c
> > @@ -892,6 +892,7 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on)
> >  static int exynos_get_temp(void *p, int *temp)
> >  {
> >  	struct exynos_tmu_data *data = p;
> > +	int value, ret = 0;
> >  
> >  	if (!data || !data->tmu_read || !data->enabled)
> >  		return -EINVAL;
> > @@ -899,12 +900,16 @@ static int exynos_get_temp(void *p, int *temp)
> >  	mutex_lock(&data->lock);
> >  	clk_enable(data->clk);
> >  
> > -	*temp = code_to_temp(data, data->tmu_read(data)) * MCELSIUS;
> > +	value = data->tmu_read(data);
> > +	if (value < 0)
> > +		ret = value;
> > +	else
> > +		*temp = code_to_temp(data, value) * MCELSIUS;
> >  
> >  	clk_disable(data->clk);
> >  	mutex_unlock(&data->lock);
> >  
> > -	return 0;
> > +	return ret;
> >  }
> >  
> >  #ifdef CONFIG_THERMAL_EMULATION

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 01/14] thermal: exynos: Reading temperature makes sense only when TMU is turned on
  2018-04-16 12:17           ` Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:39             ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 12:39 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel, Marek Szyprowski

On 16/04/2018 14:17, Bartlomiej Zolnierkiewicz wrote:
> On Monday, April 16, 2018 02:06:41 PM Daniel Lezcano wrote:
>> On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
>>> From: Marek Szyprowski <m.szyprowski@samsung.com>
>>>
>>> When thermal sensor is not yet enabled, reading temperature might return
>>> random value. This might even result in stopping system booting when such
>>> temperature is higher than the critical value. Fix this by checking if TMU
>>> has been actually enabled before reading the temperature.
>>>
>>> This change fixes booting of Exynos4210-based board with TMU enabled (for
>>> example Samsung Trats board), which was broken since v4.4 kernel release.
>>
>> Why not move the thermal_zone_of_sensor_register *after* initializing
>> the sensor ?
> 
> For initializing the sensor we need data obtained from
> therm_zone_of_sensor_register() so it cannot be easily
> done (especially since we also want the fix to be
> ported to -stable kernels). For more detailed description
> please see:
> 
> https://lkml.org/lkml/2018/4/10/376

I see, a chicken egg problem :/

Thanks for the pointer.


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 03/14] thermal: exynos: Read soc_type from match data
       [not found]         ` <CGME20180416124129eucas1p1545c737e0feb0f9f2c327b8597c46bce@eucas1p1.samsung.com>
@ 2018-04-16 12:41           ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:47             ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 12:41 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel, Maciej Purski

On Monday, April 16, 2018 02:19:30 PM Daniel Lezcano wrote:
> On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> > From: Maciej Purski <m.purski@samsung.com>
> > 
> > Device context's field data->soc is currently obtained by comparing
> > of_compatible's. Provide soc_type as .data field in device's match
> > table, as it is done in most drivers.
> > 
> > Signed-off-by: Maciej Purski <m.purski@samsung.com>
> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > ---
> 
> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Zhang & Eduardo are Thermal Maintainers (+ I'm Maintainer for
Samsung Thermal) so I assume you meant "Reviewed-by:"?

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 02/14] thermal: exynos: Propagate error value from tmu_read()
  2018-04-16 12:35           ` Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:41             ` Daniel Lezcano
       [not found]               ` <CGME20180416124956eucas1p17636602f59e7ad83088253ed369e7894@eucas1p1.samsung.com>
  0 siblings, 1 reply; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 12:41 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel, Marek Szyprowski

On 16/04/2018 14:35, Bartlomiej Zolnierkiewicz wrote:
> On Monday, April 16, 2018 02:16:56 PM Daniel Lezcano wrote:
>> On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
>>> From: Marek Szyprowski <m.szyprowski@samsung.com>
>>>
>>> tmu_read() in case of Exynos4210 might return error for out of bound
>>> values. Current code ignores such value, what leads to reporting critical
>>> temperature value. Add proper error code propagation to exynos_get_temp()
>>> function.
>>
>> For me the comment in the function exynos4210_tmu_read
>>
>> /* "temp_code" should range between 75 and 175 */
>>
>> ... is strange. I would double check this assertion before dealing with
>> the error value.
> 
> static int exynos4210_tmu_read(struct exynos_tmu_data *data)
> {
> 	int ret = readb(data->base + EXYNOS_TMU_REG_CURRENT_TEMP);
> 
> 	/* "temp_code" should range between 75 and 175 */
> 	return (ret < 75 || ret > 175) ? -ENODATA : ret;
> }
> 

But I don't get why it *should* ?

Shouldn't be the same with the 4412, it seems having the same sensor, no?


> The value returned by Exynos4210 hardware should be > 75 && < 175 and
> it is later used as the "temp_code" parameter for code_to_temp():
> 
> static int code_to_temp(struct exynos_tmu_data *data, u16 temp_code)
> {
> 	if (data->cal_type == TYPE_ONE_POINT_TRIMMING)
> 		return temp_code - data->temp_error1 + EXYNOS_FIRST_POINT_TRIM;
> 
> 	return (temp_code - data->temp_error1) *
> 		(EXYNOS_SECOND_POINT_TRIM - EXYNOS_FIRST_POINT_TRIM) /
> 		(data->temp_error2 - data->temp_error1) +
> 		EXYNOS_FIRST_POINT_TRIM;
> }
> 
> so after the current fix the code finally matches the comment.
> 
>>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>> CC: stable@vger.kernel.org # v4.6+
>>> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>>> ---
>>>  drivers/thermal/samsung/exynos_tmu.c | 9 +++++++--
>>>  1 file changed, 7 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
>>> index 986cbd0..ac83f72 100644
>>> --- a/drivers/thermal/samsung/exynos_tmu.c
>>> +++ b/drivers/thermal/samsung/exynos_tmu.c
>>> @@ -892,6 +892,7 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on)
>>>  static int exynos_get_temp(void *p, int *temp)
>>>  {
>>>  	struct exynos_tmu_data *data = p;
>>> +	int value, ret = 0;
>>>  
>>>  	if (!data || !data->tmu_read || !data->enabled)
>>>  		return -EINVAL;
>>> @@ -899,12 +900,16 @@ static int exynos_get_temp(void *p, int *temp)
>>>  	mutex_lock(&data->lock);
>>>  	clk_enable(data->clk);
>>>  
>>> -	*temp = code_to_temp(data, data->tmu_read(data)) * MCELSIUS;
>>> +	value = data->tmu_read(data);
>>> +	if (value < 0)
>>> +		ret = value;
>>> +	else
>>> +		*temp = code_to_temp(data, value) * MCELSIUS;
>>>  
>>>  	clk_disable(data->clk);
>>>  	mutex_unlock(&data->lock);
>>>  
>>> -	return 0;
>>> +	return ret;
>>>  }
>>>  
>>>  #ifdef CONFIG_THERMAL_EMULATION
> 
> Best regards,
> --
> Bartlomiej Zolnierkiewicz
> Samsung R&D Institute Poland
> Samsung Electronics
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 03/14] thermal: exynos: Read soc_type from match data
  2018-04-16 12:41           ` Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:47             ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 12:47 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel, Maciej Purski

On 16/04/2018 14:41, Bartlomiej Zolnierkiewicz wrote:
> On Monday, April 16, 2018 02:19:30 PM Daniel Lezcano wrote:
>> On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
>>> From: Maciej Purski <m.purski@samsung.com>
>>>
>>> Device context's field data->soc is currently obtained by comparing
>>> of_compatible's. Provide soc_type as .data field in device's match
>>> table, as it is done in most drivers.
>>>
>>> Signed-off-by: Maciej Purski <m.purski@samsung.com>
>>> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>>> ---
>>
>> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
> 
> Zhang & Eduardo are Thermal Maintainers (+ I'm Maintainer for
> Samsung Thermal) so I assume you meant "Reviewed-by:"?

I meant Acked-by :) I don't have to be a subsystem maintainer to ack a
patch. The reviewed-by has a stronger statement than the acked-by.

The patch looks good to me.

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 02/14] thermal: exynos: Propagate error value from tmu_read()
       [not found]               ` <CGME20180416124956eucas1p17636602f59e7ad83088253ed369e7894@eucas1p1.samsung.com>
@ 2018-04-16 12:49                 ` Bartlomiej Zolnierkiewicz
  2018-04-16 12:54                   ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 12:49 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel, Marek Szyprowski

On Monday, April 16, 2018 02:41:48 PM Daniel Lezcano wrote:
> On 16/04/2018 14:35, Bartlomiej Zolnierkiewicz wrote:
> > On Monday, April 16, 2018 02:16:56 PM Daniel Lezcano wrote:
> >> On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> >>> From: Marek Szyprowski <m.szyprowski@samsung.com>
> >>>
> >>> tmu_read() in case of Exynos4210 might return error for out of bound
> >>> values. Current code ignores such value, what leads to reporting critical
> >>> temperature value. Add proper error code propagation to exynos_get_temp()
> >>> function.
> >>
> >> For me the comment in the function exynos4210_tmu_read
> >>
> >> /* "temp_code" should range between 75 and 175 */
> >>
> >> ... is strange. I would double check this assertion before dealing with
> >> the error value.
> > 
> > static int exynos4210_tmu_read(struct exynos_tmu_data *data)
> > {
> > 	int ret = readb(data->base + EXYNOS_TMU_REG_CURRENT_TEMP);
> > 
> > 	/* "temp_code" should range between 75 and 175 */
> > 	return (ret < 75 || ret > 175) ? -ENODATA : ret;
> > }
> > 
> 
> But I don't get why it *should* ?

Because of hardware design.

> Shouldn't be the same with the 4412, it seems having the same sensor, no?

Probably same limitations apply to all SoCs (Exynos4412 has very similar
sensor) but the driver currently lacks the needed checks for them (it is
on TODO but other things have higher priority).

> > The value returned by Exynos4210 hardware should be > 75 && < 175 and
> > it is later used as the "temp_code" parameter for code_to_temp():
> > 
> > static int code_to_temp(struct exynos_tmu_data *data, u16 temp_code)
> > {
> > 	if (data->cal_type == TYPE_ONE_POINT_TRIMMING)
> > 		return temp_code - data->temp_error1 + EXYNOS_FIRST_POINT_TRIM;
> > 
> > 	return (temp_code - data->temp_error1) *
> > 		(EXYNOS_SECOND_POINT_TRIM - EXYNOS_FIRST_POINT_TRIM) /
> > 		(data->temp_error2 - data->temp_error1) +
> > 		EXYNOS_FIRST_POINT_TRIM;
> > }
> > 
> > so after the current fix the code finally matches the comment.
> > 
> >>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> >>> CC: stable@vger.kernel.org # v4.6+
> >>> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> >>> ---
> >>>  drivers/thermal/samsung/exynos_tmu.c | 9 +++++++--
> >>>  1 file changed, 7 insertions(+), 2 deletions(-)
> >>>
> >>> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
> >>> index 986cbd0..ac83f72 100644
> >>> --- a/drivers/thermal/samsung/exynos_tmu.c
> >>> +++ b/drivers/thermal/samsung/exynos_tmu.c
> >>> @@ -892,6 +892,7 @@ static void exynos7_tmu_control(struct platform_device *pdev, bool on)
> >>>  static int exynos_get_temp(void *p, int *temp)
> >>>  {
> >>>  	struct exynos_tmu_data *data = p;
> >>> +	int value, ret = 0;
> >>>  
> >>>  	if (!data || !data->tmu_read || !data->enabled)
> >>>  		return -EINVAL;
> >>> @@ -899,12 +900,16 @@ static int exynos_get_temp(void *p, int *temp)
> >>>  	mutex_lock(&data->lock);
> >>>  	clk_enable(data->clk);
> >>>  
> >>> -	*temp = code_to_temp(data, data->tmu_read(data)) * MCELSIUS;
> >>> +	value = data->tmu_read(data);
> >>> +	if (value < 0)
> >>> +		ret = value;
> >>> +	else
> >>> +		*temp = code_to_temp(data, value) * MCELSIUS;
> >>>  
> >>>  	clk_disable(data->clk);
> >>>  	mutex_unlock(&data->lock);
> >>>  
> >>> -	return 0;
> >>> +	return ret;
> >>>  }
> >>>  
> >>>  #ifdef CONFIG_THERMAL_EMULATION

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 04/14] thermal: exynos: remove unused "type" field from struct exynos_tmu_platform_data
  2018-04-16 10:11     ` [PATCH 04/14] thermal: exynos: remove unused "type" field from struct exynos_tmu_platform_data Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:50       ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 12:50 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel

On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> Remove unused "type" field from struct exynos_tmu_platform_data.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---

Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>


>  drivers/thermal/samsung/exynos_tmu.h | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
> index 5149c2a..8c468b6 100644
> --- a/drivers/thermal/samsung/exynos_tmu.h
> +++ b/drivers/thermal/samsung/exynos_tmu.h
> @@ -47,7 +47,6 @@ enum soc_type {
>   *	0 < reference_voltage <= 31
>   * @noise_cancel_mode: noise cancellation mode
>   *	000, 100, 101, 110 and 111 can be different modes
> - * @type: determines the type of SOC
>   * @efuse_value: platform defined fuse value
>   * @min_efuse_value: minimum valid trimming data
>   * @max_efuse_value: maximum valid trimming data
> @@ -68,7 +67,6 @@ struct exynos_tmu_platform_data {
>  	u8 second_point_trim;
>  	u8 default_temp_offset;
>  
> -	enum soc_type type;
>  	u32 cal_type;
>  };
>  
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 02/14] thermal: exynos: Propagate error value from tmu_read()
  2018-04-16 12:49                 ` Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:54                   ` Daniel Lezcano
       [not found]                     ` <CGME20180416130254eucas1p24732958e5b202cacaddc69cde747a478@eucas1p2.samsung.com>
  0 siblings, 1 reply; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 12:54 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel, Marek Szyprowski

On 16/04/2018 14:49, Bartlomiej Zolnierkiewicz wrote:
> On Monday, April 16, 2018 02:41:48 PM Daniel Lezcano wrote:
>> On 16/04/2018 14:35, Bartlomiej Zolnierkiewicz wrote:
>>> On Monday, April 16, 2018 02:16:56 PM Daniel Lezcano wrote:
>>>> On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
>>>>> From: Marek Szyprowski <m.szyprowski@samsung.com>
>>>>>
>>>>> tmu_read() in case of Exynos4210 might return error for out of bound
>>>>> values. Current code ignores such value, what leads to reporting critical
>>>>> temperature value. Add proper error code propagation to exynos_get_temp()
>>>>> function.
>>>>
>>>> For me the comment in the function exynos4210_tmu_read
>>>>
>>>> /* "temp_code" should range between 75 and 175 */
>>>>
>>>> ... is strange. I would double check this assertion before dealing with
>>>> the error value.
>>>
>>> static int exynos4210_tmu_read(struct exynos_tmu_data *data)
>>> {
>>> 	int ret = readb(data->base + EXYNOS_TMU_REG_CURRENT_TEMP);
>>>
>>> 	/* "temp_code" should range between 75 and 175 */
>>> 	return (ret < 75 || ret > 175) ? -ENODATA : ret;
>>> }
>>>
>>
>> But I don't get why it *should* ?
> 
> Because of hardware design.
> 
>> Shouldn't be the same with the 4412, it seems having the same sensor, no?
> 
> Probably same limitations apply to all SoCs (Exynos4412 has very similar
> sensor) but the driver currently lacks the needed checks for them (it is
> on TODO but other things have higher priority).


I understand. Why the other boards are not reporting a critical value?




-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 05/14] thermal: exynos: remove parsing of samsung,tmu_default_temp_offset property
  2018-04-16 10:11     ` [PATCH 05/14] thermal: exynos: remove parsing of samsung,tmu_default_temp_offset property Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:55       ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 12:55 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel

On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> Trimming (one point based or two points based) is always used for
> the temperature calibration and the default non-trimming code is
> never reached. Remove it and then remove no longer needed parsing
> of samsung,tmu_default_temp_offset property.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---

Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>

This one was easy :)


>  drivers/thermal/samsung/exynos_tmu.c | 48 ++++++++++--------------------------
>  drivers/thermal/samsung/exynos_tmu.h |  2 --
>  2 files changed, 13 insertions(+), 37 deletions(-)
> 
> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
> index d7a3c3c..958a7c4 100644
> --- a/drivers/thermal/samsung/exynos_tmu.c
> +++ b/drivers/thermal/samsung/exynos_tmu.c
> @@ -249,24 +249,14 @@ static void exynos_report_trigger(struct exynos_tmu_data *p)
>  static int temp_to_code(struct exynos_tmu_data *data, u8 temp)
>  {
>  	struct exynos_tmu_platform_data *pdata = data->pdata;
> -	int temp_code;
> -
> -	switch (pdata->cal_type) {
> -	case TYPE_TWO_POINT_TRIMMING:
> -		temp_code = (temp - pdata->first_point_trim) *
> -			(data->temp_error2 - data->temp_error1) /
> -			(pdata->second_point_trim - pdata->first_point_trim) +
> -			data->temp_error1;
> -		break;
> -	case TYPE_ONE_POINT_TRIMMING:
> -		temp_code = temp + data->temp_error1 - pdata->first_point_trim;
> -		break;
> -	default:
> -		temp_code = temp + pdata->default_temp_offset;
> -		break;
> -	}
>  
> -	return temp_code;
> +	if (pdata->cal_type == TYPE_ONE_POINT_TRIMMING)
> +		return temp + data->temp_error1 - pdata->first_point_trim;
> +
> +	return (temp - pdata->first_point_trim) *
> +		(data->temp_error2 - data->temp_error1) /
> +		(pdata->second_point_trim - pdata->first_point_trim) +
> +		data->temp_error1;
>  }
>  
>  /*
> @@ -276,24 +266,14 @@ static int temp_to_code(struct exynos_tmu_data *data, u8 temp)
>  static int code_to_temp(struct exynos_tmu_data *data, u16 temp_code)
>  {
>  	struct exynos_tmu_platform_data *pdata = data->pdata;
> -	int temp;
>  
> -	switch (pdata->cal_type) {
> -	case TYPE_TWO_POINT_TRIMMING:
> -		temp = (temp_code - data->temp_error1) *
> -			(pdata->second_point_trim - pdata->first_point_trim) /
> -			(data->temp_error2 - data->temp_error1) +
> -			pdata->first_point_trim;
> -		break;
> -	case TYPE_ONE_POINT_TRIMMING:
> -		temp = temp_code - data->temp_error1 + pdata->first_point_trim;
> -		break;
> -	default:
> -		temp = temp_code - pdata->default_temp_offset;
> -		break;
> -	}
> +	if (pdata->cal_type == TYPE_ONE_POINT_TRIMMING)
> +		return temp_code - data->temp_error1 + pdata->first_point_trim;
>  
> -	return temp;
> +	return (temp_code - data->temp_error1) *
> +		(pdata->second_point_trim - pdata->first_point_trim) /
> +		(data->temp_error2 - data->temp_error1) +
> +		pdata->first_point_trim;
>  }
>  
>  static void sanitize_temp_error(struct exynos_tmu_data *data, u32 trim_info)
> @@ -1166,8 +1146,6 @@ static int exynos_of_sensor_conf(struct device_node *np,
>  	pdata->first_point_trim = (u8)value;
>  	of_property_read_u32(np, "samsung,tmu_second_point_trim", &value);
>  	pdata->second_point_trim = (u8)value;
> -	of_property_read_u32(np, "samsung,tmu_default_temp_offset", &value);
> -	pdata->default_temp_offset = (u8)value;
>  
>  	of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type);
>  
> diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h
> index 8c468b6..a7e81b4 100644
> --- a/drivers/thermal/samsung/exynos_tmu.h
> +++ b/drivers/thermal/samsung/exynos_tmu.h
> @@ -50,7 +50,6 @@ enum soc_type {
>   * @efuse_value: platform defined fuse value
>   * @min_efuse_value: minimum valid trimming data
>   * @max_efuse_value: maximum valid trimming data
> - * @default_temp_offset: default temperature offset in case of no trimming
>   * @cal_type: calibration type for temperature
>   *
>   * This structure is required for configuration of exynos_tmu driver.
> @@ -65,7 +64,6 @@ struct exynos_tmu_platform_data {
>  	u32 max_efuse_value;
>  	u8 first_point_trim;
>  	u8 second_point_trim;
> -	u8 default_temp_offset;
>  
>  	u32 cal_type;
>  };
> 


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 06/14] thermal: exynos: remove parsing of samsung,tmu_[first,second]_point_trim properties
  2018-04-16 10:11     ` [PATCH 06/14] thermal: exynos: remove parsing of samsung,tmu_[first,second]_point_trim properties Bartlomiej Zolnierkiewicz
@ 2018-04-16 12:57       ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 12:57 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel

On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> All SoCs use the same values (25, 85) for trim points (except
> Exynos5440 which currently specifices value 70 for the second trim
> point -> it seems to be a mistake because documentation uses value
> 85 and two points based trimming has never been used by the driver
> for this SoC anyway) so just make it explicit and remove parsing of
> samsung,tmu_[first,second]_point_trim properties.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---

Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org



-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 14/14] arm64: dts: exynos: remove no longer needed samsung thermal properties
  2018-04-16 10:12     ` [PATCH 14/14] arm64: " Bartlomiej Zolnierkiewicz
@ 2018-04-16 13:02       ` Daniel Lezcano
       [not found]         ` <CGME20180416130917eucas1p10012e5d79bf59adc677e7e2364bae589@eucas1p1.samsung.com>
  2018-06-20 19:19       ` Krzysztof Kozlowski
  1 sibling, 1 reply; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 13:02 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel

On 16/04/2018 12:12, Bartlomiej Zolnierkiewicz wrote:
> Remove no longer needed samsung thermal properties.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
Can you add an additional patch to remove the Documentation ?

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 02/14] thermal: exynos: Propagate error value from tmu_read()
       [not found]                     ` <CGME20180416130254eucas1p24732958e5b202cacaddc69cde747a478@eucas1p2.samsung.com>
@ 2018-04-16 13:02                       ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 13:02 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel, Marek Szyprowski

On Monday, April 16, 2018 02:54:01 PM Daniel Lezcano wrote:
> On 16/04/2018 14:49, Bartlomiej Zolnierkiewicz wrote:
> > On Monday, April 16, 2018 02:41:48 PM Daniel Lezcano wrote:
> >> On 16/04/2018 14:35, Bartlomiej Zolnierkiewicz wrote:
> >>> On Monday, April 16, 2018 02:16:56 PM Daniel Lezcano wrote:
> >>>> On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> >>>>> From: Marek Szyprowski <m.szyprowski@samsung.com>
> >>>>>
> >>>>> tmu_read() in case of Exynos4210 might return error for out of bound
> >>>>> values. Current code ignores such value, what leads to reporting critical
> >>>>> temperature value. Add proper error code propagation to exynos_get_temp()
> >>>>> function.
> >>>>
> >>>> For me the comment in the function exynos4210_tmu_read
> >>>>
> >>>> /* "temp_code" should range between 75 and 175 */
> >>>>
> >>>> ... is strange. I would double check this assertion before dealing with
> >>>> the error value.
> >>>
> >>> static int exynos4210_tmu_read(struct exynos_tmu_data *data)
> >>> {
> >>> 	int ret = readb(data->base + EXYNOS_TMU_REG_CURRENT_TEMP);
> >>>
> >>> 	/* "temp_code" should range between 75 and 175 */
> >>> 	return (ret < 75 || ret > 175) ? -ENODATA : ret;
> >>> }
> >>>
> >>
> >> But I don't get why it *should* ?
> > 
> > Because of hardware design.
> > 
> >> Shouldn't be the same with the 4412, it seems having the same sensor, no?
> > 
> > Probably same limitations apply to all SoCs (Exynos4412 has very similar
> > sensor) but the driver currently lacks the needed checks for them (it is
> > on TODO but other things have higher priority).
> 
> 
> I understand. Why the other boards are not reporting a critical value?

->tmu_read methods for other SoCs currently lack hardware limitations
checking so they don't return negative values (which before fix was passed
to code_to_temp() unchecked and was mapped to critical temperature value).

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 07/14] thermal: exynos: remove parsing of samsung,tmu_noise_cancel_mode property
  2018-04-16 10:11     ` [PATCH 07/14] thermal: exynos: remove parsing of samsung,tmu_noise_cancel_mode property Bartlomiej Zolnierkiewicz
@ 2018-04-16 13:03       ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 13:03 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel

On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> All SoCs use the same value (4) for the noise cancel mode so just
> make it explicit and remove parsing of samsung,tmu_noise_cancel_mode
> property.
> 
> There should be no functional changes caused by this patch.
>
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>

Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 14/14] arm64: dts: exynos: remove no longer needed samsung thermal properties
       [not found]         ` <CGME20180416130917eucas1p10012e5d79bf59adc677e7e2364bae589@eucas1p1.samsung.com>
@ 2018-04-16 13:09           ` Bartlomiej Zolnierkiewicz
  2018-04-16 13:10             ` Daniel Lezcano
  0 siblings, 1 reply; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 13:09 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel

On Monday, April 16, 2018 03:02:45 PM Daniel Lezcano wrote:
> On 16/04/2018 12:12, Bartlomiej Zolnierkiewicz wrote:
> > Remove no longer needed samsung thermal properties.
> > 
> > There should be no functional changes caused by this patch.
> > 
> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > ---
> Can you add an additional patch to remove the Documentation ?

"dt-bindings: thermal: remove no longer needed samsung thermal properties"
(https://www.spinics.net/lists/linux-samsung-soc/msg62324.html)
is already present in linux-soc-thermal-tree (Eduardo has not dropped it)

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 14/14] arm64: dts: exynos: remove no longer needed samsung thermal properties
  2018-04-16 13:09           ` Bartlomiej Zolnierkiewicz
@ 2018-04-16 13:10             ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 13:10 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel

On 16/04/2018 15:09, Bartlomiej Zolnierkiewicz wrote:
> On Monday, April 16, 2018 03:02:45 PM Daniel Lezcano wrote:
>> On 16/04/2018 12:12, Bartlomiej Zolnierkiewicz wrote:
>>> Remove no longer needed samsung thermal properties.
>>>
>>> There should be no functional changes caused by this patch.
>>>
>>> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
>>> ---
>> Can you add an additional patch to remove the Documentation ?
> 
> "dt-bindings: thermal: remove no longer needed samsung thermal properties"
> (https://www.spinics.net/lists/linux-samsung-soc/msg62324.html)
> is already present in linux-soc-thermal-tree (Eduardo has not dropped it)

Ah, ok. Sorry for the noise.



-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 08/14] thermal: exynos: remove parsing of samsung,tmu[_min,_max]_efuse_value properties
  2018-04-16 10:11     ` [PATCH 08/14] thermal: exynos: remove parsing of samsung,tmu[_min,_max]_efuse_value properties Bartlomiej Zolnierkiewicz
@ 2018-04-16 13:15       ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 13:15 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel

On 16/04/2018 12:11, Bartlomiej Zolnierkiewicz wrote:
> Since pdata efuse values are SoC (not platform) specific just move
> them from platform data to struct exynos_tmu_data instance. Then
> remove parsing of samsung,tmu[_,min_,max]_efuse_value properties.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
>  drivers/thermal/samsung/exynos_tmu.c | 49 +++++++++++++++++++++++-------------
>

Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 09/14] thermal: exynos: remove parsing of samsung,tmu_reference_voltage property
  2018-04-16 10:12     ` [PATCH 09/14] thermal: exynos: remove parsing of samsung,tmu_reference_voltage property Bartlomiej Zolnierkiewicz
@ 2018-04-16 13:16       ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 13:16 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel

On 16/04/2018 12:12, Bartlomiej Zolnierkiewicz wrote:
> Since pdata reference_voltage values are SoC (not platform) specific
> just move it from platform data to struct exynos_tmu_data instance.
> Then remove parsing of samsung,tmu_reference_voltage property.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---


Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 10/14] thermal: exynos: remove parsing of samsung,tmu_gain property
  2018-04-16 10:12     ` [PATCH 10/14] thermal: exynos: remove parsing of samsung,tmu_gain property Bartlomiej Zolnierkiewicz
@ 2018-04-16 13:18       ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 13:18 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel

On 16/04/2018 12:12, Bartlomiej Zolnierkiewicz wrote:
> Since pdata gain values are SoC (not platform) specific just move
> it from platform data to struct exynos_tmu_data instance. Then
> remove parsing of samsung,tmu_gain property.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---

Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>

-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 11/14] thermal: exynos: remove parsing of samsung,tmu_cal_type property
  2018-04-16 10:12     ` [PATCH 11/14] thermal: exynos: remove parsing of samsung,tmu_cal_type property Bartlomiej Zolnierkiewicz
@ 2018-04-16 13:19       ` Daniel Lezcano
  0 siblings, 0 replies; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 13:19 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel

On 16/04/2018 12:12, Bartlomiej Zolnierkiewicz wrote:
> Since calibration type for temperature is SoC (not platform) specific
> just move it from platform data to struct exynos_tmu_data instance.
> Then remove parsing of samsung,tmu_cal_type property. Also remove no
> longer needed platform data structure.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---


Reviewed-by: Daniel Lezcano <daniel.lezcano@linaro.org>


-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 12/14] thermal: exynos: remove separate exynos_tmu.h header file
  2018-04-16 10:12     ` [PATCH 12/14] thermal: exynos: remove separate exynos_tmu.h header file Bartlomiej Zolnierkiewicz
@ 2018-04-16 13:24       ` Daniel Lezcano
       [not found]         ` <CGME20180416142452eucas1p2feb091d3ba51e78f42e93e184eb01291@eucas1p2.samsung.com>
  0 siblings, 1 reply; 43+ messages in thread
From: Daniel Lezcano @ 2018-04-16 13:24 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz, Eduardo Valentin
  Cc: Zhang Rui, Krzysztof Kozlowski, Kukjin Kim, linux-samsung-soc,
	linux-pm, linux-kernel

On 16/04/2018 12:12, Bartlomiej Zolnierkiewicz wrote:
> exynos_tmu.h is used only by exynos_tmu.c so there is no need
> for a separate include file.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
>  drivers/thermal/samsung/exynos_tmu.c | 18 +++++++++++++++-
>  drivers/thermal/samsung/exynos_tmu.h | 41 ------------------------------------
>  2 files changed, 17 insertions(+), 42 deletions(-)
>  delete mode 100644 drivers/thermal/samsung/exynos_tmu.h
> 
> diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
> index 7975f33..197f267 100644
> --- a/drivers/thermal/samsung/exynos_tmu.c
> +++ b/drivers/thermal/samsung/exynos_tmu.c
> @@ -34,8 +34,10 @@
>  #include <linux/of_irq.h>
>  #include <linux/platform_device.h>
>  #include <linux/regulator/consumer.h>
> +#include <linux/cpu_cooling.h>
> +

This one should go away, no ?

Apart this.

Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>





-- 
 <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 12/14] thermal: exynos: remove separate exynos_tmu.h header file
       [not found]         ` <CGME20180416142452eucas1p2feb091d3ba51e78f42e93e184eb01291@eucas1p2.samsung.com>
@ 2018-04-16 14:24           ` Bartlomiej Zolnierkiewicz
  0 siblings, 0 replies; 43+ messages in thread
From: Bartlomiej Zolnierkiewicz @ 2018-04-16 14:24 UTC (permalink / raw)
  To: Daniel Lezcano
  Cc: Eduardo Valentin, Zhang Rui, Krzysztof Kozlowski, Kukjin Kim,
	linux-samsung-soc, linux-pm, linux-kernel

On Monday, April 16, 2018 03:24:57 PM Daniel Lezcano wrote:
> On 16/04/2018 12:12, Bartlomiej Zolnierkiewicz wrote:
> > exynos_tmu.h is used only by exynos_tmu.c so there is no need
> > for a separate include file.
> > 
> > There should be no functional changes caused by this patch.
> > 
> > Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> > ---
> >  drivers/thermal/samsung/exynos_tmu.c | 18 +++++++++++++++-
> >  drivers/thermal/samsung/exynos_tmu.h | 41 ------------------------------------
> >  2 files changed, 17 insertions(+), 42 deletions(-)
> >  delete mode 100644 drivers/thermal/samsung/exynos_tmu.h
> > 
> > diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c
> > index 7975f33..197f267 100644
> > --- a/drivers/thermal/samsung/exynos_tmu.c
> > +++ b/drivers/thermal/samsung/exynos_tmu.c
> > @@ -34,8 +34,10 @@
> >  #include <linux/of_irq.h>
> >  #include <linux/platform_device.h>
> >  #include <linux/regulator/consumer.h>
> > +#include <linux/cpu_cooling.h>
> > +
> 
> This one should go away, no ?

Yes, thanks for noticing (I've just sent v2 of this patch).
.
> Apart this.
> 
> Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>

Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics

^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 13/14] ARM: dts: exynos: remove no longer needed samsung thermal properties
  2018-04-16 10:12     ` [PATCH 13/14] ARM: dts: exynos: remove no longer needed samsung thermal properties Bartlomiej Zolnierkiewicz
  2018-04-16 12:16       ` Krzysztof Kozlowski
@ 2018-06-20 19:17       ` Krzysztof Kozlowski
  1 sibling, 0 replies; 43+ messages in thread
From: Krzysztof Kozlowski @ 2018-06-20 19:17 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Eduardo Valentin, Zhang Rui, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel

On Mon, Apr 16, 2018 at 12:12:04PM +0200, Bartlomiej Zolnierkiewicz wrote:
> Remove no longer needed samsung thermal properties.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
>  arch/arm/boot/dts/exynos3250.dtsi                 |  2 +-
>  arch/arm/boot/dts/exynos4.dtsi                    |  2 +-
>  arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi | 20 --------------------
>  arch/arm/boot/dts/exynos5250.dtsi                 |  2 +-
>  arch/arm/boot/dts/exynos5410.dtsi                 |  8 ++++----
>  arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi | 21 ---------------------
>  arch/arm/boot/dts/exynos5420.dtsi                 | 10 +++++-----
>  arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi | 20 --------------------
>  arch/arm/boot/dts/exynos5440.dtsi                 |  6 +++---
>  9 files changed, 15 insertions(+), 76 deletions(-)
>  delete mode 100644 arch/arm/boot/dts/exynos4412-tmu-sensor-conf.dtsi
>  delete mode 100644 arch/arm/boot/dts/exynos5420-tmu-sensor-conf.dtsi
>  delete mode 100644 arch/arm/boot/dts/exynos5440-tmu-sensor-conf.dtsi
>

A lot of changes came in recently so this does not apply anymore. Could
you rebase on my for-next branch?

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 43+ messages in thread

* Re: [PATCH 14/14] arm64: dts: exynos: remove no longer needed samsung thermal properties
  2018-04-16 10:12     ` [PATCH 14/14] arm64: " Bartlomiej Zolnierkiewicz
  2018-04-16 13:02       ` Daniel Lezcano
@ 2018-06-20 19:19       ` Krzysztof Kozlowski
  1 sibling, 0 replies; 43+ messages in thread
From: Krzysztof Kozlowski @ 2018-06-20 19:19 UTC (permalink / raw)
  To: Bartlomiej Zolnierkiewicz
  Cc: Eduardo Valentin, Zhang Rui, Kukjin Kim, Daniel Lezcano,
	linux-samsung-soc, linux-pm, linux-kernel

On Mon, Apr 16, 2018 at 12:12:05PM +0200, Bartlomiej Zolnierkiewicz wrote:
> Remove no longer needed samsung thermal properties.
> 
> There should be no functional changes caused by this patch.
> 
> Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
> ---
>  .../dts/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi  | 20 --------------------
>  .../boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi | 19 -------------------
>  arch/arm64/boot/dts/exynos/exynos5433.dtsi          | 10 +++++-----
>  .../boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi    | 21 ---------------------
>  arch/arm64/boot/dts/exynos/exynos7.dtsi             |  2 +-
>  5 files changed, 6 insertions(+), 66 deletions(-)
>  delete mode 100644 arch/arm64/boot/dts/exynos/exynos5433-tmu-g3d-sensor-conf.dtsi
>  delete mode 100644 arch/arm64/boot/dts/exynos/exynos5433-tmu-sensor-conf.dtsi
>  delete mode 100644 arch/arm64/boot/dts/exynos/exynos7-tmu-sensor-conf.dtsi
> 

Thanks, applied.

Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2018-06-20 19:19 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20180416101225epcas2p42e345645d822cd869dbdb449becf1c7a@epcas2p4.samsung.com>
2018-04-16 10:11 ` [PATCH 00/14] thermal: exynos: pending fixes and cleanups Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20180416101339epcas2p171d462b70a85a6fff3bb939fca6d469d@epcas2p1.samsung.com>
2018-04-16 10:11     ` [PATCH 01/14] thermal: exynos: Reading temperature makes sense only when TMU is turned on Bartlomiej Zolnierkiewicz
2018-04-16 12:06       ` Daniel Lezcano
     [not found]         ` <CGME20180416121746eucas1p1de1cf16bcf7d8fdccd87ac41db735ef6@eucas1p1.samsung.com>
2018-04-16 12:17           ` Bartlomiej Zolnierkiewicz
2018-04-16 12:39             ` Daniel Lezcano
     [not found]   ` <CGME20180416101350epcas1p46d9415458ec463afb2a071a9f765f0ed@epcas1p4.samsung.com>
2018-04-16 10:11     ` [PATCH 02/14] thermal: exynos: Propagate error value from tmu_read() Bartlomiej Zolnierkiewicz
2018-04-16 12:16       ` Daniel Lezcano
     [not found]         ` <CGME20180416123502eucas1p1113fb99938a09a6f425e0ed6bfa6be60@eucas1p1.samsung.com>
2018-04-16 12:35           ` Bartlomiej Zolnierkiewicz
2018-04-16 12:41             ` Daniel Lezcano
     [not found]               ` <CGME20180416124956eucas1p17636602f59e7ad83088253ed369e7894@eucas1p1.samsung.com>
2018-04-16 12:49                 ` Bartlomiej Zolnierkiewicz
2018-04-16 12:54                   ` Daniel Lezcano
     [not found]                     ` <CGME20180416130254eucas1p24732958e5b202cacaddc69cde747a478@eucas1p2.samsung.com>
2018-04-16 13:02                       ` Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20180416101353epcas2p1793d6079b1a1fbb8b4841ee562b22155@epcas2p1.samsung.com>
2018-04-16 10:11     ` [PATCH 03/14] thermal: exynos: Read soc_type from match data Bartlomiej Zolnierkiewicz
2018-04-16 12:19       ` Daniel Lezcano
     [not found]         ` <CGME20180416124129eucas1p1545c737e0feb0f9f2c327b8597c46bce@eucas1p1.samsung.com>
2018-04-16 12:41           ` Bartlomiej Zolnierkiewicz
2018-04-16 12:47             ` Daniel Lezcano
     [not found]   ` <CGME20180416101357epcas2p16992f345f7dcebd90e3d4e50afbeeb88@epcas2p1.samsung.com>
2018-04-16 10:11     ` [PATCH 04/14] thermal: exynos: remove unused "type" field from struct exynos_tmu_platform_data Bartlomiej Zolnierkiewicz
2018-04-16 12:50       ` Daniel Lezcano
     [not found]   ` <CGME20180416101400epcas1p45e65b37b922a5d0265de7879eeb1df87@epcas1p4.samsung.com>
2018-04-16 10:11     ` [PATCH 05/14] thermal: exynos: remove parsing of samsung,tmu_default_temp_offset property Bartlomiej Zolnierkiewicz
2018-04-16 12:55       ` Daniel Lezcano
     [not found]   ` <CGME20180416101403epcas2p23c050a54c2cc8af9c8be76061d560937@epcas2p2.samsung.com>
2018-04-16 10:11     ` [PATCH 06/14] thermal: exynos: remove parsing of samsung,tmu_[first,second]_point_trim properties Bartlomiej Zolnierkiewicz
2018-04-16 12:57       ` Daniel Lezcano
     [not found]   ` <CGME20180416101406epcas2p267a664bb26a00bdca6c4c176f9ce08ed@epcas2p2.samsung.com>
2018-04-16 10:11     ` [PATCH 07/14] thermal: exynos: remove parsing of samsung,tmu_noise_cancel_mode property Bartlomiej Zolnierkiewicz
2018-04-16 13:03       ` Daniel Lezcano
     [not found]   ` <CGME20180416101409epcas1p4f8e0279a94322d1cc423ced6dfce3362@epcas1p4.samsung.com>
2018-04-16 10:11     ` [PATCH 08/14] thermal: exynos: remove parsing of samsung,tmu[_min,_max]_efuse_value properties Bartlomiej Zolnierkiewicz
2018-04-16 13:15       ` Daniel Lezcano
     [not found]   ` <CGME20180416101412epcas2p241ac78d221c7c288e79fc410dd90d6ab@epcas2p2.samsung.com>
2018-04-16 10:12     ` [PATCH 09/14] thermal: exynos: remove parsing of samsung,tmu_reference_voltage property Bartlomiej Zolnierkiewicz
2018-04-16 13:16       ` Daniel Lezcano
     [not found]   ` <CGME20180416101415epcas1p1b1108c9d654a7b2832179b5c1f49ff4a@epcas1p1.samsung.com>
2018-04-16 10:12     ` [PATCH 10/14] thermal: exynos: remove parsing of samsung,tmu_gain property Bartlomiej Zolnierkiewicz
2018-04-16 13:18       ` Daniel Lezcano
     [not found]   ` <CGME20180416101419epcas2p17dfedf3e376603baa8a4e52ffc82f0cb@epcas2p1.samsung.com>
2018-04-16 10:12     ` [PATCH 11/14] thermal: exynos: remove parsing of samsung,tmu_cal_type property Bartlomiej Zolnierkiewicz
2018-04-16 13:19       ` Daniel Lezcano
     [not found]   ` <CGME20180416101422epcas2p34c80b64c6c762b98ae4fecfe6a4db4f8@epcas2p3.samsung.com>
2018-04-16 10:12     ` [PATCH 12/14] thermal: exynos: remove separate exynos_tmu.h header file Bartlomiej Zolnierkiewicz
2018-04-16 13:24       ` Daniel Lezcano
     [not found]         ` <CGME20180416142452eucas1p2feb091d3ba51e78f42e93e184eb01291@eucas1p2.samsung.com>
2018-04-16 14:24           ` Bartlomiej Zolnierkiewicz
     [not found]   ` <CGME20180416101425epcas1p46ab4d827e3a64c5c16b32a17f63dd9d0@epcas1p4.samsung.com>
2018-04-16 10:12     ` [PATCH 13/14] ARM: dts: exynos: remove no longer needed samsung thermal properties Bartlomiej Zolnierkiewicz
2018-04-16 12:16       ` Krzysztof Kozlowski
2018-06-20 19:17       ` Krzysztof Kozlowski
     [not found]   ` <CGME20180416101428epcas1p1d9646bf1b56f0512a3fa3a6301b793c6@epcas1p1.samsung.com>
2018-04-16 10:12     ` [PATCH 14/14] arm64: " Bartlomiej Zolnierkiewicz
2018-04-16 13:02       ` Daniel Lezcano
     [not found]         ` <CGME20180416130917eucas1p10012e5d79bf59adc677e7e2364bae589@eucas1p1.samsung.com>
2018-04-16 13:09           ` Bartlomiej Zolnierkiewicz
2018-04-16 13:10             ` Daniel Lezcano
2018-06-20 19:19       ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.