Message ID | 20230706153823.201943-2-nfraprado@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9f45:0:b0:3ea:f831:8777 with SMTP id v5csp2670848vqx; Thu, 6 Jul 2023 09:11:25 -0700 (PDT) X-Google-Smtp-Source: APBJJlFCy3jgRANI26dvvj9htgFac1qZIpMdvp3vvOfjRdVqFFyNp3gDc5Bf/FExT51gBMwTLj+A X-Received: by 2002:a05:6808:997:b0:39e:e0f0:55ed with SMTP id a23-20020a056808099700b0039ee0f055edmr2094398oic.53.1688659885176; Thu, 06 Jul 2023 09:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688659885; cv=none; d=google.com; s=arc-20160816; b=NBniTB2ExHqaB675dicZAA3hGlq6tBYdH/OLmrFWrMcetbNielA0w4F5DtXx+m/T6T xtEd14ZP4po2mOcmXvHHPOT+VXA3cIa3mfD7KQWTu56F5WqhJ4Q+6dSnxerNwSy/gP4N qLcODVPv5Z5jambe/0GeN9ONnINmYO1ZwG1cZBtddGZuMneYlj22zF75fb3XrsRiCaB7 wT5V0DDK72DJ3yAgtWavpkrHSs+cbhJsXx+iVQnVQ3w5AV5IatrX44a27mP8xRDl2ZE8 Ktqjw3dXCwazZFNVbpQdOJPCYgfCn17GtXfVglZ8C34NBDfDZVpqUr8L/wXaKbYx1+O8 d6vA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=d+qExpnrTRGuEbIJUgDN+ZcGb0QDRZ8RglubgpMI9PQ=; fh=4pMxnUSgEw1DnZMrJ0q1qssSvnBh1iy+HC6hGNd/a0o=; b=SC4uTjspAFRahv5twrmJ/tH5ZrhEJs0LY499k8sg/yv3SO/l+WYBx7ElPO5ZsHv6KA Ug/7J2ExbNUXBoerScIuUmEekgPlmGqEkhxi4PV3Q3+wbzVsgkrdbYfFZZCoy3X+4XpG 1Dl85dQHBB2g3ghDi/sHV0qOZ8Bp4NE1AuJFgTT+txyvmWThVSu02eaj2e3up9yAsrgd I5TOGGI+nvyi0eByy32V3Qj0Qcbs6WqSccz56W3zzq9OrMeS/VMI3OOWHfEJxBK9DV7a IQ7/k9tgKV/dEcYSAaFpk68kxjKZfXtzhVrCWlFHp9IIUVM/T5rZHUdUKp1L7apooBc7 HCSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b="hJsTH/a/"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k68-20020a633d47000000b005577100c774si1741067pga.869.2023.07.06.09.11.06; Thu, 06 Jul 2023 09:11:25 -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="hJsTH/a/"; 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 S233570AbjGFPip (ORCPT <rfc822;hadasmailinglist@gmail.com> + 99 others); Thu, 6 Jul 2023 11:38:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232151AbjGFPik (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 6 Jul 2023 11:38:40 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04230171D; Thu, 6 Jul 2023 08:38:39 -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 2F37D6606FDA; Thu, 6 Jul 2023 16:38:34 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1688657918; bh=HO4nDuWbgJLp3N3SyhPaXs/hZj7uYhYlvxsZ7dSo314=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hJsTH/a/arRPGkkgAo8mvSy/ygWuAwMYYF5AXrojN9/7jZ5ZS8WCtW7LnNpJNXn9/ qTPtU/K2hdX4e9NWlp/Irm+Rn0JiHnh7bgRUeZPjAhkOSrE3EfTUHhYy/Ncr5ofEFA rHobrTrkQYVQ1aD6um1C68uTS6a5EQTFQlH6qy+20QVqudwgBvDnKH+VMaZVFScImS beKNfpbQAHa6ukA1zFVF9KUuZKUeLWOl6t1NGvf+2VXDpncoOsntGLNo3jGlIDLVZt IDcnGVvYs6ZXGPjU5+Xoo7/eAHIuFQYIaAVmHgFMqWXVC2vQeQVXbsekQ/anUbKwfx Ev8+AgwIsiQbg== From: =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com> To: Daniel Lezcano <daniel.lezcano@linaro.org> Cc: Alexandre Bailon <abailon@baylibre.com>, Balsam CHIHI <bchihi@baylibre.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Chen-Yu Tsai <wenst@chromium.org>, Alexandre Mergnat <amergnat@baylibre.com>, kernel@collabora.com, =?utf-8?b?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= <nfraprado@collabora.com>, Amit Kucheria <amitk@kernel.org>, Matthias Brugger <matthias.bgg@gmail.com>, "Rafael J. Wysocki" <rafael@kernel.org>, Zhang Rui <rui.zhang@intel.com>, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org Subject: [PATCH v3 1/6] thermal/drivers/mediatek/lvts_thermal: Handle IRQ on all controllers Date: Thu, 6 Jul 2023 11:37:32 -0400 Message-ID: <20230706153823.201943-2-nfraprado@collabora.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230706153823.201943-1-nfraprado@collabora.com> References: <20230706153823.201943-1-nfraprado@collabora.com> 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1770688227727110622?= X-GMAIL-MSGID: =?utf-8?q?1770688227727110622?= |
Series |
thermal/drivers/mediatek/lvts_thermal: Fixes to the interrupt handling
|
|
Commit Message
Nícolas F. R. A. Prado
July 6, 2023, 3:37 p.m. UTC
There is a single IRQ handler for each LVTS thermal domain, and it is supposed to check each of its underlying controllers for the origin of the interrupt and clear its status. However due to a typo, only the first controller was ever being handled, which resulted in the interrupt never being cleared when it happened on the other controllers. Add the missing index so interrupts are handled for all controllers. Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver") Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: Chen-Yu Tsai <wenst@chromium.org> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com> --- (no changes since v1) drivers/thermal/mediatek/lvts_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 06/07/2023 17:37, Nícolas F. R. A. Prado wrote: > There is a single IRQ handler for each LVTS thermal domain, and it is > supposed to check each of its underlying controllers for the origin of > the interrupt and clear its status. However due to a typo, only the > first controller was ever being handled, which resulted in the interrupt > never being cleared when it happened on the other controllers. Add the > missing index so interrupts are handled for all controllers. Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com>
diff --git a/drivers/thermal/mediatek/lvts_thermal.c b/drivers/thermal/mediatek/lvts_thermal.c index 1e11defe4f35..ba8f86ee12b6 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -451,7 +451,7 @@ static irqreturn_t lvts_irq_handler(int irq, void *data) for (i = 0; i < lvts_td->num_lvts_ctrl; i++) { - aux = lvts_ctrl_irq_handler(lvts_td->lvts_ctrl); + aux = lvts_ctrl_irq_handler(&lvts_td->lvts_ctrl[i]); if (aux != IRQ_HANDLED) continue;