* [PATCH] thermal: imx_sc_thermal: Add hwmon support
@ 2020-03-26 3:13 Anson Huang
2020-04-02 10:44 ` Amit Kucheria
0 siblings, 1 reply; 2+ messages in thread
From: Anson Huang @ 2020-03-26 3:13 UTC (permalink / raw)
To: rui.zhang, daniel.lezcano, amit.kucheria, shawnguo, s.hauer,
kernel, festevam, linux-pm, linux-arm-kernel, linux-kernel
Cc: Linux-imx
Expose i.MX SC thermal sensors as HWMON devices.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
drivers/thermal/imx_sc_thermal.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
index a8723b1..b2b68c9 100644
--- a/drivers/thermal/imx_sc_thermal.c
+++ b/drivers/thermal/imx_sc_thermal.c
@@ -14,6 +14,7 @@
#include <linux/thermal.h>
#include "thermal_core.h"
+#include "thermal_hwmon.h"
#define IMX_SC_MISC_FUNC_GET_TEMP 13
@@ -115,6 +116,9 @@ static int imx_sc_thermal_probe(struct platform_device *pdev)
ret = PTR_ERR(sensor->tzd);
break;
}
+
+ if (devm_thermal_add_hwmon_sysfs(sensor->tzd))
+ dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
}
of_node_put(sensor_np);
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] thermal: imx_sc_thermal: Add hwmon support
2020-03-26 3:13 [PATCH] thermal: imx_sc_thermal: Add hwmon support Anson Huang
@ 2020-04-02 10:44 ` Amit Kucheria
0 siblings, 0 replies; 2+ messages in thread
From: Amit Kucheria @ 2020-04-02 10:44 UTC (permalink / raw)
To: Anson Huang
Cc: Zhang Rui, Daniel Lezcano, Shawn Guo, Sascha Hauer, kernel,
Fabio Estevam, Linux PM list, lakml, LKML, Linux-imx
On Thu, Mar 26, 2020 at 8:50 AM Anson Huang <Anson.Huang@nxp.com> wrote:
>
> Expose i.MX SC thermal sensors as HWMON devices.
>
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Reviewed-by: Amit Kucheria <amit.kucheria@linaro.org>
> ---
> drivers/thermal/imx_sc_thermal.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c
> index a8723b1..b2b68c9 100644
> --- a/drivers/thermal/imx_sc_thermal.c
> +++ b/drivers/thermal/imx_sc_thermal.c
> @@ -14,6 +14,7 @@
> #include <linux/thermal.h>
>
> #include "thermal_core.h"
> +#include "thermal_hwmon.h"
>
> #define IMX_SC_MISC_FUNC_GET_TEMP 13
>
> @@ -115,6 +116,9 @@ static int imx_sc_thermal_probe(struct platform_device *pdev)
> ret = PTR_ERR(sensor->tzd);
> break;
> }
> +
> + if (devm_thermal_add_hwmon_sysfs(sensor->tzd))
> + dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
> }
>
> of_node_put(sensor_np);
> --
> 2.7.4
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-04-02 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 3:13 [PATCH] thermal: imx_sc_thermal: Add hwmon support Anson Huang
2020-04-02 10:44 ` Amit Kucheria
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).