thermal: armada: hwmon support for new DT binding.
Subsystems (2)
PATCH 1/1 thermal: armada: hwmon support for new DT binding.
For legacy DT binding the armada driver calls thermal_zone_device_register(), which registers the hwmon device. For new DT bindings, devm_thermal_add_hwmon_sysfs() must be called explicitly.
Fixes c9899c183921f (thermal: armada: use the resource managed
registration helper alternative)
Signed-off-by Jonathan Ben-Avraham <[email protected]>
--- drivers/thermal/armada_thermal.c | 5 +++++ 1 file changed, 5 insertions(+)
drivers/thermal/armada_thermal.c +5 -0
@@ -20,6 +20,7 @@#include <linux/interrupt.h> #include "thermal_core.h" +#include "thermal_hwmon.h" /* Thermal Manager Control and Status Register */ #define PMU_TDC0_SW_RST_MASK (0x1 << 1)
@@ -945,6 +946,10 @@ static int armada_thermal_probe(struct platform_device *pdev)*/ if (irq >0 && !priv->overheat_sensor)armada_configure_overheat_int (priv, tz, sensor->id); + +if (devm_thermal_add_hwmon_sysfs (tz)) +dev_warn (&pdev->dev, +"Failed to add hwmon sysfs attributes\n" ); }/* Just complain if no overheat interrupt was set up */
Signature · 1 line
2.11.0