Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp1596885rwr; Wed, 3 May 2023 18:32:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Qsoz5sem1AI4G0hSjw8KRM4a4UIB9SQ6EhhtMcVhZkZWKnNXatyVCGsRVk2vMYQC84d8J X-Received: by 2002:a05:6a20:3ca5:b0:f3:cac4:ca5d with SMTP id b37-20020a056a203ca500b000f3cac4ca5dmr692658pzj.35.1683163933726; Wed, 03 May 2023 18:32:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683163933; cv=none; d=google.com; s=arc-20160816; b=q1GGDyagTyT3q1f5RoaL9TIrQErwa8YKAQV5xSx9Vt2a4jeUzl2FQLZydTJkzuaium 8a+jXRP0SQ53t10HzD2ABNcrXNU5I16I1olt+uH94FRSb5TbA78PNi2gtwsVnexQgAMr Sh6YxOb5MiJprBXbfuw3ESTboSPq//iSOvhJ2ItUiq94Ojz6PJUtsJr8VHw2CqfPqAmf OZrsaogtvGEi03mNq1gUJ0YGsYyIDBDmBdQ6hgONDDIY4sbArWtTEC6TksV0q/k/hbSZ dN4DH3j1qpVpLaRn2OzIZfN5hfMwLA0nochxNlxzVSUP0m5ERq5oZRydAd8RDCcv863E uopg== 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=/WVVe9XAhGGApmtEugaNh5y/RoxP1ozT4m0GPXJ77nw=; b=e/VUx+xWp5aRQZYAGJzV/2Nnp5c0/KufZgh9qabopQmlpWZOspW7dJmXa/UlHv8Nc7 E9Ja6y2tuIb+vA4d+gy2VhGWIH+tj0+VxACMq9wovKZ2YG5/stoNsMBrqowkvjtHAkIR MnQPwhf3jk/7jcwXR2dlHrgW4/cuZXbSGKtYlrTpmUasSNDXwjdtiuLV0NdJE9qYxOpZ J1ARvYMybcGndMqfsbJN5aMYx1Dw9u2GmysevvX2ApLf0qNOcW3pYiLd9KPB9ZXx66XH 56ziWSFWOVp8oLqNpxv783TS7gm2qiLa2KDQ3kiZCFu50gGNhYVwNCCwEcdQzHz469MY +8Xg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=UKGB6Kw3; 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 r18-20020aa79632000000b005d866387e7asi34336000pfg.181.2023.05.03.18.32.00; Wed, 03 May 2023 18:32:13 -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=UKGB6Kw3; 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 S229601AbjEDAtE (ORCPT + 99 others); Wed, 3 May 2023 20:49:04 -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?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Daniel Lezcano Cc: kernel@collabora.com, Alexandre Mergnat , Balsam CHIHI , Chen-Yu Tsai , Alexandre Bailon , AngeloGioacchino Del Regno , =?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 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 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 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(-) -- 2.40.1