linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] thermal: armada: hwmon support for new DT binding.
@ 2020-10-31 21:03 Jonathan Ben-Avraham
  0 siblings, 0 replies; only message in thread
From: Jonathan Ben-Avraham @ 2020-10-31 21:03 UTC (permalink / raw)
  To: linux-kernel
  Cc: Miquel Raynal, Zhang Rui, Daniel Lezcano, Amit Kucheria,
	Eduardo Valentin, Jonathan Ben-Avraham

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 <yba@tkos.co.il>
---
 drivers/thermal/armada_thermal.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/thermal/armada_thermal.c b/drivers/thermal/armada_thermal.c
index c2ebfb5be4b3..57f8d0df126f 100644
--- a/drivers/thermal/armada_thermal.c
+++ b/drivers/thermal/armada_thermal.c
@@ -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 */
-- 
2.11.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2020-10-31 21:14 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-31 21:03 [PATCH] thermal: armada: hwmon support for new DT binding Jonathan Ben-Avraham

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).