Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30652799rwd; Thu, 6 Jul 2023 08:49:38 -0700 (PDT) X-Google-Smtp-Source: APBJJlF1Dm1y7aamzi9ou+NVmia3KIItBtWx0dHEFUZxHTweTkdW0ynR5sZmXEkBsAfFurfQ1TIS X-Received: by 2002:a17:902:e881:b0:1b8:72b2:fd3b with SMTP id w1-20020a170902e88100b001b872b2fd3bmr1829988plg.54.1688658577875; Thu, 06 Jul 2023 08:49:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688658577; cv=none; d=google.com; s=arc-20160816; b=bK9x+LoEMbTU/OJdW9tpjtus/k5ex8Knpk70J3GWLiSOwEZoUicvz64otsdkJorWGh UrPReDetyASQvUaSUFMplx+3Z+l9rHmaEM8kKiRmeuL/VLL9BuxbC7bfA6hXwBrUBmdI PT/B8ZFPzJNwnnLMooneWBiM38b03q4Q7VJW9uUQMWBnCc86ng6hUYfJF4nwhf134AVd gtC7VqqSau/87l/5pvCUKkVLW8F3fjTwiQOucy3WeVLFfLriycyP1nuQXUla2nqOJMba V0geU4gj33BnfZ1OMCTvj4OK16MtYg8riASjxYixpeGP1eP1GN8G+c3biqFSswhs/Ten BIzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=xdqRhyBG/ruU9wLu1dxq5Te9rcpUpqS7DObIN034KeA=; fh=4pMxnUSgEw1DnZMrJ0q1qssSvnBh1iy+HC6hGNd/a0o=; b=pv5qg+MTG56m9CJuWjuUgsg+RxJFCa000iX8/tyApoyijka8Ye3n8OclTKQdVBtMwV IagB/vPQECdYsuQKk0kMYBjB28nYKK6cjnU2warua8J+RpM7wAWYeVxSMu3/FOjtRWrv ihq2VnnOnEBGjhhJfwb1O0OXdNNx84DAKW7UDRK9/FQq1fSko71KFMTG85stuUjpQzm0 C4nBKQBgwC1YiE815otej2wpDFRWeh0+ctWWEieucOHa85qXfP7QdAx2ID6/oCqPv9Ad 5h6P+f6+lWHGlAmVl1RIN32/X+sKKG9OR6M5YVTtUjgb/CyUIjvOSn0jeaNeEBKIBZjp 83Ow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=S8tuXTra; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h8-20020a170902680800b001b536b13407si1461583plk.68.2023.07.06.08.49.25; Thu, 06 Jul 2023 08:49:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=S8tuXTra; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232752AbjGFPii (ORCPT + 99 others); Thu, 6 Jul 2023 11:38:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41488 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232151AbjGFPih (ORCPT ); Thu, 6 Jul 2023 11:38:37 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DF0C171D; Thu, 6 Jul 2023 08:38:36 -0700 (PDT) Received: from notapiano.myfiosgateway.com (zone.collabora.co.uk [167.235.23.81]) (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 F32F86606FD9; Thu, 6 Jul 2023 16:38:30 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1688657914; bh=YtEw57pQl1u5j7kjoL9FMCgBqCbc54t/fOoETI0WtnM=; h=From:To:Cc:Subject:Date:From; b=S8tuXTraa+8ofdyz9TCNT4AAyvTRMBzIUG/O5SQBwf6Lx4/X9o/4Y7ePkfsTrkifF n9kwhBPYBoYUISK1sQAefLgAxhlgo9Q33iFi2csLXL+y7FDt8JmNtu8Zs6lxb69neW AT8dc9b9S9irmqcMa94PRrffHP+N91aUUezYx58SMKBOQ6YX8OK/TjctgTSzWNbk/u LyM3r3d/2wPuvJpMwKtn7Ea9qD4VXRnjMdjf+erLfpgJ0jQzJBoNIk4OYbctf++yKW PT2K+4Hl6mv5yuCxWGg+qjIX8AWSNY22se9+GZNbd1F1f+XNM9jOzZy8g9YyPqxuDb T9wkTFN9FxuOQ== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Daniel Lezcano Cc: Alexandre Bailon , Balsam CHIHI , AngeloGioacchino Del Regno , Chen-Yu Tsai , Alexandre Mergnat , kernel@collabora.com, =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , 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 v3 0/6] thermal/drivers/mediatek/lvts_thermal: Fixes to the interrupt handling Date: Thu, 6 Jul 2023 11:37:31 -0400 Message-ID: <20230706153823.201943-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series fixes interrupt handling in the LVTS thermal driver. It not only solves the interrupt storms currently happening, but also allows the temperature monitoring interrupts to trigger when the thermal trip temperature is reached. This series was tested together with the MT8192 support series [1] on the Spherion Chromebook (mt8192-asurada-spherion). These are standalone fixes and don't depend on anything else. [1] https://lore.kernel.org/all/20230530195132.2286163-1-bero@baylibre.com Thanks, NĂ­colas Changes in v3: - Reworded cover letter - Split bitmaps for immediate and filtered modes into separate arrays (patch 2) - Removed duplicate code for setting MINIMUM_THRESHOLD (patch 5) 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 | 152 ++++++++++++++++++------ 1 file changed, 115 insertions(+), 37 deletions(-) -- 2.41.0