Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp956733rwr; Wed, 3 May 2023 08:20:53 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6rNYiBRDVYc+OZNzJ0Xv8UlFztPLMEcH1JzKXvT3D19QAYiT/poKSsRByETTqgASzonP19 X-Received: by 2002:a05:6a20:7f8c:b0:fb:b949:5bbf with SMTP id d12-20020a056a207f8c00b000fbb9495bbfmr7913934pzj.2.1683127252637; Wed, 03 May 2023 08:20:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683127252; cv=none; d=google.com; s=arc-20160816; b=X0znqxLRBwemZoobtXRVAD65kBsJWNmCNiSje24BWxA3aJq0lQnSFt89RNzMi+WpkH iFvVjgJmPShg0XaeVCrzIC9AaqL5TmYaCbeCYiXxbcAu2a6l1TR01+ndzTLf2KwQN+hC eFm8fq94gN/G7YcYaU6H8qZSYE4GOQwuKHI+I6ZEsFgiIZs/4ejKEyqG/aIpVkcMBCdU u4dwQMlNBTBw406ACNwfDB5ddzNHwOelZAw5VqWp9y14dEOQQxTO+uD8RxmIwtxrN7DE SRLfPMYpE4hCT4FiHfOLrkmWboJYJY7tHSnXUsHusIc4osCbSAl+He+4in/Yz2FVVUoV f20w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=N8/QoWM7wYnMdW+YSXL8D33vo0cMgL6Xf9YtdcSjrZ4=; b=p8qO1xaAorI3SY4qzYOz2g8xZO27WBUUCF3ZFRSHJLXRRoeCSpso8zSaGg/is3dSuq LxW6RGEWwSmV8O6CsBvRHzApW4m2SqrIYYtAoECXClr2s8elR0zfEG7dNN+ev9idEn0e sODlIl5VWh0RTO0Zng93j0GGwVSqwajGyVa3dHj1tgmxS1A0kMFcEt69YduF5hsGk0pW I9OzR5fQLdBN7L7L64oHJ/p72N+u9ZxAedEfchyc8/7Jo8j7t1luPtxKqaKCG/2iUbK8 6q7nLs4aK/cu8FNi8jKP2NwSHC7heRsraB9fLM31hVERJhzJ7Mud0x1Y1fP/c0Qk7YHk MsVw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=FE71iUqc; 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 j7-20020a654287000000b0050e7254402esi32267628pgp.208.2023.05.03.08.20.36; Wed, 03 May 2023 08:20:52 -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=FE71iUqc; 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 S230379AbjECPMV (ORCPT + 99 others); Wed, 3 May 2023 11:12:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbjECPMT (ORCPT ); Wed, 3 May 2023 11:12:19 -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 2E2004ED2; Wed, 3 May 2023 08:12:18 -0700 (PDT) Received: from [IPV6:2001:b07:2ed:14ed:c5f8:7372:f042:90a2] (unknown [IPv6:2001:b07:2ed:14ed:c5f8:7372:f042:90a2]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 10AF4660309E; Wed, 3 May 2023 16:12:16 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1683126736; bh=Pi/CSe8nv/Bn/w1ZOAaw3WYXTtUFhF9Hq3jb//Y3+2U=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=FE71iUqcb1QFWFNA3otCiAMTpY/p5HvHJZrIf1+KOPqWzSPysuJcEN/+3wOP6ZXBQ hvFf/rkkglQMiiyriKdGxXdMVay7nx/w/N9KfAIMNP0/dPqy8uLa3xULtj7FKNOK7l cjkBSoUog29I+Xt6nN4OXr4I3rkww6T5sRJUd2TWLikIQmW/idr0ACHqHStKr6bIFT 8xatKmjYGMwaQKwNetILI36FgRXr79+8dLdTbuhk6exLPzrkQU+JrO2C99WCE09x7m Hq0W8m8IvfqXd8NST9C1NXegeNQqxTCdcjkD3MaYi5B6HopXdX+dD0oJ53+yBgaAfH ziUv1iE+pN5mA== Message-ID: <43be865c-c870-f61a-9837-e189d6e4ae00@collabora.com> Date: Wed, 3 May 2023 17:12:13 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: [PATCH 3/3] thermal/drivers/mediatek/lvts_thermal: Disable undesired interrupts Content-Language: en-US To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Daniel Lezcano Cc: Alexandre Bailon , kernel@collabora.com, Chen-Yu Tsai , Balsam CHIHI , Alexandre Mergnat , 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 References: <20230428195347.3832687-1-nfraprado@collabora.com> <20230428195347.3832687-4-nfraprado@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: <20230428195347.3832687-4-nfraprado@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,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 Il 28/04/23 21:53, NĂ­colas F. R. A. Prado ha scritto: > Out of the many interrupts supported by the hardware, the only ones of > interest to the driver currently are: > * The temperature went over the hot threshold, for any of the sensors > * The temperature went over the hot to normal threshold, for any of the > sensors > * The temperature went over the stage3 threshold > > These are the only thresholds configured by the driver through the > HTHRE, H2NTHRE, and PROTTC registers, respectively. > > The current interrupt mask in LVTS_MONINT_CONF, enables many more > interrupts, including offset detection and data ready on sensors for > both filtered and immediate mode. These are not only not handled by the > driver, but they are also triggered too often, causing unneeded > overhead. Disable these unnecessary interrupts. > > The meaning of each bit can be seen in the comment describing > LVTS_MONINTST in the IRQ handler. > > Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver") > Signed-off-by: NĂ­colas F. R. A. Prado Reviewed-by: AngeloGioacchino Del Regno