thermal: k3_j72xx_bandgap: register sensors with hwmon
PATCH 1/1 thermal: k3_j72xx_bandgap: register sensors with hwmon
Make the sensors available in the hwmon subsystem (if CONFIG_THERMAL_HWMON is enabled).
Signed-off-by Michael Walle <[email protected]>
--- drivers/thermal/k3_j72xx_bandgap.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/thermal/k3_j72xx_bandgap.c +4 -0
@@ -20,6 +20,8 @@#include <linux/delay.h> #include <linux/slab.h> +#include "thermal_hwmon.h" +#define K3_VTM_DEVINFO_PWR0_OFFSET 0x4#define K3_VTM_DEVINFO_PWR0_TEMPSENS_CT_MASK 0xf0#define K3_VTM_TMPSENS0_CTRL_OFFSET 0x300
@@ -513,6 +515,8 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev) ret =PTR_ERR (ti_thermal); goto err_free_ref_table; } + +devm_thermal_add_hwmon_sysfs (bgp->dev, ti_thermal); }platform_set_drvdata (pdev, bgp);
Signature · 1 line
2.39.5
Quoted 22 lines · Michael Walle
Make the sensors available in the hwmon subsystem (if
CONFIG_THERMAL_HWMONis enabled).Signed-off-by Michael Walle <[email protected]>--- drivers/thermal/k3_j72xx_bandgap.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/thermal/k3_j72xx_bandgap.c +2
-0@@ -20,6 +20,8 @@#include <linux/delay.h> #include <linux/slab.h> +#include "thermal_hwmon.h" +#define K3_VTM_DEVINFO_PWR0_OFFSET 0x4#define K3_VTM_DEVINFO_PWR0_TEMPSENS_CT_MASK 0xf0#define K3_VTM_TMPSENS0_CTRL_OFFSET 0x300
drivers/thermal/k3_j72xx_bandgap.c static int k3_j72xx_bandgap_probe(struct platform_device *pdev) · line 522
Quoted 8 lines
drivers/thermal/k3_j72xx_bandgap.c +2
-0@@ -513,6 +515,8 @@ static int k3_j72xx_bandgap_probe(struct platform_device *pdev) ret =PTR_ERR (ti_thermal); goto err_free_ref_table; } + +devm_thermal_add_hwmon_sysfs (bgp->dev, ti_thermal); }platform_set_drvdata (pdev, bgp);
LGTM,
Reviewed-by Lukasz Luba <[email protected]>
Daniel Lezcano
AppliedQuoted 5 lines · Michael Walle
Make the sensors available in the hwmon subsystem (if
CONFIG_THERMAL_HWMONis enabled).Signed-off-by Michael Walle <[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