From patchwork Mon Dec 9 17:00:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= X-Patchwork-Id: 13900096 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 1609EE7717D for ; Mon, 9 Dec 2024 17:05:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=01PcmqBxQjhm4ppFMsKOjxDh3N80RwHoZD7WlJ1r61A=; b=EXnhmSV7hztCBg2gtRVU8rOaNl 5m7BjbZbHesBJLHnvEa2Q1OE60rCwPs+EFXfk5wV3w3wvr3yKl6Wz9ckfgRec+tkyzm7qLQitE/LZ mmFzVad9FSp11Ck5laBv/lpSagBkH9AZg2JQndo8DgUz1Ntb9VMKzhir1AYx1pRsmXeVCySbbo5fF vbvatBshP03giDmjmx5ahbo5GV7kUyIUEMUuZtU4R1KhopAPgSzyTi0XFHXN7mJfRM7LzG6h7yc1E khnkJ+4uxzTzO6tyRk8sarRzTsrHuyrv1UkKN3lvtjeLeBChiUEii/QTES+1XSzw8pR+wy4HQk3aS ysIYnbTA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tKhCc-00000008f7z-0tfh; Mon, 09 Dec 2024 17:05:46 +0000 Received: from bali.collaboradmins.com ([2a01:4f8:201:9162::2]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tKh7k-00000008dki-1DDZ; Mon, 09 Dec 2024 17:00:45 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1733763642; bh=xMYKnT9eI6CI0S0/AklVxM6Kv41jw6IBy8E+3bue+m8=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=MjR0SLviV2ERCh7BvRdUqkr0nKF7qktLzoCHJlIOvVPXHBQJO70b67Nb4+L5Gej3g cRUrV8lYhNnanEKb35QH2IPO9YLQu2gC2IsUAcbDZbCHFVSP1F+bR6UUDYMI50M3Id PlDAH+VqQqMDxb1WQx6ZisTx7cpvhmeLQKCBWdIR9rL2UPAJnrge/lhlTdtBTqBAek IyfAZx/56PeB+r4H7SY9TE7P/7uDxwxI67Qg8Mw4cZH4HkufcwwfXH8iZsaMORwC+t BH51lb7N1j9xjIVnRtC638hXAiAXGVHzJQtMGH8IpXPiZolWLqJWwYZCj2ILMhLTQw QJY/ShJL/T5sg== Received: from [192.168.0.47] (unknown [IPv6:2804:14c:1a9:53ee::1001]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: nfraprado) by bali.collaboradmins.com (Postfix) with ESMTPSA id 62BAF17E37C5; Mon, 9 Dec 2024 18:00:38 +0100 (CET) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Date: Mon, 09 Dec 2024 14:00:05 -0300 Subject: [PATCH v2 4/5] thermal/drivers/mediatek/lvts: Start sensor interrupts disabled MIME-Version: 1.0 Message-Id: <20241209-mt8192-lvts-filtered-suspend-fix-v2-4-5b046a99baa9@collabora.com> References: <20241209-mt8192-lvts-filtered-suspend-fix-v2-0-5b046a99baa9@collabora.com> In-Reply-To: <20241209-mt8192-lvts-filtered-suspend-fix-v2-0-5b046a99baa9@collabora.com> To: "Rafael J. Wysocki" , Daniel Lezcano , Zhang Rui , Lukasz Luba , Matthias Brugger , AngeloGioacchino Del Regno , Alexandre Mergnat , Balsam CHIHI Cc: kernel@collabora.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, Hsin-Te Yuan , Chen-Yu Tsai , =?utf-8?q?Bernhard_Rosenkr=C3=A4nzer?= , "Rafael J. Wysocki" , =?utf-8?b?TsOtY29sYXMg?= =?utf-8?b?Ri4gUi4gQS4gUHJhZG8=?= X-Mailer: b4 0.14.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241209_090044_480344_08F829D6 X-CRM114-Status: GOOD ( 10.08 ) X-BeenThere: linux-mediatek@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-mediatek" Errors-To: linux-mediatek-bounces+linux-mediatek=archiver.kernel.org@lists.infradead.org Interrupts are enabled per sensor in lvts_update_irq_mask() as needed, there's no point in enabling all of them during initialization. Change the MONINT register initial value so all sensor interrupts start disabled. Reviewed-by: AngeloGioacchino Del Regno Signed-off-by: NĂ­colas F. R. A. Prado --- drivers/thermal/mediatek/lvts_thermal.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 04bfbfe93a71ee9e3428bfd7f8bd359fe9446e88..38668b5b34c7375d3a3b0dcf8dcc965a254776cc 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -65,7 +65,6 @@ #define LVTS_HW_FILTER 0x0 #define LVTS_TSSEL_CONF 0x13121110 #define LVTS_CALSCALE_CONF 0x300 -#define LVTS_MONINT_CONF 0x0300318C #define LVTS_MONINT_OFFSET_HIGH_INTEN_SENSOR0 BIT(3) #define LVTS_MONINT_OFFSET_HIGH_INTEN_SENSOR1 BIT(8) @@ -951,7 +950,7 @@ static int lvts_irq_init(struct lvts_ctrl *lvts_ctrl) * The LVTS_MONINT register layout is the same as the LVTS_MONINTSTS * register, except we set the bits to enable the interrupt. */ - writel(LVTS_MONINT_CONF, LVTS_MONINT(lvts_ctrl->base)); + writel(0, LVTS_MONINT(lvts_ctrl->base)); return 0; }