From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79C29C3DA6E for ; Mon, 18 Dec 2023 00:58:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=GSRGFRTbp3kvLE7leThOrO+zWGpRBqRYtdRKV0aQhHw=; b=Yw6FgZB2urGeEj Xdhrnl7C6TgMZsUFx5JfkxRkGLgS1BoBtqc4VbCa8P3VXSbqf0SBRaaxohmCAZ9wnAuxwHExT81Tl ZZlr7IQn1di2BQ9KRRANhqBZROOVzS3Bs9UdQQN0T6PEgRPZRQQ2OMBgVfCQdvp7r3IhwyZxwhBbn aERclwPKqAAxw/avJ7LgaB3LTxgDl8mvDzCa3k5ya1NSwBYn05HtW7MZmcBkCEvZSinayXw2V8cvz jXgl3tQDdx8UWuzPwGyqa0m8UmeGhJLvhFeeZjBtMIr9rlL8ePRiIWTw/IsMe0zwYiM1cTNmMbgJP MLoF12yqA5PYFjAHj+VQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rF1xF-008kpQ-39; Mon, 18 Dec 2023 00:57:57 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rF1xB-008kns-0B; Mon, 18 Dec 2023 00:57:54 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B55E81FB; Sun, 17 Dec 2023 16:58:32 -0800 (PST) Received: from minigeek.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id C59CD3F738; Sun, 17 Dec 2023 16:57:44 -0800 (PST) Date: Mon, 18 Dec 2023 00:57:30 +0000 From: Andre Przywara To: Maksim Kiselev Subject: Re: [PATCH v6 2/3] thermal: sun8i: Add D1/T113s THS controller support Message-ID: <20231218005730.59227952@minigeek.lan> In-Reply-To: <20231217210629.131486-3-bigunclemax@gmail.com> References: <20231217210629.131486-1-bigunclemax@gmail.com> <20231217210629.131486-3-bigunclemax@gmail.com> Organization: Arm Ltd. X-Mailer: Claws Mail 4.2.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231217_165753_207550_CB0B6C7E X-CRM114-Status: GOOD ( 18.21 ) X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Rafael J. Wysocki" , Yangtao Li , John Watts , Krzysztof Kozlowski , linux-riscv@lists.infradead.org, Samuel Holland , Daniel Lezcano , Jernej Skrabec , Vasily Khoruzhick , Chen-Yu Tsai , Zhang Rui , linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, Conor Dooley , Albert Ou , linux-pm@vger.kernel.org, Rob Herring , Marc Kleine-Budde , Paul Walmsley , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Palmer Dabbelt , Lukasz Luba Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-riscv" Errors-To: linux-riscv-bounces+linux-riscv=archiver.kernel.org@lists.infradead.org On Mon, 18 Dec 2023 00:06:23 +0300 Maksim Kiselev wrote: Hi Maksim, > From: Maxim Kiselev > > 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 Reviewed-by: Andre Przywara 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