From patchwork Wed Apr 10 00:07:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pin-yen Lin X-Patchwork-Id: 13623321 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 D5990C67861 for ; Wed, 10 Apr 2024 00:07:51 +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:Message-ID:Date:Subject:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=20rH+u1AnCkNFzAdeKNF7nhf7EUC2PtkI6naVJluLFQ=; b=BF2bHhCEb9gtF2 O+LN22Wd50j3pDkQlu1n4BJlEaGUmf9oQrLiRzQD30/AvSLii5UtKCk72pqKhUOjcPfUS1fgq9H/T MPqldKMmPfkjVp0/Ku66Lk9C+zcXX6G14vkv7qgo9YvYTieqPZc9h3hB3SiQQfFZsHRxZHSVEO4tf UcSu77td80nSr0pgTFClHSUSOyfitItvSTCQENKsWKmvy77UT3+GORL8l2YnlxO6syOIm1c5Pt+F/ JCAHiyzUJQ/AKKC073t2HTeawBG2orBbApMuzmFjMZ05fF/UUk7vzXuUgNZuMI/tuG/B0I0WHppYh YGV55rpvS8I1xcGAp5Tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruLV7-00000004MPY-25CM; Wed, 10 Apr 2024 00:07:41 +0000 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ruLV4-00000004MO4-3ZeN for linux-arm-kernel@lists.infradead.org; Wed, 10 Apr 2024 00:07:40 +0000 Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1e2c725e234so36324355ad.1 for ; Tue, 09 Apr 2024 17:07:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1712707657; x=1713312457; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=7ryIE7f8ZtWuzluYZgPcDX89WKZsm70yqAukGanFYfc=; b=Zh78fvuJd4OriO+vBn7w48eA6KughIaxUXS+aYDK2Cwj8iZrAm8JY33dIn2w8Ns2t8 O1BmZ7E2EBguFoCS1NFfZmy+TbI39wqJphtAEabhZ3tEqTJp5OY99E9TWLRbzd64Wq6J oWER79/p9kstEgACcBqXgLtIJ6vyjkIvM5/AI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712707657; x=1713312457; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7ryIE7f8ZtWuzluYZgPcDX89WKZsm70yqAukGanFYfc=; b=Lt+KtrJZZcHt2HE5ufLoTYveUsU4dvNgi8R/u+c81w5liJ6djzlEYFxC9vDrzxL0kz wQs23Lfo+KRz3/P/RBfnW5kpz2bxd6MNVYULfwkt1huXuUvThi4AzSeDaOHNA9w3i/ll CzCCUww2tY6f1/R2ISr/h8Ymbqdv1olak4vOT+EDD1TKDY5hq8CvFb9KJRV0Yi7KdXHZ UDr1TnXLf7DG+IH8BU3xkzc1tV2dwwMoi8/BHRNvnwy96VHvH0BRr3a+XQWLrZ02qzLq DtLijCHnwsSGmXbfUhziGDyj/9QBhW1yYBTkyqbPDhWfCCru8ke1Yqnq0O8rb8tIzUnW lXfw== X-Gm-Message-State: AOJu0Yy/qTj61oTHS52uF5xB9xk2T6MCKwYHLd+8V7LXWtlMsSdPno5p zhJqnVr/1rRNiSYbpxzVtkgONifdml5t3ESJ2qU6vt7kp9sKTIQJoFkirLbtMQ== X-Google-Smtp-Source: AGHT+IGoDhFHXggG7UV/XM8syPMLRIRAsx+Q3uuIedkhsyiKSu/gHHPrWq5HHr51Yh0dVfPQfUt54g== X-Received: by 2002:a17:902:a3c5:b0:1e4:39e0:660c with SMTP id q5-20020a170902a3c500b001e439e0660cmr5048130plb.23.1712707656662; Tue, 09 Apr 2024 17:07:36 -0700 (PDT) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:1f93:f735:b4fc:3be2]) by smtp.gmail.com with ESMTPSA id kn12-20020a170903078c00b001e0c91d448fsm9504939plb.112.2024.04.09.17.07.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Apr 2024 17:07:36 -0700 (PDT) From: Pin-yen Lin To: Daniel Lezcano , "Rafael J . Wysocki" , Zhang Rui , Lukasz Luba , Matthias Brugger , AngeloGioacchino Del Regno 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_?= =?utf-8?q?=2E_Prado?= , Minjie Du , linux-pm@vger.kernel.org, Frank Wunderlich , Balsam CHIHI , Pin-yen Lin Subject: [PATCH] thermal/drivers/mediatek/lvts_thermal: Remove redundant code in lvts_ctrl_configure Date: Wed, 10 Apr 2024 08:07:28 +0800 Message-ID: <20240410000730.628043-1-treapking@chromium.org> X-Mailer: git-send-email 2.44.0.478.gd926399ef9-goog MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240409_170738_901863_11E7F876 X-CRM114-Status: GOOD ( 11.40 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 Reviewed-by: Chen-Yu Tsai --- 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; - /* * LVTS_MSRCTL0 : Sensor filtering strategy *