Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp31981624rwd; Fri, 7 Jul 2023 07:09:42 -0700 (PDT) X-Google-Smtp-Source: APBJJlGLU5l1+xjhWn3TiNPQ6uEp/c2abWEioBonIL2Et8b0/53exemXjbekH0rJBfmaCjQPkRx9 X-Received: by 2002:a17:90a:d18e:b0:263:ebab:a152 with SMTP id fu14-20020a17090ad18e00b00263ebaba152mr3946831pjb.19.1688738981578; Fri, 07 Jul 2023 07:09:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688738981; cv=none; d=google.com; s=arc-20160816; b=jLS64QBoaFs9Gq2DhNhL+ogJ39yTgEjcm/Od71LmcQ3hguMqNRjv5ZlJX/J7k6Xqyf 5MWtY/xEIzaBJRCeTYXKFlzHBd/9MdRKoPWkl/EZ1JsTuRB4113VHfBLAe+5qFbb25dX jnCUqWM9dRBswPndgTcfZ2ekGbHcB4/viMV6DKUDIBtbROBufd40JqPVAeW3ZPO/b4+I 5XEEJgn/q+X6pQaedvQRYfcyKUe9fAd1i2etFIwKLEJb38YsKGgCeuTHVzuGRFivIfyV PKRIRE55PnroO3Ow70Rmsh3EqOPiEthEEhZx1uretlBx0FF8PXDFm0S+ZTlbK7uki+lm 6aLQ== 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=jJTnI5bOFiXZjxSo5gJqvfLEvH8akrdBST5kBTlYRFc=; fh=AGdL4DTWv5YqGwrkp2MTO6Q0jUJQWzOlIOztiQwy2/I=; b=Z7fvIzc7GBc1DUIxQVfvjmlIvuEMrxz1Pfgk+5XJdnbrTh05YotAZvaAemUpbFHgfF UGWgkXt5Q4MUrhTsRa+EuL1PMGo0t8RL6C5i8laTJDuqlkC5gHceFt/ZAFKDf76cpM2D 4r3LV2w5/m4dFNxlNmER4JTY1QjlS7YkX/usUwHOtelMMMCA+e5MCSBasuKOi281Ssvq 5UdLT8VnP2mgsoqlGIsHjnnOX94I+kVDlJcm5CuiNiOdBxB3zxUvFxXp90lDD7JeoAYB HHqWkmXd1Mjn5PjGhjz+iU4t63CETMUAFnmI38HSMchIzqdg2b7IeFJV2WMXsnuSTccr eMOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=sJI9rAeW; 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 r6-20020a17090b050600b0025c16614fa6si2103941pjz.145.2023.07.07.07.09.28; Fri, 07 Jul 2023 07:09:41 -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=sJI9rAeW; 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 S229642AbjGGNyq (ORCPT + 99 others); Fri, 7 Jul 2023 09:54:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbjGGNyp (ORCPT ); Fri, 7 Jul 2023 09:54:45 -0400 Received: from mail-wr1-x42a.google.com (mail-wr1-x42a.google.com [IPv6:2a00:1450:4864:20::42a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A0FDE1BEE for ; Fri, 7 Jul 2023 06:54:43 -0700 (PDT) Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-31454996e06so1686593f8f.2 for ; Fri, 07 Jul 2023 06:54:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1688738082; x=1691330082; 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=jJTnI5bOFiXZjxSo5gJqvfLEvH8akrdBST5kBTlYRFc=; b=sJI9rAeW8PnR8hPPhBs1hw92d5MffHd6A8tD9J3bnyTqmrwlpJRem5yoxcmcZKdtQb fhginQmqQtbHo0VT/F2Bs3cv2U9Ik8GlIiRJKdAfqQoOy/12dsTt8yBcKw5wv7bodx2e uK6jOiozjTi4BniZM+JPjbUrmEN4pLCEMf+CWdGbKuK9qQB53tyT2uJsvSqQhbwE+Jmv vHiXGxxhUhSMwLTPs09/dQT1oXtPvikUVAE5uVh9gGGYrbVJWhIp46Q49b7Qq33wJGUa 5Htztozuv8Wg9QzEIHvx+B90napody1iuDt/GS+63Wum00RdAmUdR5zIiCmq73S3Egbs O4ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1688738082; x=1691330082; 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=jJTnI5bOFiXZjxSo5gJqvfLEvH8akrdBST5kBTlYRFc=; b=UACVRcsu1UGEGYyn4fwJNHRhCSu7stnNYmVfGH6FziBkOnwC2fXFleGgFyTK808jxg /dk929MZtBemIkICJBlROlME0JFmRJOYFksCCdhNg0v2J2jRrjlSqJ57oSNohAbQFiQT xvL6UKT1sGqxk4EwCYeG5zbS9erqTI0VeOTdhOGM/jS/bfPu4ph902CXnJUbCpQ5Udnb WE2xwneBqhQm5c76SPsHyr5oKBR4tmtFlS9+svwz8hDOp4Ikvf9FxHv1DMV/gzedSvCB 30dCb0BW7OxfL2B5gUHr0QXd0ZaEj1DOigUpvYAfm2Fp9r4yYI1ywtw/byHqLunODHol YYbg== X-Gm-Message-State: ABy/qLYXAIXodq6/X99sIsgJR0BbdIKdPiBCV6ttibfLjd5K4/czlwMk llDgZU5zZNFeKU0WkgsLjhvCew== X-Received: by 2002:adf:dd05:0:b0:314:3939:fa1c with SMTP id a5-20020adfdd05000000b003143939fa1cmr4529614wrm.8.1688738082129; Fri, 07 Jul 2023 06:54:42 -0700 (PDT) Received: from [192.168.1.172] ([93.5.22.158]) by smtp.gmail.com with ESMTPSA id e17-20020a5d4e91000000b0031433760a92sm4477755wru.115.2023.07.07.06.54.40 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Jul 2023 06:54:41 -0700 (PDT) Message-ID: Date: Fri, 7 Jul 2023 15:54:40 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v3 3/6] thermal/drivers/mediatek/lvts_thermal: Use offset threshold for IRQ Content-Language: en-US To: =?UTF-8?B?TsOtY29sYXMgRi4gUi4gQS4gUHJhZG8=?= , Daniel Lezcano Cc: Alexandre Bailon , Balsam CHIHI , AngeloGioacchino Del Regno , Chen-Yu Tsai , 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-4-nfraprado@collabora.com> From: Alexandre Mergnat In-Reply-To: <20230706153823.201943-4-nfraprado@collabora.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 06/07/2023 17:37, NĂ­colas F. R. A. Prado wrote: > There are two kinds of temperature monitoring interrupts available: > * High Offset, Low Offset > * Hot, Hot to normal, Cold > > The code currently uses the hot/h2n/cold interrupts, however in a way > that doesn't work: the cold threshold is left uninitialized, which > prevents the other thresholds from ever triggering, and the h2n > interrupt is used as the lower threshold, which prevents the hot > interrupt from triggering again after the thresholds are updated by the > thermal framework, since a hot interrupt can only trigger again after > the hot to normal interrupt has been triggered. > > But better yet than addressing those issues, is to use the high/low > offset interrupts instead. This way only two thresholds need to be > managed, which have a simpler state machine, making them a better match > to the thermal framework's high and low thresholds. Reviewed-by: Alexandre Mergnat -- Regards, Alexandre