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 C484FCD11C2 for ; Wed, 10 Apr 2024 09:56:02 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=+WSZiAz+tspn78hrxSKhLr59vXi/mRezuSntDH87Hr4=; b=ndHeebeobS0LpC 6tibKJH4Jbtc42OCd74+ZHf0a233beENrPYDUlgz6R5ckbZmuzLrxmj9gcot+diAJSltdeSUdC1Tf muArvftJXDcw6GvyAJcYROOLAV0vLihsquSwyqIHdqLKCeTUqo2doltt5UR+F4EsGugxFlGWLxXNb jMOhPhcsyx+ipb26fKDGLc1X7yxsURr3EwGv5f5KEROZ1o3l58JEw9wzB8P84lFWiCZHbPc8sInG3 MrmaqML5r5IzOonYS+q6jCsfud7V6Vp8z7tkt9mdCm1GykM/ur4hzHJrH65gpix5U+gDWRAiqYoXg JatZOrQkCZDcfBILZUWg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruUgG-00000006FoF-3cQ3; Wed, 10 Apr 2024 09:55:48 +0000 Received: from madrid.collaboradmins.com ([46.235.227.194]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruUgE-00000006FnV-0nPv; Wed, 10 Apr 2024 09:55:47 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1712742943; bh=vtMV+Q63GqmW7FHaxb//RVu//0rLNFnAcEs9bPdrm4I=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=H+y0ra/c8fi8Dwjg9BpujJCQ3xxygBdVjA500qeuCeFzp+ZJCdVlH8vvyIyeB9HsR DA5s1nO7qp99kI1dgRqnd1PTbpBFjs85i5qV3Hot/2ZAXB89CtB/5J2ArHtfxZIfc4 o/FWIUIdxtTElcmjbWlPUDCyyKR6tMyoviCKvabZV/v9HK5a7zrZqMjw0p3nHjnN3w 4zb7jFPSByx5cem0sGHo6y2Jk2hE3kOqoj2HdC2Zn2bOr9PjbduZgwf4kp6YPA3R7C 5aFuSh9WocJO85woaHW5vSI8fz2DgrmTJwQM0lPD7FsT9kfnHlBFDXjwU2o2Vs0Wny qEFI8NSPXteGQ== Received: from [100.113.186.2] (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id C1E25378000E; Wed, 10 Apr 2024 09:55:42 +0000 (UTC) Message-ID: <9c5aa4fb-a83c-470e-acf8-dd31303e50c2@collabora.com> Date: Wed, 10 Apr 2024 11:55:42 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] thermal/drivers/mediatek/lvts_thermal: Remove redundant code in lvts_ctrl_configure To: Pin-yen Lin , Daniel Lezcano , "Rafael J . Wysocki" , Zhang Rui , Lukasz Luba , Matthias Brugger , Nicolas Pitre Cc: linux-arm-kernel@lists.infradead.org, Alexandre Mergnat , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, =?UTF-8?Q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= , Minjie Du , linux-pm@vger.kernel.org, Frank Wunderlich , Balsam CHIHI References: <20240410000730.628043-1-treapking@chromium.org> From: AngeloGioacchino Del Regno Content-Language: en-US In-Reply-To: <20240410000730.628043-1-treapking@chromium.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240410_025546_404767_6A0354C3 X-CRM114-Status: GOOD ( 15.95 ) 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Il 10/04/24 02:07, Pin-yen Lin ha scritto: > The removed variable assignment is never written to the register, so it > has no effect on the device behavior. Mediatek has confirmed that it > is not required to initialize this register for current platforms, so > remove this segment to avoid confusion. > > Signed-off-by: Pin-yen Lin > Added Nicolas Pitre to the loop; Nicolas, since you're pushing support for those, can you please check if CALSCALE is used/useful/necessary on MT8186/88 before I give a R-b to this commit? P.S.: Can anyone from MediaTek please confirm if the 0x300 value is right for this register? I'd still like Linux to properly initialize the registers, even if this could technically be a default value. > --- > > drivers/thermal/mediatek/lvts_thermal.c | 6 ------ > 1 file changed, 6 deletions(-) > > diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c > index fd4bd650c77a..48d2f8ba3f18 100644 > --- a/drivers/thermal/mediatek/lvts_thermal.c > +++ b/drivers/thermal/mediatek/lvts_thermal.c > @@ -985,12 +985,6 @@ static int lvts_ctrl_configure(struct device *dev, struct lvts_ctrl *lvts_ctrl) > value = LVTS_TSSEL_CONF; > writel(value, LVTS_TSSEL(lvts_ctrl->base)); > > - /* > - * LVTS_CALSCALE : ADC voltage round > - */ > - value = 0x300; > - value = LVTS_CALSCALE_CONF; As a side note, I believe that the original author wanted to write, instead... value = LVTS_CALSCALE_CONF; writel(value, LVTS_CALSCALE(lvts_ctrl->base); Cheers, Angelo > - > /* > * LVTS_MSRCTL0 : Sensor filtering strategy > * _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel