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 98F14C46CA2 for ; Mon, 18 Dec 2023 00:58:26 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:Cc: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=g9TEhnWZ7CeXmY088482up2Q1p9+JkUkopY3fXjPNJM=; b=yXJxGS+MgzUiFz NkygEZcbbGyn/OuTjjznjT0maTzq71tepJ5XDYum3wO9t28tY2rNHtGrkOhSQGnomltwg00rxa4Qq QV6swMN5tvznqcHnk7gjPsT1dUBjkL31mCIcPVnK4LF9YGVKlrMbgtL3mYyDJmpO69DtlM2zHneW1 lY9XFfdp548NCfJ3HOE7cHEiOSMm7tqJgLE5ayN542cnuO2I9tReNE72EHGwmlkCQL2enaDWt373z ZH0RZ59Vrf3/oDgB8yDh9n6VG6AoUWEeA1PvBEpePllxdNSM4EYQwvK1SeoOulOaj8ahiCVJnxasU n9fr/+vp9xhF1VIkKjXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rF1xF-008kos-0l; 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 Cc: Vasily Khoruzhick , Yangtao Li , "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Paul Walmsley , Palmer Dabbelt , Albert Ou , John Watts , Cristian Ciocaltea , Marc Kleine-Budde , linux-pm@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org 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-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=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-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel