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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191228171904.24618-1-tiny.windzz@gmail.com>
Date:   Sat, 28 Dec 2019 17:19:04 +0000
From:   Yangtao Li <tiny.windzz@...il.com>
To:     rui.zhang@...el.com, daniel.lezcano@...aro.org,
        amit.kucheria@...durent.com, mripard@...nel.org, wens@...e.org,
        anarsoul@...il.com
Cc:     linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-kernel@...r.kernel.org, Yangtao Li <tiny.windzz@...il.com>
Subject: [PATCH] thermal: sun8i: Add hwmon support

Expose sun8i thermal as a HWMON device.

Signed-off-by: Yangtao Li <tiny.windzz@...il.com>
---
 drivers/thermal/sun8i_thermal.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 23a5f4aa4be4..619e75cb41b0 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -20,6 +20,8 @@
 #include <linux/slab.h>
 #include <linux/thermal.h>
 
+#include "thermal_hwmon.h"
+
 #define MAX_SENSOR_NUM	4
 
 #define FT_TEMP_MASK				GENMASK(11, 0)
@@ -477,6 +479,10 @@ static int sun8i_ths_register(struct ths_device *tmdev)
 							     &ths_ops);
 		if (IS_ERR(tmdev->sensor[i].tzd))
 			return PTR_ERR(tmdev->sensor[i].tzd);
+
+		if (devm_thermal_add_hwmon_sysfs(tmdev->sensor[i].tzd))
+			dev_warn(tmdev->dev,
+				 "Failed to add hwmon sysfs attributes\n");
 	}
 
 	return 0;
-- 
2.17.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ