From patchwork Thu May 4 00:48:46 2023 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: 13230680 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF263C77B7F for ; Thu, 4 May 2023 00:49:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229536AbjEDAtD (ORCPT ); Wed, 3 May 2023 20:49:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbjEDAtC (ORCPT ); Wed, 3 May 2023 20:49:02 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82B6799; Wed, 3 May 2023 17:49:01 -0700 (PDT) Received: from notapiano.myfiosgateway.com (unknown [IPv6:2600:4041:5b1a:cd00:524d:e95d:1a9c:492a]) (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 madras.collabora.co.uk (Postfix) with ESMTPSA id 6AF1866029DE; Thu, 4 May 2023 01:48:58 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1683161340; bh=fb9qzuGOPKwdGOlOltLWR82xaBQN6heDuW2S3Fru+/U=; h=From:To:Cc:Subject:Date:From; b=UKGB6Kw3vKZDXwfQqPEvvC3UVMVo3BMhPuyYlP6olq/3B2Db2zOjpns1Chy6Pewtb +80HIQei65zowdbNqRbIJgeQvEw4uWmcp9I47y0x3HN3+dPxB4Bqo/a7QIObzDf+dy E4jYD7NnzwCEfar9Ijacx5y57G78loqTdS01qCuhUEKgOnAKnLYjyNVVKKZGSOandk dyvs4Sy6qXAKKNCow4PJoAAn8Tb+3XLi9KD7M0/RIf+FJxxBsSm8layenuR15l9jXX 92lucnOuUYLtlFGAAjRJll3l1ymikA2lkJrJ4UZTSqSoLyICp7Lx8XYOZEKTXipRZG 9EVyauRRKEodw== From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= To: Daniel Lezcano Cc: kernel@collabora.com, Alexandre Mergnat , Balsam CHIHI , Chen-Yu Tsai , Alexandre Bailon , AngeloGioacchino Del Regno , =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Amit Kucheria , Matthias Brugger , "Rafael J. Wysocki" , Zhang Rui , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH v2 0/6] thermal/drivers/mediatek/lvts_thermal: Fixes to the interrupt handling Date: Wed, 3 May 2023 20:48:46 -0400 Message-Id: <20230504004852.627049-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org Fixes in the interrupt handling of the LVTS thermal driver noticed while testing it on the Spherion Chromebook (mt8192-asurada-spherion) with the MT8192 support series [1]. These are standalone fixes and don't depend on anything else. While version 1 fixed the interrupt storms that were happening, after doing some more testing I realized that interrupts still weren't correctly working when crossing thermal trip points, so I've added a couple more commits to get that fixed on version 2. [1] https://lore.kernel.org/all/20230307163413.143334-1-bchihi@baylibre.com/ Thanks, NĂ­colas Changes in v2: - Added commits 3, 5, 6 to get working interrupts when crossing thermal trip points - Updated commit 4 with interrupt flags for the offset NĂ­colas F. R. A. Prado (6): thermal/drivers/mediatek/lvts_thermal: Handle IRQ on all controllers thermal/drivers/mediatek/lvts_thermal: Honor sensors in immediate mode thermal/drivers/mediatek/lvts_thermal: Use offset threshold for IRQ thermal/drivers/mediatek/lvts_thermal: Disable undesired interrupts thermal/drivers/mediatek/lvts_thermal: Don't leave threshold zeroed thermal/drivers/mediatek/lvts_thermal: Manage threshold between sensors drivers/thermal/mediatek/lvts_thermal.c | 142 ++++++++++++++++++------ 1 file changed, 110 insertions(+), 32 deletions(-)