public inbox for linux-riscv@lists.infradead.org
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Maksim Kiselev <bigunclemax@gmail.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>,
	Yangtao Li <tiny.windzz@gmail.com>,
	John Watts <contact@jookia.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	linux-riscv@lists.infradead.org,
	Samuel Holland <samuel@sholland.org>,
	Daniel Lezcano <daniel.lezcano@linaro.org>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	Vasily Khoruzhick <anarsoul@gmail.com>,
	Chen-Yu Tsai <wens@csie.org>, Zhang Rui <rui.zhang@intel.com>,
	linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org,
	Conor Dooley <conor+dt@kernel.org>,
	Albert Ou <aou@eecs.berkeley.edu>,
	linux-pm@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
	Marc Kleine-Budde <mkl@pengutronix.de>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Palmer Dabbelt <palmer@dabbelt.com>,
	Lukasz Luba <lukasz.luba@arm.com>
Subject: Re: [PATCH v6 2/3] thermal: sun8i: Add D1/T113s THS controller support
Date: Mon, 18 Dec 2023 00:57:30 +0000	[thread overview]
Message-ID: <20231218005730.59227952@minigeek.lan> (raw)
In-Reply-To: <20231217210629.131486-3-bigunclemax@gmail.com>

On Mon, 18 Dec 2023 00:06:23 +0300
Maksim Kiselev <bigunclemax@gmail.com> wrote:

Hi Maksim,

> From: Maxim Kiselev <bigunclemax@gmail.com>
> 
> This patch adds a thermal sensor controller support for the D1/T113s,
> which is similar to the one on H6, but with only one sensor and
> different scale and offset values.

That looks alright to me, the offset and scale values match the
converted values in the manual, and the rest looks indeed the same as
used on the H6.

> Signed-off-by: Maxim Kiselev <bigunclemax@gmail.com>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Thanks,
Andre

> ---
>  drivers/thermal/sun8i_thermal.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/drivers/thermal/sun8i_thermal.c b/drivers/thermal/sun8i_thermal.c
> index f989b55a8aa8..6a8e386dbc8d 100644
> --- a/drivers/thermal/sun8i_thermal.c
> +++ b/drivers/thermal/sun8i_thermal.c
> @@ -606,6 +606,18 @@ static const struct ths_thermal_chip sun50i_h6_ths = {
>  	.calc_temp = sun8i_ths_calc_temp,
>  };
>  
> +static const struct ths_thermal_chip sun20i_d1_ths = {
> +	.sensor_num = 1,
> +	.has_bus_clk_reset = true,
> +	.offset = 188552,
> +	.scale = 673,
> +	.temp_data_base = SUN50I_H6_THS_TEMP_DATA,
> +	.calibrate = sun50i_h6_ths_calibrate,
> +	.init = sun50i_h6_thermal_init,
> +	.irq_ack = sun50i_h6_irq_ack,
> +	.calc_temp = sun8i_ths_calc_temp,
> +};
> +
>  static const struct of_device_id of_ths_match[] = {
>  	{ .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths },
>  	{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
> @@ -614,6 +626,7 @@ static const struct of_device_id of_ths_match[] = {
>  	{ .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths },
>  	{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
>  	{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
> +	{ .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths },
>  	{ /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, of_ths_match);


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2023-12-18  0:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-17 21:06 [PATCH v6 0/3] Add D1/T113s thermal sensor controller support Maksim Kiselev
2023-12-17 21:06 ` [PATCH v6 1/3] dt-bindings: thermal: sun8i: Add binding for D1/T113s THS controller Maksim Kiselev
2023-12-17 21:06 ` [PATCH v6 2/3] thermal: sun8i: Add D1/T113s THS controller support Maksim Kiselev
2023-12-18  0:57   ` Andre Przywara [this message]
2023-12-19 17:14   ` Jernej Škrabec
2023-12-17 21:06 ` [PATCH v6 3/3] riscv: dts: allwinner: d1: Add thermal sensor Maksim Kiselev
2023-12-18  1:09   ` Andre Przywara
2024-09-09 17:16   ` Sam Edwards
2024-09-09 19:23     ` Andre Przywara
2023-12-19 17:42 ` [PATCH v6 0/3] Add D1/T113s thermal sensor controller support 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=20231218005730.59227952@minigeek.lan \
    --to=andre.przywara@arm.com \
    --cc=anarsoul@gmail.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=bigunclemax@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=contact@jookia.org \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-sunxi@lists.linux.dev \
    --cc=lukasz.luba@arm.com \
    --cc=mkl@pengutronix.de \
    --cc=palmer@dabbelt.com \
    --cc=paul.walmsley@sifive.com \
    --cc=rafael@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=rui.zhang@intel.com \
    --cc=samuel@sholland.org \
    --cc=tiny.windzz@gmail.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