Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp30690779rwd; Thu, 6 Jul 2023 09:17:55 -0700 (PDT) X-Google-Smtp-Source: APBJJlHJdb8eXuV8hPMyw5B526nHwLDhELbYvrKDACnlW00Y6CGTE2ci4FWyXCbe1GFHWwKdAnFb X-Received: by 2002:a17:902:ef8d:b0:1b5:39f8:b22 with SMTP id iz13-20020a170902ef8d00b001b539f80b22mr1627970plb.33.1688660274596; Thu, 06 Jul 2023 09:17:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688660274; cv=none; d=google.com; s=arc-20160816; b=1EMq7VpcVsCmtvm7730kumQGPp5ug/KhnRUc/Tt3rlyuH5tyYNIdJrF6sqbrptu9KX IquUeJ8OxNlw3M4/slSsx3VsN7Tq+RFlkfxHBBuwZmsl42XcW/4NMVEwyvuKmbegvLco 51XNWcWcUEN60Y6/+HBYLrfUq2KkbVcxSyE1Qje2S3R9vX6zGRjQD/B9kVYcvsmgIEIe vYjZn0jOys1VzH1abwtwxTImJ8THEYVe2uF/YJS0YLyABxntXZEIQqLa4VVoKR8WRIAl 0lxwro+HfGnSyjOi5sRIGcC2woPI90AG/c+AKyZLLP4JMjW3Wj60+hfxO3wqwqAMoYxA FWcg== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m6-20020a170902db0600b001b7fb1aa81dsi1635965plx.289.2023.07.06.09.17.39; Thu, 06 Jul 2023 09:17:54 -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 S233540AbjGFPio (ORCPT + 99 others); Thu, 6 Jul 2023 11:38:44 -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 ); 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?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 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: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: AngeloGioacchino Del Regno Tested-by: Chen-Yu Tsai Signed-off-by: NĂ­colas F. R. A. Prado --- (no changes since v1) drivers/thermal/mediatek/lvts_thermal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.41.0