All of lore.kernel.org
 help / color / mirror / Atom feed
From: "thermal-bot for Alexander Stein" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: Alexander Stein <alexander.stein@ew.tq-group.com>,
	Daniel Lezcano <daniel.lezcano@kernel.org>,
	rui.zhang@intel.com, daniel.lezcano@linaro.org, amitk@kernel.org
Subject: [thermal: thermal/next] thermal/drivers/imx8mm: Add hwmon support
Date: Fri, 09 Dec 2022 15:26:28 -0000	[thread overview]
Message-ID: <167059958815.4906.3651022751204904731.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220726122331.323093-1-alexander.stein@ew.tq-group.com>

The following commit has been merged into the thermal/next branch of thermal:

Commit-ID:     7dccad3e0d79edc7a5b3947dc6d63ec683114c51
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//7dccad3e0d79edc7a5b3947dc6d63ec683114c51
Author:        Alexander Stein <alexander.stein@ew.tq-group.com>
AuthorDate:    Tue, 26 Jul 2022 14:23:31 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Thu, 08 Dec 2022 14:30:44 +01:00

thermal/drivers/imx8mm: Add hwmon support

Expose thermal sensors as HWMON devices.

Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
Link: https://lore.kernel.org/r/20220726122331.323093-1-alexander.stein@ew.tq-group.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@kernel.org>
---
 drivers/thermal/imx8mm_thermal.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/thermal/imx8mm_thermal.c b/drivers/thermal/imx8mm_thermal.c
index e709c03..d247b48 100644
--- a/drivers/thermal/imx8mm_thermal.c
+++ b/drivers/thermal/imx8mm_thermal.c
@@ -18,6 +18,7 @@
 #include <linux/thermal.h>
 
 #include "thermal_core.h"
+#include "thermal_hwmon.h"
 
 #define TER			0x0	/* TMU enable */
 #define TPS			0x4
@@ -342,6 +343,9 @@ static int imx8mm_tmu_probe(struct platform_device *pdev)
 			goto disable_clk;
 		}
 		tmu->sensors[i].hw_id = i;
+
+		if (devm_thermal_add_hwmon_sysfs(tmu->sensors[i].tzd))
+			dev_warn(&pdev->dev, "failed to add hwmon sysfs attributes\n");
 	}
 
 	platform_set_drvdata(pdev, tmu);

      parent reply	other threads:[~2022-12-09 15:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 12:23 [PATCH v2 1/1] thermal: imx8mm: Add hwmon support Alexander Stein
2022-07-26 12:23 ` Alexander Stein
2022-09-21 11:44 ` Alexander Stein
2022-09-21 11:44   ` Alexander Stein
2022-11-28  8:43 ` Alexander Stein
2022-11-28  8:43   ` Alexander Stein
2022-12-04 16:39 ` Daniel Lezcano
2022-12-04 16:39   ` Daniel Lezcano
2022-12-09 15:26 ` thermal-bot for Alexander Stein [this message]

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=167059958815.4906.3651022751204904731.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=alexander.stein@ew.tq-group.com \
    --cc=amitk@kernel.org \
    --cc=daniel.lezcano@kernel.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.