linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 1/1] thermal: imx8mm: Add hwmon support
@ 2022-07-26 12:23 Alexander Stein
  2022-09-21 11:44 ` Alexander Stein
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Alexander Stein @ 2022-07-26 12:23 UTC (permalink / raw)
  To: Rafael J . Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Shawn Guo, Sascha Hauer, Fabio Estevam
  Cc: Alexander Stein, linux-pm, linux-arm-kernel

Expose thermal sensors as HWMON devices.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
Changes in v2:
* Split from thermal_helpers patch
* No change otherwise

The helper patch need some additional work, but this can go as it is.

 drivers/thermal/imx8mm_thermal.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index af666bd9e8d4..ca8e2c393030 100644
--- a/drivers/thermal/imx8mm_thermal.c
+++ b/drivers/thermal/imx8mm_thermal.c
@@ -16,6 +16,7 @@
 #include <linux/thermal.h>
 
 #include "thermal_core.h"
+#include "thermal_hwmon.h"
 
 #define TER			0x0	/* TMU enable */
 #define TPS			0x4
@@ -176,6 +177,9 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
 			goto disable_clk;
 		}
 		tmu->sensors[i].hw_id = i;
+
+		if (devm_thermal_add_hwmon_sysfs(tmu->sensors[i].tzd))
+			dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
 	}
 
 	platform_set_drvdata(pdev, tmu);
-- 
2.25.1


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

* Re: [PATCH v2 1/1] thermal: imx8mm: Add hwmon support
  2022-07-26 12:23 [PATCH v2 1/1] thermal: imx8mm: Add hwmon support Alexander Stein
@ 2022-09-21 11:44 ` Alexander Stein
  2022-11-28  8:43 ` Alexander Stein
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Stein @ 2022-09-21 11:44 UTC (permalink / raw)
  To: Rafael J . Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Shawn Guo, Sascha Hauer, Fabio Estevam
  Cc: linux-pm, linux-arm-kernel

Gentle ping

Am Dienstag, 26. Juli 2022, 14:23:31 CEST schrieb Alexander Stein:
> Expose thermal sensors as HWMON devices.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> Changes in v2:
> * Split from thermal_helpers patch
> * No change otherwise
> 
> The helper patch need some additional work, but this can go as it is.
> 
>  drivers/thermal/imx8mm_thermal.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/thermal/imx8mm_thermal.c
> b/drivers/thermal/imx8mm_thermal.c index af666bd9e8d4..ca8e2c393030 100644
> --- a/drivers/thermal/imx8mm_thermal.c
> +++ b/drivers/thermal/imx8mm_thermal.c
> @@ -16,6 +16,7 @@
>  #include <linux/thermal.h>
> 
>  #include "thermal_core.h"
> +#include "thermal_hwmon.h"
> 
>  #define TER			0x0	/* TMU enable */
>  #define TPS			0x4
> @@ -176,6 +177,9 @@ static int imx8mm_tmu_probe(struct platform_device
> *pdev) goto disable_clk;
>  		}
>  		tmu->sensors[i].hw_id = i;
> +
> +		if (devm_thermal_add_hwmon_sysfs(tmu->sensors[i].tzd))
> +			dev_warn(&pdev->dev, "failed to add hwmon 
sysfs attributes\n");
>  	}
> 
>  	platform_set_drvdata(pdev, tmu);





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

* Re: [PATCH v2 1/1] thermal: imx8mm: Add hwmon support
  2022-07-26 12:23 [PATCH v2 1/1] thermal: imx8mm: Add hwmon support Alexander Stein
  2022-09-21 11:44 ` Alexander Stein
@ 2022-11-28  8:43 ` Alexander Stein
  2022-12-04 16:39 ` Daniel Lezcano
  2022-12-09 15:26 ` [thermal: thermal/next] thermal/drivers/imx8mm: " thermal-bot for Alexander Stein
  3 siblings, 0 replies; 5+ messages in thread
From: Alexander Stein @ 2022-11-28  8:43 UTC (permalink / raw)
  To: Rafael J . Wysocki, Daniel Lezcano, Amit Kucheria, Zhang Rui,
	Shawn Guo, Sascha Hauer, Fabio Estevam
  Cc: linux-pm, linux-arm-kernel

Hello,

gentle ping. Any feedback on this?

Thanks
Alexander

Am Dienstag, 26. Juli 2022, 14:23:31 CET schrieb Alexander Stein:
> Expose thermal sensors as HWMON devices.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> Changes in v2:
> * Split from thermal_helpers patch
> * No change otherwise
> 
> The helper patch need some additional work, but this can go as it is.
> 
>  drivers/thermal/imx8mm_thermal.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/thermal/imx8mm_thermal.c
> b/drivers/thermal/imx8mm_thermal.c index af666bd9e8d4..ca8e2c393030 100644
> --- a/drivers/thermal/imx8mm_thermal.c
> +++ b/drivers/thermal/imx8mm_thermal.c
> @@ -16,6 +16,7 @@
>  #include <linux/thermal.h>
> 
>  #include "thermal_core.h"
> +#include "thermal_hwmon.h"
> 
>  #define TER			0x0	/* TMU enable */
>  #define TPS			0x4
> @@ -176,6 +177,9 @@ static int imx8mm_tmu_probe(struct platform_device
> *pdev) goto disable_clk;
>  		}
>  		tmu->sensors[i].hw_id = i;
> +
> +		if (devm_thermal_add_hwmon_sysfs(tmu->sensors[i].tzd))
> +			dev_warn(&pdev->dev, "failed to add hwmon sysfs 
attributes\n");
>  	}
> 
>  	platform_set_drvdata(pdev, tmu);





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

* Re: [PATCH v2 1/1] thermal: imx8mm: Add hwmon support
  2022-07-26 12:23 [PATCH v2 1/1] thermal: imx8mm: Add hwmon support Alexander Stein
  2022-09-21 11:44 ` Alexander Stein
  2022-11-28  8:43 ` Alexander Stein
@ 2022-12-04 16:39 ` Daniel Lezcano
  2022-12-09 15:26 ` [thermal: thermal/next] thermal/drivers/imx8mm: " thermal-bot for Alexander Stein
  3 siblings, 0 replies; 5+ messages in thread
From: Daniel Lezcano @ 2022-12-04 16:39 UTC (permalink / raw)
  To: Alexander Stein, Rafael J . Wysocki, Amit Kucheria, Zhang Rui,
	Shawn Guo, Sascha Hauer, Fabio Estevam
  Cc: linux-pm, linux-arm-kernel

On 26/07/2022 14:23, Alexander Stein wrote:
> Expose thermal sensors as HWMON devices.
> 
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---

Applied, thanks

-- 
<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] 5+ messages in thread

* [thermal: thermal/next] thermal/drivers/imx8mm: Add hwmon support
  2022-07-26 12:23 [PATCH v2 1/1] thermal: imx8mm: Add hwmon support Alexander Stein
                   ` (2 preceding siblings ...)
  2022-12-04 16:39 ` Daniel Lezcano
@ 2022-12-09 15:26 ` thermal-bot for Alexander Stein
  3 siblings, 0 replies; 5+ messages in thread
From: thermal-bot for Alexander Stein @ 2022-12-09 15:26 UTC (permalink / raw)
  To: linux-pm
  Cc: Alexander Stein, Daniel Lezcano, rui.zhang, daniel.lezcano, amitk

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

Commit-ID:     7dccad3e0d79edc7a5b3947dc6d63ec683114c51
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//7dccad3e0d79edc7a5b3947dc6d63ec683114c51
Author:        Alexander Stein <alexander.stein@ew.tq-group.com>
AuthorDate:    Tue, 26 Jul 2022 14:23:31 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Thu, 08 Dec 2022 14:30:44 +01:00

thermal/drivers/imx8mm: Add hwmon support

Expose thermal sensors as HWMON devices.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20220726122331.323093-1-alexander.stein@ew.tq-group.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
---
 drivers/thermal/imx8mm_thermal.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index e709c03..d247b48 100644
--- a/drivers/thermal/imx8mm_thermal.c
+++ b/drivers/thermal/imx8mm_thermal.c
@@ -18,6 +18,7 @@
 #include <linux/thermal.h>
 
 #include "thermal_core.h"
+#include "thermal_hwmon.h"
 
 #define TER			0x0	/* TMU enable */
 #define TPS			0x4
@@ -342,6 +343,9 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
 			goto disable_clk;
 		}
 		tmu->sensors[i].hw_id = i;
+
+		if (devm_thermal_add_hwmon_sysfs(tmu->sensors[i].tzd))
+			dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
 	}
 
 	platform_set_drvdata(pdev, tmu);

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

end of thread, other threads:[~2022-12-09 15:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-26 12:23 [PATCH v2 1/1] thermal: imx8mm: Add hwmon support Alexander Stein
2022-09-21 11:44 ` Alexander Stein
2022-11-28  8:43 ` Alexander Stein
2022-12-04 16:39 ` Daniel Lezcano
2022-12-09 15:26 ` [thermal: thermal/next] thermal/drivers/imx8mm: " thermal-bot for Alexander Stein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).