public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Yangtao Li <tiny.windzz@gmail•com>
To: rui.zhang@intel•com, edubezval@gmail•com,
	daniel.lezcano@linaro•org, robh+dt@kernel•org,
	mark.rutland@arm•com, maxime.ripard@bootlin•com, wens@csie•org,
	mchehab+samsung@kernel•org, davem@davemloft•net,
	gregkh@linuxfoundation•org, Jonathan.Cameron@huawei•com,
	nicolas.ferre@microchip•com
Cc: devicetree@vger•kernel.org, linux-kernel@vger•kernel.org,
	linux-arm-kernel@lists•infradead.org, linux-pm@vger•kernel.org
Subject: [PATCH v5 13/18] thermal: sun8i: add thermal driver for A64
Date: Sat, 10 Aug 2019 05:32:32 +0000	[thread overview]
Message-ID: <20190810053232.6125-1-tiny.windzz@gmail.com> (raw)

From: Vasily Khoruzhick <anarsoul@gmail•com>

Thermal sensor controller in A64 is similar to H3, but it has 3 sensors.
Extend H3 functions to add support for multiple sensors.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail•com>
---
 drivers/thermal/sun8i_thermal.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
index 41ce8cdc0546..3259081da841 100644
--- a/drivers/thermal/sun8i_thermal.c
+++ b/drivers/thermal/sun8i_thermal.c
@@ -515,6 +515,17 @@ static const struct ths_thermal_chip sun8i_h3_ths = {
 	.irq_ack = sun8i_h3_irq_ack,
 };
 
+static const struct ths_thermal_chip sun50i_a64_ths = {
+	.sensor_num = 3,
+	.offset = -2170,
+	.scale = -117,
+	.has_mod_clk = true,
+	.temp_data_base = SUN8I_THS_TEMP_DATA,
+	.calibrate = sun8i_h3_ths_calibrate,
+	.init = sun8i_h3_thermal_init,
+	.irq_ack = sun8i_h3_irq_ack,
+};
+
 static const struct ths_thermal_chip sun50i_h6_ths = {
 	.sensor_num = 2,
 	.offset = -2794,
@@ -528,6 +539,7 @@ static const struct ths_thermal_chip sun50i_h6_ths = {
 
 static const struct of_device_id of_ths_match[] = {
 	{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
+	{ .compatible = "allwinner,sun50i-a64-ths", .data = &sun50i_a64_ths },
 	{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
 	{ /* sentinel */ },
 };
-- 
2.17.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

             reply	other threads:[~2019-08-10  5:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-10  5:32 Yangtao Li [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-08-10  5:28 [PATCH v5 00/18] add thermal driver for h6 Yangtao Li
2019-08-10  5:28 ` [PATCH v5 13/18] thermal: sun8i: add thermal driver for A64 Yangtao Li

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=20190810053232.6125-1-tiny.windzz@gmail.com \
    --to=tiny.windzz@gmail$(echo .)com \
    --cc=Jonathan.Cameron@huawei$(echo .)com \
    --cc=daniel.lezcano@linaro$(echo .)org \
    --cc=davem@davemloft$(echo .)net \
    --cc=devicetree@vger$(echo .)kernel.org \
    --cc=edubezval@gmail$(echo .)com \
    --cc=gregkh@linuxfoundation$(echo .)org \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-pm@vger$(echo .)kernel.org \
    --cc=mark.rutland@arm$(echo .)com \
    --cc=maxime.ripard@bootlin$(echo .)com \
    --cc=mchehab+samsung@kernel$(echo .)org \
    --cc=nicolas.ferre@microchip$(echo .)com \
    --cc=robh+dt@kernel$(echo .)org \
    --cc=rui.zhang@intel$(echo .)com \
    --cc=wens@csie$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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