Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp2610674rwr; Fri, 28 Apr 2023 12:57:12 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7B2HEv5r8KfW7ODoEUIzvrYWz1TNPm34Dd3eJ+rhRbvhh3Vp0+V8o/PKI4MpGPabuqv/vv X-Received: by 2002:a17:90a:14c5:b0:24b:2fc1:8a9c with SMTP id k63-20020a17090a14c500b0024b2fc18a9cmr6368628pja.11.1682711832283; Fri, 28 Apr 2023 12:57:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682711832; cv=none; d=google.com; s=arc-20160816; b=sZjXlc+4ymdm/Nxk9Q5RihRPsOV3OtW7to6TDWOdSRvJzz1cF//tuHMLOP+qOChwsc EBGWK65bDQvb2VItHmtYOwp1Wqy2n1HMv2mkO9x0Cv1+y9tUCszEXIwjjpeDdXeWuZia FaknQfmFyKh5opS+n7l46koc/6mAsc4rhgv+81lbtcw5OgXO62L4glojcELC5XWwB7QY yn9Fw9zqY8FfdSwjxWPYEmudRmaziihsZe+T6qwykx0QRvjCaeMI1Vm4R0XMQhU/OsGk /DLXOvF9yuvq3o+YIYW5oAzS87o/doo3TlSy/sgGY6mRNQBmfegEaIn/uuhDmx6mBN6R 5k3Q== 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=P2XXi+NrsP76enstmErRAZy1e/4D0GywNfF3gzMt4Io=; b=auS1NhS8lqI7Nji7TqYfnnEZFAcNNg63tgFUvlIC+AujTniQvRnws2BSKyN9vm0BVX GGcBn/nTUmggIVq6Lo3wmJwNmt57u1bj3lEaN8BYofv1cV0fQTBnpkBtiw1YHWAYApra Q2E1omvJyXzNdAY6AekTdFab7JzscweBa5JoyM6sQZjOlHVHxKmEvkPFOtNO2LxDDsUL 56pHUDpMnsDkXJzf+8eGE4XwFHuHCqu/mckohEzGcvJHi/mvAXHUFOiKBLuUa5un6ipt 9KhOKdidPOUU+o2O3RGuCJa5LDI/0/qkkjfFTA4VfpEjOD5zrj669uEa3XIzTDbyT2ll Wkww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=VzHKN9+X; 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 q6-20020a17090aa00600b00246f8b06125si24035317pjp.108.2023.04.28.12.56.58; Fri, 28 Apr 2023 12:57:12 -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=VzHKN9+X; 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 S230247AbjD1TyF (ORCPT + 99 others); Fri, 28 Apr 2023 15:54:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33350 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346591AbjD1TyE (ORCPT ); Fri, 28 Apr 2023 15:54:04 -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 87DAA26A2; Fri, 28 Apr 2023 12:54:03 -0700 (PDT) Received: from notapiano.myfiosgateway.com (unknown [194.36.25.39]) (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 C3C4066032D1; Fri, 28 Apr 2023 20:53:58 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1682711642; bh=bFgsjmGEtfW0DqPTYSfCnvZNjmvGhNo5EmmXdWX0RMQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VzHKN9+Xo9gY6c2+76j54oDcneZ5dARncJUIODzt+FPHox6K4k6pvdGvIvy68b3PV e6sKAskt4SgE/G7OqiBpykC+azS9k8sN56dYCbG9Rq4VVyYg60oJ2RvbChLoKz9dYd 3zdoD7cJB5qfo2p3ETb+qz8Q/SAnDP/+lrFcH1nlXrSeMAJbduHtYqbrF6aEYbUj8K NPh8u5oZUWztmKyHXFpBFzAIJDikk8Kw7ciVmMzHc2MvM2NG8RveJDxn1EGPDqhe3l 8IMPoItQd8BPXHDoGFD3hxMMFEl87FQuMKQ1b5d/77DNZSYE6QutpYMtlihUqEkIDp 3KNOHzTYvVDpg== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Daniel Lezcano Cc: Alexandre Bailon , kernel@collabora.com, Chen-Yu Tsai , Balsam CHIHI , AngeloGioacchino Del Regno , Alexandre Mergnat , =?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 1/3] thermal/drivers/mediatek/lvts_thermal: Handle IRQ on all controllers Date: Fri, 28 Apr 2023 15:53:45 -0400 Message-Id: <20230428195347.3832687-2-nfraprado@collabora.com> X-Mailer: git-send-email 2.40.0 In-Reply-To: <20230428195347.3832687-1-nfraprado@collabora.com> References: <20230428195347.3832687-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,URIBL_BLOCKED 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") Signed-off-by: NĂ­colas F. R. A. Prado --- 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 d0a3f95b7884..56b24c5b645f 100644 --- a/drivers/thermal/mediatek/lvts_thermal.c +++ b/drivers/thermal/mediatek/lvts_thermal.c @@ -449,7 +449,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.40.0