Skip to contentSkip to conversation

thermal: mediatek: add sensors-support

PATCH Applied Frank Wunderlich 5 participants 6 messages Jun 8, 2021 – Jul 4, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 thermal: mediatek: add sensors-support

From: Frank Wunderlich <[email protected]>

add HWMON-support to mediateks thermal driver to allow lm-sensors userspace tools read soc temperature

---
v4: change message to dev_warn as suggested by matthias
v3: drop no_hwmon
v2: drop ifdef and used devm_thermal_add_hwmon_sysfs

---
 drivers/thermal/mtk_thermal.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/thermal/mtk_thermal.c +6 -0
index 97e8678ccf0e..ede94eadddda 100644
@@ -23,6 +23,8 @@
 #include <linux/reset.h>
 #include <linux/types.h>
 
+#include "thermal_hwmon.h"
+
 /* AUXADC Registers */
 #define AUXADC_CON1_SET_V	0x008
 #define AUXADC_CON1_CLR_V	0x00c
@@ -1087,6 +1089,10 @@ static int mtk_thermal_probe(struct platform_device *pdev)
 		goto err_disable_clk_peri_therm;
 	}
 
+	ret = devm_thermal_add_hwmon_sysfs(tzdev);
+	if (ret)
+		dev_warn(&pdev->dev, "error in thermal_add_hwmon_sysfs");
+
 	return 0;
 
 err_disable_clk_peri_therm:
Signature · 7 lines
2.25.1


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
maintainer Reviewed-by on v4 1/1
#1 lore raw
Quoted 6 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

add HWMON-support to mediateks thermal driver to allow lm-sensors userspace tools read soc temperature

Quoted 33 lines

---
v4: change message to dev_warn as suggested by matthias
v3: drop no_hwmon
v2: drop ifdef and used devm_thermal_add_hwmon_sysfs

---
 drivers/thermal/mtk_thermal.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/thermal/mtk_thermal.c +6 -0
index 97e8678ccf0e..ede94eadddda 100644
@@ -23,6 +23,8 @@
 #include <linux/reset.h>
 #include <linux/types.h>
 
+#include "thermal_hwmon.h"
+
 /* AUXADC Registers */
 #define AUXADC_CON1_SET_V	0x008
 #define AUXADC_CON1_CLR_V	0x00c
@@ -1087,6 +1089,10 @@ static int mtk_thermal_probe(struct platform_device *pdev)
 		goto err_disable_clk_peri_therm;
 	}
 
+	ret = devm_thermal_add_hwmon_sysfs(tzdev);
+	if (ret)
+		dev_warn(&pdev->dev, "error in thermal_add_hwmon_sysfs");
+
 	return 0;
 
 err_disable_clk_peri_therm:
#2 lore raw

Hi,

A gentle ping as it is reviewed but not yet visible in thermal tree [1] i guess it should do,right?

regards Frank

[1] https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git/log/?h=thermal/next

Quoted 52 lines

Gesendet: Mittwoch, 09. Juni 2021 um 10:09 Uhr
Von: "Matthias Brugger" <[email protected]>
An: "Frank Wunderlich" <[email protected]>, [email protected]
Cc: "Frank Wunderlich" <[email protected]>, "Daniel Lezcano" <[email protected]>, "Amit Kucheria" <[email protected]>, [email protected], [email protected], [email protected]
Betreff: Re: [PATCH v4] thermal: mediatek: add sensors-support

Quoted 6 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

add HWMON-support to mediateks thermal driver to allow lm-sensors userspace tools read soc temperature

Quoted 33 lines

---
v4: change message to dev_warn as suggested by matthias
v3: drop no_hwmon
v2: drop ifdef and used devm_thermal_add_hwmon_sysfs

---
 drivers/thermal/mtk_thermal.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/thermal/mtk_thermal.c +6 -0
index 97e8678ccf0e..ede94eadddda 100644
@@ -23,6 +23,8 @@
 #include <linux/reset.h>
 #include <linux/types.h>
 
+#include "thermal_hwmon.h"
+
 /* AUXADC Registers */
 #define AUXADC_CON1_SET_V	0x008
 #define AUXADC_CON1_CLR_V	0x00c
@@ -1087,6 +1089,10 @@ static int mtk_thermal_probe(struct platform_device *pdev)
 		goto err_disable_clk_peri_therm;
 	}
 
+	ret = devm_thermal_add_hwmon_sysfs(tzdev);
+	if (ret)
+		dev_warn(&pdev->dev, "error in thermal_add_hwmon_sysfs");
+
 	return 0;
 
 err_disable_clk_peri_therm:
#3 lore raw
Quoted 4 lines · Frank Wunderlich

Hi,

A gentle ping as it is reviewed but not yet visible in thermal tree [1] i guess it should do,right?

Right, I thought I took it.

Fixed, thanks for the heads up.

Signature · 10 lines
<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

_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#4 lore raw

[thermal: thermal/next] thermal/drivers/mediatek: Add sensors-support

In reply to Frank Wunderlich
The following commit has been merged into the thermal/next branch of thermal:

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     77b6c4044d8f7062b2c1c2a99f4bb076acc7f04f
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//77b6c4044d8f7062b2c1c2a99f4bb076acc7f04f
Author:        Frank Wunderlich <[email protected]>
AuthorDate:    Tue, 08 Jun 2021 17:45:30 +02:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Mon, 28 Jun 2021 20:57:36 +02:00

thermal/drivers/mediatek: Add sensors-support

Add HWMON-support to mediateks thermal driver to allow lm-sensors userspace tools read soc temperature

---
 drivers/thermal/mtk_thermal.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/thermal/mtk_thermal.c +6 -0
index 97e8678..ede94ea 100644
@@ -23,6 +23,8 @@
 #include <linux/reset.h>
 #include <linux/types.h>
 
+#include "thermal_hwmon.h"
+
 /* AUXADC Registers */
 #define AUXADC_CON1_SET_V	0x008
 #define AUXADC_CON1_CLR_V	0x00c
@@ -1087,6 +1089,10 @@ static int mtk_thermal_probe(struct platform_device *pdev)
 		goto err_disable_clk_peri_therm;
 	}
 
+	ret = devm_thermal_add_hwmon_sysfs(tzdev);
+	if (ret)
+		dev_warn(&pdev->dev, "error in thermal_add_hwmon_sysfs");
+
 	return 0;
 
 err_disable_clk_peri_therm:
#5 lore raw

[thermal: thermal/next] thermal/drivers/mediatek: Add sensors-support

In reply to Frank Wunderlich
The following commit has been merged into the thermal/next branch of thermal:

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     24e21d9f40ec3fb4228e3427454b733316a2a6c6
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//24e21d9f40ec3fb4228e3427454b733316a2a6c6
Author:        Frank Wunderlich <[email protected]>
AuthorDate:    Tue, 08 Jun 2021 17:45:30 +02:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Sun, 04 Jul 2021 18:28:04 +02:00

thermal/drivers/mediatek: Add sensors-support

Add HWMON-support to mediateks thermal driver to allow lm-sensors userspace tools read soc temperature

---
 drivers/thermal/mtk_thermal.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/thermal/mtk_thermal.c +6 -0
index 97e8678..ede94ea 100644
@@ -23,6 +23,8 @@
 #include <linux/reset.h>
 #include <linux/types.h>
 
+#include "thermal_hwmon.h"
+
 /* AUXADC Registers */
 #define AUXADC_CON1_SET_V	0x008
 #define AUXADC_CON1_CLR_V	0x00c
@@ -1087,6 +1089,10 @@ static int mtk_thermal_probe(struct platform_device *pdev)
 		goto err_disable_clk_peri_therm;
 	}
 
+	ret = devm_thermal_add_hwmon_sysfs(tzdev);
+	if (ret)
+		dev_warn(&pdev->dev, "error in thermal_add_hwmon_sysfs");
+
 	return 0;
 
 err_disable_clk_peri_therm: