linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "thermal-bot for Robert Marko" <tip-bot2@linutronix.de>
To: linux-pm@vger.kernel.org
Cc: Robert Marko <robimarko@gmail.com>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	rui.zhang@intel.com, amitk@kernel.org
Subject: [thermal: thermal/next] thermal/drivers/tsens: Add IPQ8074 support
Date: Fri, 09 Dec 2022 15:26:29 -0000	[thread overview]
Message-ID: <167059958957.4906.7869913133452171031.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20220818220245.338396-4-robimarko@gmail.com>

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

Commit-ID:     fd742f2ee2f95c75a2cb27c9d36d29557c2ba5db
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/thermal/linux.git//fd742f2ee2f95c75a2cb27c9d36d29557c2ba5db
Author:        Robert Marko <robimarko@gmail.com>
AuthorDate:    Fri, 19 Aug 2022 00:02:44 +02:00
Committer:     Daniel Lezcano <daniel.lezcano@kernel.org>
CommitterDate: Thu, 08 Dec 2022 14:30:44 +01:00

thermal/drivers/tsens: Add IPQ8074 support

Qualcomm IPQ8074 uses tsens v2.3 IP, however unlike other tsens v2 IP
it only has one IRQ, that is used for up/low as well as critical.
It also does not support negative trip temperatures.

Signed-off-by: Robert Marko <robimarko@gmail.com>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220818220245.338396-4-robimarko@gmail.com
Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
---
 drivers/thermal/qcom/tsens-v2.c | 17 +++++++++++++++++
 drivers/thermal/qcom/tsens.c    |  3 +++
 drivers/thermal/qcom/tsens.h    |  2 +-
 3 files changed, 21 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c
index 9babc69..29a61d2 100644
--- a/drivers/thermal/qcom/tsens-v2.c
+++ b/drivers/thermal/qcom/tsens-v2.c
@@ -39,6 +39,17 @@ static struct tsens_features tsens_v2_feat = {
 	.trip_max_temp	= 120000,
 };
 
+static struct tsens_features ipq8074_feat = {
+	.ver_major	= VER_2_X,
+	.crit_int	= 1,
+	.combo_int	= 1,
+	.adc		= 0,
+	.srot_split	= 1,
+	.max_sensors	= 16,
+	.trip_min_temp	= 0,
+	.trip_max_temp	= 204000,
+};
+
 static const struct reg_field tsens_v2_regfields[MAX_REGFIELDS] = {
 	/* ----- SROT ------ */
 	/* VERSION */
@@ -104,6 +115,12 @@ struct tsens_plat_data data_tsens_v2 = {
 	.fields	= tsens_v2_regfields,
 };
 
+struct tsens_plat_data data_ipq8074 = {
+	.ops		= &ops_generic_v2,
+	.feat		= &ipq8074_feat,
+	.fields	= tsens_v2_regfields,
+};
+
 /* Kept around for backward compatibility with old msm8996.dtsi */
 struct tsens_plat_data data_8996 = {
 	.num_sensors	= 13,
diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c
index f315104..b7d9782 100644
--- a/drivers/thermal/qcom/tsens.c
+++ b/drivers/thermal/qcom/tsens.c
@@ -981,6 +981,9 @@ static const struct of_device_id tsens_table[] = {
 		.compatible = "qcom,ipq8064-tsens",
 		.data = &data_8960,
 	}, {
+		.compatible = "qcom,ipq8074-tsens",
+		.data = &data_ipq8074,
+	}, {
 		.compatible = "qcom,mdm9607-tsens",
 		.data = &data_9607,
 	}, {
diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h
index 8dc21ca..899af12 100644
--- a/drivers/thermal/qcom/tsens.h
+++ b/drivers/thermal/qcom/tsens.h
@@ -597,6 +597,6 @@ extern struct tsens_plat_data data_8916, data_8939, data_8974, data_9607;
 extern struct tsens_plat_data data_tsens_v1, data_8976;
 
 /* TSENS v2 targets */
-extern struct tsens_plat_data data_8996, data_tsens_v2;
+extern struct tsens_plat_data data_8996, data_ipq8074, data_tsens_v2;
 
 #endif /* __QCOM_TSENS_H__ */

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

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-18 22:02 [PATCH v7 1/5] dt-bindings: thermal: tsens: Add ipq8074 compatible Robert Marko
2022-08-18 22:02 ` [PATCH v7 2/5] drivers: thermal: tsens: Add support for combined interrupt Robert Marko
2022-08-18 22:49   ` Daniel Lezcano
2022-09-27  7:34     ` Robert Marko
2022-09-27  8:23     ` Robert Marko
2022-10-17 19:01   ` Bjorn Andersson
2022-10-21 16:52     ` Daniel Lezcano
2022-12-09 15:26   ` [thermal: thermal/next] thermal/drivers/tsens: " thermal-bot for Robert Marko
2022-08-18 22:02 ` [PATCH v7 3/5] drivers: thermal: tsens: allow configuring min and max trips Robert Marko
2022-12-09 15:26   ` [thermal: thermal/next] thermal/drivers/tsens: Allow " thermal-bot for Robert Marko
2022-08-18 22:02 ` [PATCH v7 4/5] drivers: thermal: tsens: add IPQ8074 support Robert Marko
2022-12-09 15:26   ` thermal-bot for Robert Marko [this message]
2022-08-18 22:02 ` [PATCH v7 5/5] arm64: dts: ipq8074: add thermal nodes Robert Marko
2022-10-18  3:14 ` (subset) [PATCH v7 1/5] dt-bindings: thermal: tsens: Add ipq8074 compatible Bjorn Andersson
2022-12-09 15:26 ` [thermal: thermal/next] " thermal-bot for Robert Marko

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=167059958957.4906.7869913133452171031.tip-bot2@tip-bot2 \
    --to=tip-bot2@linutronix.de \
    --cc=amitk@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=robimarko@gmail.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).