Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31601572rwd; Fri, 7 Jul 2023 01:32:37 -0700 (PDT) X-Google-Smtp-Source: APBJJlEE13uTr40BMTNvSLHxGBfs81GsM6w4azAdz+hUGbie6E/8Z59mOxeAYC4UB0JwL/nr87hD X-Received: by 2002:a05:6a00:24d5:b0:682:bd6e:b16a with SMTP id d21-20020a056a0024d500b00682bd6eb16amr3612105pfv.14.1688718756882; Fri, 07 Jul 2023 01:32:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688718756; cv=none; d=google.com; s=arc-20160816; b=hoyNDAoTcHyjesvpAD0GObqmQzgmGqDlSPZ18RtYrg4j6UleYHecBN9mQJ5xNesMI7 3LWQTLOd/FO1442OB/VPMBb5/7pBg4Q5JF6ipmbieHPrD7wnUyeRu99mbJhovlyLobA5 w64FWO3ReCkdx2U7GbssUTO0z7+6kvgNkkIPw446K1xI5xKU0dWu/k2eKTCt6de+YI6e y6RYB8YUb9EASIpLBeFs+3KPAVqBmpt8BMg6FJfBdVeab55D0s+NUb+o2EZfCcjcMg6f jYED0S4qcn3n3bLuhQLtxv+e1mgJU9y8wOydxHw1NuOMFSwLxtrcN8ODKM7i8sWxZmZc dKiw== 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=BxdQubIUeWfH6Nizi8N9SaSpFsy+/ceYV/So6je/wkM=; fh=xAWR+5k0pkt4/Cq6oULKgeysibGw2L9+kK/sYYXY2Co=; b=Uj8Brdufbjqhpj03QVCjIBirytianhw3wSA5VYR0vLp0FHuo4bDTde+uyRtahfrQ26 OQb0D3tGB3HOqtfyMztJ2CVnAZDYnzcxMhbhJfTK7moSdn+R4YMaHMFEu6R4s36PtSl9 m7LVROihvQkpgf32GLbQ3fZOk7EdeITeW30bf9BegI+ypEG7YFYyNTHTv5uop1gRKzLU k/rP8tSpANzWmBcTZ4pK3b9cGIdscC75pxIo6exNQNoZcovC5wsG46IY2kI2tSPbTIFk Uf3RxFFdO3C5nE4ERQxwomzIruJHQPv3b9JKHV2H66kE6DTVjufbJpoda4ve3f+FkQLx dcBA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=FphWqH25; 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 c37-20020a634e25000000b005340840c0c8si3350383pgb.327.2023.07.07.01.32.24; Fri, 07 Jul 2023 01:32:36 -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=FphWqH25; 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 S232917AbjGGIWP (ORCPT + 99 others); Fri, 7 Jul 2023 04:22:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232233AbjGGIWK (ORCPT ); Fri, 7 Jul 2023 04:22:10 -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 B49F21FF1; Fri, 7 Jul 2023 01:21:51 -0700 (PDT) Received: from [192.168.1.100] (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (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 BF36F6606FD3; Fri, 7 Jul 2023 09:21:49 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1688718110; bh=E41kLsUu9KWKlC5LC4u8U6BQ7Fu/d8kPchT+f2mdTcg=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=FphWqH25Mc2WAJGfSzoYhws3XtSXrrcmI2pHqjVdOciw9Q1lrmq7BtzX/okmNbqV/ RRvvEkttjgWIosiuI8KMP3s+8SSqAJy0CcNJSCda9+3DfnZEnqf8cCnC4opRbTIqT4 14Nd0cvEJrL7nSRHk/xNSqQfSM3PupT5YI5Wb9iyX13fTWPZ29MYH5VCdHoB0GEzzT 33/rT1ctI83dpr9WNOaWhhOS+LwOSAEZx5X60GacxGRrkl9kWulWAgF0ctVkpQ0SMz SFLdzQZd5pmsFxXsKQcd2odFmbQTZdwuw108WHskDzsHIhwIzjwFPi7ljALspfyGEb TAmgsUiyR0DQQ== Message-ID: <98580052-492e-5360-fcae-f5a5f8a3da73@collabora.com> Date: Fri, 7 Jul 2023 10:21:47 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 Subject: Re: [PATCH v3 4/6] thermal/drivers/mediatek/lvts_thermal: Disable undesired interrupts Content-Language: en-US To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Daniel Lezcano Cc: Alexandre Bailon , Balsam CHIHI , Chen-Yu Tsai , Alexandre Mergnat , kernel@collabora.com, 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: <20230706153823.201943-1-nfraprado@collabora.com> <20230706153823.201943-5-nfraprado@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: <20230706153823.201943-5-nfraprado@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 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 06/07/23 17:37, 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 high offset threshold, for any of the > sensors > * The temperature went below the low offset threshold, for any of the > sensors > * The temperature went over the stage3 threshold > > These are the only thresholds configured by the driver through the > OFFSETH, OFFSETL, and PROTTC registers, respectively. > > The current interrupt mask in LVTS_MONINT_CONF, enables many more > interrupts, including 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