Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp940850rwr; Wed, 3 May 2023 08:10:04 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7oBXeFGh1r1F3gXLN7xuOFix5XRjz9BAVw9WbwpvR9tWiTCni0Ghl4HhnXuBbxZGd2lEKc X-Received: by 2002:a17:90a:348:b0:246:fbef:790e with SMTP id 8-20020a17090a034800b00246fbef790emr5778817pjf.3.1683126603816; Wed, 03 May 2023 08:10:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683126603; cv=none; d=google.com; s=arc-20160816; b=ZFkM1HN8fE+e5CCgFW01b3eF5tWvu8K9WSedsP5UgtcPOVufTWL6Ss28oISGIl4akE kQhhAqtH7CL+dVOI/sHTGGNH+GBBdJQ61B3ZQBOnFSVrzMVLqNRhIyaEYPs8hhteSHVv 8t9DKkYyGBTcE7koB/mfcq/13AoJzhib0lsTY5hZ3UYnrJb1c/9h3PVwG7IAFguyePrR 2WLoFtZH6WLbXR5EyLVpKyH8GQdOdyoakvJFrnLsdNYbCxWEk5QcwSOsO5EIKgxoGlHK tjChHZSIQY6rtvoO59wQPI7/aRLWxnEzGBW1O6u3tU9+XwgCWEm/ln/xTEo9Pthk/sau VPFg== 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=zARvg5Dk5///bgpnaatakhQgV3sEZarzdFTn7OeemsA=; b=qGPVKnKroo6/JA5450c+mnfswUicrfKZtmD+DIuYqwhHNL0om93oms6lMe/Nebck8Z eHdl7r08nE0RZWNeHv/9grmXckG9Kg3xA2Ul58GDQ5Cy3oVBXzQdUxJHJ7xzLzqhmWae qnq7UXSKIC+StZxgIAP1LjnxdVYDBneABDQUbJMPwA2vJPcb3IaaOByXnKIbTD8tuZA7 bpUZwAFvAuEV0e7wY6+lqNNlfGqRntMJIkHwGXNw2xFYvLo++hAm/IRZS6cCc4QDeVoJ Jz6fx29uy4h28v0vnsEZVMU8Rz3fr5QQ1YIOYkb57ueU1fO6eDUbiMtrVgAYy3Sd2uIW h8tA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=YWOXPhsr; 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 s206-20020a632cd7000000b0051389efe297si13968283pgs.265.2023.05.03.08.09.49; Wed, 03 May 2023 08:10:03 -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=YWOXPhsr; 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 S230348AbjECPIs (ORCPT + 99 others); Wed, 3 May 2023 11:08:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230249AbjECPIn (ORCPT ); Wed, 3 May 2023 11:08:43 -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 26EA14EEC; Wed, 3 May 2023 08:08:42 -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 B948366056CF; Wed, 3 May 2023 16:08:39 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1683126520; bh=D9N6mr2rUKOdTtGJmgSLqH/jJ7q57NmzT7mbNyHBx5Q=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=YWOXPhsrCKmDs7wUubclBOLGm5POV+Mrha43jUNH7ppJmnrU6B2UmyPdz6W1BQTHu nLk7Jfb1BvZSKqTvV+CHrtrSYiOT3JROU5yMESQYCVUST1rnTNFuBdDP77eVcggkDM IZqllyebtNtV/KBw5cQfMmnkHuGJQ+w9guOKyK3q68sGdGoIQK+b0a3xvV1j0IKx9F gG5uv3+ojTkNQrEcVWAqrvdoh/ze7sV4CgLwP0OXVDFhHArd7roYMb4RE4D7LJZR5V AlSCJL1501UzqimPnwi4hNAT38u73VmNLmXXpClFEFpNnrH/bGYGBnSRs6mW2Qp5Kr OsYp8/xZDWrCw== Message-ID: <584879fa-1541-17d0-81dd-453333230b48@collabora.com> Date: Wed, 3 May 2023 17:08:37 +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 2/3] thermal/drivers/mediatek/lvts_thermal: Honor sensors in immediate mode 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-3-nfraprado@collabora.com> From: AngeloGioacchino Del Regno In-Reply-To: <20230428195347.3832687-3-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: > Each controller can be configured to operate on immediate or filtered > mode. On filtered mode, the sensors are enabled by setting the > corresponding bits in MONCTL0, while on immediate mode, by setting > MSRCTL1. > > Previously, the code would set MSRCTL1 for all four sensors when > configured to immediate mode, but given that the controller might not > have all four sensors connected, this would cause interrupts to trigger > for non-existent sensors. Fix this by handling the MSRCTL1 register > analogously to the MONCTL0: only enable the sensors that were declared. > > Fixes: f5f633b18234 ("thermal/drivers/mediatek: Add the Low Voltage Thermal Sensor driver") > Signed-off-by: NĂ­colas F. R. A. Prado Awesome!!!!! Reviewed-by: AngeloGioacchino Del Regno