thermal/drivers/tsens: register thermal zones as hwmon sensors
Subsystems (3)
PATCH v2 1/1 thermal/drivers/tsens: register thermal zones as hwmon sensors
Register thermal zones as hwmon sensors to let userspace read CPU temperatures using standard hwmon interface.
Acked-by Amit Kucheria <[email protected]>
Signed-off-by Dmitry Baryshkov <[email protected]>
--- drivers/thermal/qcom/tsens.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/thermal/qcom/tsens.c +5 -0
@@ -18,6 +18,7 @@#include <linux/regmap.h> #include <linux/slab.h> #include <linux/thermal.h> +#include "../thermal_hwmon.h" #include "tsens.h" /**
@@ -1060,6 +1061,10 @@ static int tsens_register(struct tsens_priv *priv) priv->sensor[i].tzd = tzd;if (priv->ops->enable) priv->ops->enable (priv, i); + +if (devm_thermal_add_hwmon_sysfs (tzd)) +dev_warn (priv->dev, +"Failed to add hwmon sysfs attributes\n" ); }/* VER_0 require to set MIN and MAX THRESH
Signature · 1 line
2.34.1
Daniel Lezcano
AppliedQuoted 6 lines · Dmitry Baryshkov
Register thermal zones as hwmon sensors to let userspace read CPU temperatures using standard hwmon interface.
Acked-by Amit Kucheria <[email protected]>Signed-off-by Dmitry Baryshkov <[email protected]>---
Applied, thanks
Signature · 5 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
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: 8556e19d4939fbdb15aee9391f035453c5b2255a Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//8556e19d4939fbdb15aee9391f035453c5b2255a Author: Dmitry Baryshkov <[email protected]> AuthorDate: Sat, 29 Jan 2022 21:07:50 +03:00 Committer: Daniel Lezcano <[email protected]> CommitterDate: Tue, 08 Mar 2022 21:26:08 +01:00
thermal/drivers/tsens: register thermal zones as hwmon sensors
Register thermal zones as hwmon sensors to let userspace read CPU temperatures using standard hwmon interface.
Acked-by Amit Kucheria <[email protected]>
Signed-off-by Dmitry Baryshkov <[email protected]>
Signed-off-by Daniel Lezcano <[email protected]>
--- drivers/thermal/qcom/tsens.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/thermal/qcom/tsens.c +5 -0
@@ -18,6 +18,7 @@#include <linux/regmap.h> #include <linux/slab.h> #include <linux/thermal.h> +#include "../thermal_hwmon.h" #include "tsens.h" /**
@@ -1060,6 +1061,10 @@ static int tsens_register(struct tsens_priv *priv) priv->sensor[i].tzd = tzd;if (priv->ops->enable) priv->ops->enable (priv, i); + +if (devm_thermal_add_hwmon_sysfs (tzd)) +dev_warn (priv->dev, +"Failed to add hwmon sysfs attributes\n" ); }/* VER_0 require to set MIN and MAX THRESH