From patchwork Mon Jan 13 13:27:15 2025 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: 13937356 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 9904CE7719F for ; Mon, 13 Jan 2025 13:34:14 +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=UM5xBgLxVOx62evQhWk5j02E/4X8nml4oCd7Hb1vzWU=; b=I5z76rih4hWJlH3R5vnPoOts9g H3DcoeNwIuuUhxMpQrelVnizS7Jl6YiAHEE11pR/Uh2HYf/cr+nDLKdQz7Ekqk8seK+zLnm8edAOm 0GbSjGOaiFUsmHfXA3OnSKjLvMqTEQToNBBJS4QLdSps370uHQ4BtW4Qxx+Hbi6pM1TOD+IJriaQw Cdt7Z4QM5OmX5YaJyUavEYk5fXqXbzrYmSJoegLOj9gZ8C1iOPEVb2hgKiGvao4T+qcJ90vD5MfXN M80W/9VjPajDK4it3auq4V6p4PYisOh/C2RxIGR4Oo7D9814PGZTf18QE5Lo21VjYBO9cYJxkASe5 L3yutvSw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tXKa5-00000005G9n-3Svu; Mon, 13 Jan 2025 13:34:13 +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 1tXKUJ-00000005F7J-1oHz; Mon, 13 Jan 2025 13:28:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1736774894; bh=AktmW7JFPLzeN3KumqXBxvzZLmczb0J988S02mCLAZw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pZhb4B82c8fAg5lLeiTx59OQZsidzUPI3e8XZUaoze3dry4ZB+8nWtON7V2lzjr4M /rGM7v6K+YDQihy3OiOeDGSM58ykZp+pvHayajiNOCJlSS/3c8BLiH+/EnddzyNUr7 SeR+YcdPSvUHbrbsdCLgq1/adDmoWlrwoDKV2PdvyIPYSVV9r8vqP+H0Vk9eXbjbrV 3yJC5oT9K1tWYgkepgSSWiKS0GxglHI+8R3f12waD4taa6RTyN62s9ToAhtXyxUDVx YiGaC2Jy4ASLjO6Jo2WFuhztW+DXH4WHvqX/Y/wMI/mSW1USEN4uKChmz8IdVDnmMi XXwfEQjBnxAWg== Received: from [192.168.0.47] (unknown [IPv6:2804:14c:1a9:53ee::1000]) (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 096AF17E0E9D; Mon, 13 Jan 2025 14:28:09 +0100 (CET) From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= Date: Mon, 13 Jan 2025 10:27:15 -0300 Subject: [PATCH RESEND v2 4/5] thermal/drivers/mediatek/lvts: Start sensor interrupts disabled MIME-Version: 1.0 Message-Id: <20250113-mt8192-lvts-filtered-suspend-fix-v2-4-07a25200c7c6@collabora.com> References: <20250113-mt8192-lvts-filtered-suspend-fix-v2-0-07a25200c7c6@collabora.com> In-Reply-To: <20250113-mt8192-lvts-filtered-suspend-fix-v2-0-07a25200c7c6@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-20250113_052815_632981_D66CDF5D X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. 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; }