lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20201031210342.6014-1-yba@tkos.co.il>
Date:   Sat, 31 Oct 2020 23:03:42 +0200
From:   Jonathan Ben-Avraham <yba@...s.co.il>
To:     linux-kernel@...r.kernel.org
Cc:     Miquel Raynal <miquel.raynal@...tlin.com>,
        Zhang Rui <rui.zhang@...el.com>,
        Daniel Lezcano <daniel.lezcano@...aro.org>,
        Amit Kucheria <amitk@...nel.org>,
        Eduardo Valentin <edubezval@...il.com>,
        Jonathan Ben-Avraham <yba@...s.co.il>
Subject: [PATCH] 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 <yba@...s.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ