Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp689421rdg; Thu, 10 Aug 2023 16:53:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEVL2gwctW7gcQdCERAfMnzO4G3RBatthixDjPJRPh0k3vu2pT0wTgQmbWaq36lpKlzAUEw X-Received: by 2002:a17:90a:9ee:b0:267:c21f:ce0d with SMTP id 101-20020a17090a09ee00b00267c21fce0dmr72801pjo.27.1691711615509; Thu, 10 Aug 2023 16:53:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691711615; cv=none; d=google.com; s=arc-20160816; b=0J7B+CuEMCOigRKlkeCOnVWTxrS3Qg+qnVIiBC3AtCQIW5OAT7Kqvs/wbTktL4rJlU klK3f5C3Rdx2V/QiA7hT2diBD/uKl10m/NKCUS7dYEPIp2rZFyoLMFls50NvxpQxY/Ti olwt41q8/lY01g06SoZrerJW/nGP/FmOOV7yK6RtiS209nRIYT9O8SFSgq7DYE80ikJ1 9TLu0tw/5UaEmIYCeTC1BkLviJiXLC7pM0yzqfRz57H3JmykVGDm2rVvxDOnq9jKT0ao CxufT4k0wiXfv5hqt3nzFY1vO5D4BFmPQvY8rjM9hgx6JZTz2wzd/PgQt2uJFjxr58o2 cKAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=5APYFm2DOcUlHFwZTgKZHuYxuZ9KVmW8+AsBSuN6Ix8=; fh=v8whvzQ/UocrmOtueBCWgQs4P5PsUBMD3A7NJzgLkG8=; b=O79jxfT5aSQVqdipUgaOINH3/2QQWASdDLsgcFmqA+/1gUoeYyZh7oUt5jWpjk4WOe XRBUpTW9ceQII6HvNU75s4rHZCld6AsFtO8hWnYTJYsSLIgp2oOa6+SOfcm+BQejrmTX mvLc0UnOZF0sAi0+dcXHdCWfoa9bf6MiWEF1h/JkdIL70sZbLPQVjCutKHYvoXBcWQR1 Z3owBe7ScdXzubLyhDYsBLalTz8c2IVe3jrHYqiEGdVTh0ijZhXgx22SdCXZV0hvnbEB BKOaFTag2H5J5sfekCsBQS2ligV9vpcpN6Ek8wNlkfQYiHBdAR1IMtZvj/FwZnPjLt0w cjYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=aaptVNrq; 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 f7-20020a17090ace0700b0024769a264fcsi4455128pju.10.2023.08.10.16.53.23; Thu, 10 Aug 2023 16:53:35 -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=aaptVNrq; 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 S230153AbjHJWva (ORCPT + 99 others); Thu, 10 Aug 2023 18:51:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229619AbjHJWv3 (ORCPT ); Thu, 10 Aug 2023 18:51:29 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [46.235.227.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1345E2710; Thu, 10 Aug 2023 15:51:29 -0700 (PDT) Received: from notapiano (zone.collabora.co.uk [167.235.23.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) 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 99EE76607234; Thu, 10 Aug 2023 23:51:25 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1691707887; bh=xX2TKwjWSum0DXCFhBKwo7grgh23hCvtVCMmYEmXmyw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=aaptVNrqp7UANGPO7f3GoJzbdNmTkraXOTFZUZJlCr4/2zgcZ5XRb+eKUlTHOyWhu ommN4v9BOQpsZdevBR+wrXFpl55W0N1j7CT2+L6O6aCc9WF3b7mInL5Twq3CdmgygA 7z/p5IVJZZf77Pjzo9U73oaY4I2tVHkQFmuoOBF7fa9j7c/fxgEIHuVKZy6H5OcumY 3m3R1mooQIma/H67JokJIro8o45Tjt9fucg3tuUTksrr0pn7DZqjKqlMSguaT1uDQv PTDaVlWJFxc9W+OLm8PeU1/xksR3A4hiDR3MQH0nBLd4Et63YndN4Kq1VgN3qNrh4M ujNWWDWwuGz8g== Date: Thu, 10 Aug 2023 18:51:22 -0400 From: =?utf-8?B?TsOtY29sYXMgRi4gUi4gQS4=?= Prado To: Daniel Lezcano Cc: kernel@collabora.com, AngeloGioacchino Del Regno , Chen-Yu Tsai , Bernhard =?utf-8?Q?Rosenkr=C3=A4nzer?= , Alexandre Mergnat , 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 Subject: Re: [PATCH v2] thermal/drivers/mediatek/lvts_thermal: Make readings valid in filtered mode Message-ID: <8117521e-efb8-46dc-9db1-d521a01af0bc@notapiano> References: <20230713154743.611870-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230713154743.611870-1-nfraprado@collabora.com> 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 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 On Thu, Jul 13, 2023 at 11:42:37AM -0400, 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. > > Reviewed-by: Chen-Yu Tsai > Tested-by: Chen-Yu Tsai > Signed-off-by: N?colas F. R. A. Prado Hi Daniel, gentle ping on this patch. Thanks, N?colas