From: Jonathan Ben-Avraham <yba@tkos.co.il>
To: linux-kernel@vger.kernel.org
Cc: Miquel Raynal <miquel.raynal@bootlin.com>,
Zhang Rui <rui.zhang@intel.com>,
Daniel Lezcano <daniel.lezcano@linaro.org>,
Amit Kucheria <amitk@kernel.org>,
Eduardo Valentin <edubezval@gmail.com>,
Jonathan Ben-Avraham <yba@tkos.co.il>
Subject: [PATCH] thermal: armada: hwmon support for new DT binding.
Date: Sat, 31 Oct 2020 23:03:42 +0200 [thread overview]
Message-ID: <20201031210342.6014-1-yba@tkos.co.il> (raw)
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
reply other threads:[~2020-10-31 21:14 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20201031210342.6014-1-yba@tkos.co.il \
--to=yba@tkos.co.il \
--cc=amitk@kernel.org \
--cc=daniel.lezcano@linaro.org \
--cc=edubezval@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=rui.zhang@intel.com \
/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).