From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 760BC847B for ; Sun, 10 Dec 2023 23:48:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com 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 048D6FEC; Sun, 10 Dec 2023 15:49:11 -0800 (PST) Received: from minigeek.lan (unknown [172.31.20.19]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4906A3F5A1; Sun, 10 Dec 2023 15:48:22 -0800 (PST) Date: Mon, 11 Dec 2023 00:05:28 +0000 From: Andre Przywara To: Maksim Kiselev Cc: anarsoul@gmail.com, bob@electricworry.net, conor+dt@kernel.org, daniel.lezcano@linaro.org, devicetree@vger.kernel.org, jernej.skrabec@gmail.com, krzysztof.kozlowski+dt@linaro.org, linux-arm-kernel@lists.infradead.org, linux-pm@vger.kernel.org, linux-sunxi@lists.linux.dev, lukasz.luba@arm.com, martin.botka@somainline.org, rafael@kernel.org, robh+dt@kernel.org, rui.zhang@intel.com, samuel@sholland.org, tiny.windzz@gmail.com, wens@csie.org Subject: Re: [PATCH v3 5/6] thermal: sun8i: add support for H616 THS controller Message-ID: <20231211000528.57cb646c@minigeek.lan> In-Reply-To: References: <20231128005849.19044-6-andre.przywara@arm.com> Organization: Arm Ltd. X-Mailer: Claws Mail 4.2.0 (GTK 3.24.31; x86_64-slackware-linux-gnu) Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 9 Dec 2023 13:44:34 +0300 Maksim Kiselev wrote: Hi Maksim, > Hi Martin, Andre. > > May I inquire? Why do we need a separate sun50i_h616_ths_calibrate() > function? Why can't we just extend an existing sun50i_h6_ths_calibrate()? > > At my glance the calculations in both functions are the same. We just > need to handle a special case for the 4th sensor. You seem to be right, they are indeed the same, just written slightly differently. Do you already have any patches that unify that? I don't know if Martin or I find time to do it this week, but we could also optimise this later. Cheers, Andre