diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2020-03-26 06:13:31 +0300 |
---|---|---|
committer | Daniel Lezcano <daniel.lezcano@linaro.org> | 2020-04-14 12:41:12 +0300 |
commit | d2bc4dd91da6095a769fdc9bc519d3be7ad5f97a (patch) | |
tree | cf7c4ec91d57462dc7a0305dee4179d63807f7f2 /drivers/thermal/imx_sc_thermal.c | |
parent | 8f3d9f354286745c751374f5f1fcafee6b3f3136 (diff) |
thermal: imx_sc_thermal: Add hwmon support
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>
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/1585192411-25593-1-git-send-email-Anson.Huang@nxp.com
Diffstat (limited to 'drivers/thermal/imx_sc_thermal.c')
-rw-r--r-- | drivers/thermal/imx_sc_thermal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/thermal/imx_sc_thermal.c b/drivers/thermal/imx_sc_thermal.c index a8723b1eb8b0..b2b68c943738 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); |