From: Yangtao Li <tiny.windzz@gmail.com>
To: rui.zhang@intel.com, daniel.lezcano@linaro.org,
amit.kucheria@verdurent.com, mripard@kernel.org, wens@csie.org,
anarsoul@gmail.com
Cc: Yangtao Li <tiny.windzz@gmail.com>,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org
Subject: [PATCH] thermal: sun8i: Add hwmon support
Date: Sat, 28 Dec 2019 17:19:04 +0000 [thread overview]
Message-ID: <20191228171904.24618-1-tiny.windzz@gmail.com> (raw)
Expose sun8i thermal as a HWMON device.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-12-28 17:19 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-28 17:19 Yangtao Li [this message]
2020-01-06 4:31 ` [PATCH] thermal: sun8i: Add hwmon support Chen-Yu Tsai
2020-01-06 16:14 ` Frank Lee
2020-01-07 3:15 ` Chen-Yu Tsai
2020-01-11 18:08 ` Frank Lee
2020-01-12 18:12 ` Frank Lee
2020-01-12 19:31 ` Daniel Lezcano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191228171904.24618-1-tiny.windzz@gmail.com \
--to=tiny.windzz@gmail.com \
--cc=amit.kucheria@verdurent.com \
--cc=anarsoul@gmail.com \
--cc=daniel.lezcano@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=mripard@kernel.org \
--cc=rui.zhang@intel.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).