Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp932183rdg; Fri, 11 Aug 2023 04:54:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTeBy4pX9rOTi1zY0JPVmIF8G35NFCKpEVe/5x/l1gZ6MA015iyYSi7c63JMnivKwMioJ+ X-Received: by 2002:a17:90b:3b8e:b0:268:325e:ee1a with SMTP id pc14-20020a17090b3b8e00b00268325eee1amr877130pjb.27.1691754888421; Fri, 11 Aug 2023 04:54:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691754888; cv=none; d=google.com; s=arc-20160816; b=R3rEgFqiJZ68Tc56fNyybmtPXitOECK44m0PiJ7eYUn+ZC39v/MKb7zGPBDJp8WaFp wKAaFYO/1mxcTNAMYeOb9J4D0zo2NfRCdCC/aPuAwT0QDY1XBTUoB/LY2go/NSxy5ep0 /snK+XAC5okH/Y77XE0W5VpZqckPjl85O6/dVqu7ryqeeLj0dCNpJoscs41Dx0kKU7ZB rVlWo6HJ9tpPzX/qVPq6RgJFye0AB+i/rAIWqXR4iOCIvSiJlo1/ZhI9UerPAqrv4uNG bkUEaElmto9LVK+syrVGhDm3rV5f5cwzP7N5JDhjhZxCoDOqwT8vTRE4NLtExb3JJYCu CokQ== 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=Wq6rCNtRJuWHJjaVoPantiU5p6m/bCS3GxWdOo6VotM=; fh=O8QEmFTyVzLwKy9IfuWg6p0bl9PLY8aSEV9cCjh7Jiw=; b=SUb86TZ+eU4u0x0F0q8Ts3AqdAXX8i1yRw2yq/OZnumqAv3Ojr1td5ZUu/vVng8a87 42oGrbOaohljSjgSomFAjNp5ZXTkErxhOdHtJqG7DH5w4Jmz9Na5O633cVIrClGHauJn Cj6P3MhK+ARa3exOAKkuIsKXxR3JgxWTjxi7iAYnmZ3Q24b+c6UsWSlhypXOeIi+eYmd H8zUHbpZxr/5h/ESkyyPivgFhcDy1qS9XZzO4YJIx4TXid8TT9cloqOfvp8hlbNQR9oU vahbtqhmHySMtKOdzNXiut1XMImmb7PMhovRdZJJvw61iF1qA9q9gSO81/EWPKoG9xJu VDzw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=fdbZuOBt; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p10-20020a17090a4f0a00b0026813cd5719si1045842pjh.128.2023.08.11.04.54.36; Fri, 11 Aug 2023 04:54:48 -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=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=fdbZuOBt; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234487AbjHKLBc (ORCPT + 99 others); Fri, 11 Aug 2023 07:01:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231928AbjHKLB3 (ORCPT ); Fri, 11 Aug 2023 07:01:29 -0400 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 51BCFE60 for ; Fri, 11 Aug 2023 04:01:28 -0700 (PDT) Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-31427ddd3fbso1679501f8f.0 for ; Fri, 11 Aug 2023 04:01:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691751687; x=1692356487; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=Wq6rCNtRJuWHJjaVoPantiU5p6m/bCS3GxWdOo6VotM=; b=fdbZuOBtDpR54KoDZ7bjXOJyX1+vsRS26SItSnfpB482DRIBUsLZ3mPHwyiEuQIQZM d1r5PMnDYa60o2XN4r1tFjr+x86Hv28rsRYY9orAdiJBzjDtySjZuJlmCsEFfTXBiMTr fkgcAZtBywl66q8uOAlR+6r73wLzRYzLoLlco7eIxi3Mb+7gHniBllIY/PoNX8Z71+yD j4t+NialtrbOUxN5Zw+dTzP/Bhq41FgY+LUotEyAqGCc6Gb1P843EkVyPrEqMo1P5061 n8YgSLlsEANtlasIV+/H7vVpnPwQsBSUKZjh162bYI5CJURFG0eMi4zFhyF9PygEqE+R ow2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691751687; x=1692356487; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=Wq6rCNtRJuWHJjaVoPantiU5p6m/bCS3GxWdOo6VotM=; b=lUdFjGurtgP1QPfjSp1VS3T3W89vT8H5b7ugdFZWHO0Y1G6Nhl6nic1/ncWI+oTBPw cyp/bacD5yBy+6ayySVS822isvrgN81NzAlC1MXcoTWLwI8rLvmNLi6tnJt3R3yx1eh3 q2huzk9DbXV+vAMmNSZkV1fqnvAkHi01o1ZobAScTAP+KcSQbVBxv4gYI5YMvaf79kf2 y9r+5N+7TOqa85oK3wXqHQXDKWA6NDhsXryLjUzg30tNgct9iEyBfYFt09PNUxvPz05s G7GpN4tFWa//NyfVK91KatE7SfbaHZG9Xzplz2EL8tiaUlQxhsxXINBBektCL/XMnbsV Hz9w== X-Gm-Message-State: AOJu0YwgvnZ54FPn9BE1GBnRdj5I6p/vYNZKX0fQVhPz3fvQ0iyuifg4 dtZug0gzxKIIkVhiMtkC2gDgSw== X-Received: by 2002:a05:6000:100d:b0:314:475:bc47 with SMTP id a13-20020a056000100d00b003140475bc47mr1031035wrx.69.1691751686187; Fri, 11 Aug 2023 04:01:26 -0700 (PDT) Received: from [192.168.3.194] ([89.226.188.33]) by smtp.gmail.com with ESMTPSA id d2-20020a5d6dc2000000b00317f70240afsm5063042wrz.27.2023.08.11.04.01.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Aug 2023 04:01:25 -0700 (PDT) Message-ID: <9db9f842-fcbe-77e0-4b7f-0f5c26a1db51@baylibre.com> Date: Fri, 11 Aug 2023 13:01:24 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v2] thermal/drivers/mediatek/lvts_thermal: Make readings valid in filtered mode Content-Language: en-US To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Daniel Lezcano Cc: kernel@collabora.com, AngeloGioacchino Del Regno , Chen-Yu Tsai , =?UTF-8?Q?Bernhard_Rosenkr=c3=a4nzer?= , Amit Kucheria , Balsam CHIHI , Matthias Brugger , "Rafael J. Wysocki" , Yangtao Li , Zhang Rui , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-pm@vger.kernel.org References: <20230713154743.611870-1-nfraprado@collabora.com> From: Alexandre Mergnat In-Reply-To: <20230713154743.611870-1-nfraprado@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS 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 Reviewed-by: Alexandre Mergnat On 13/07/2023 17:42, NĂ­colas F. R. A. Prado wrote: > Currently, when a controller is configured to use filtered mode, thermal > readings are valid only about 30% of the time. > > Upon testing, it was noticed that lowering any of the interval settings > resulted in an improved rate of valid data. The same was observed when > decreasing the number of samples for each sensor (which also results in > quicker measurements). > > Retrying the read with a timeout longer than the time it takes to > resample (about 344us with these settings and 4 sensors) also improves > the rate. > > Lower all timing settings to the minimum, configure the filtering to > single sample, and poll the measurement register for at least one period > to improve the data validity on filtered mode. With these changes in > place, out of 100000 reads, a single one failed, ie 99.999% of the data > was valid. -- Regards, Alexandre