Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2666791rdb; Tue, 12 Sep 2023 08:36:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEL/4PRHuPr4XDkF3HTXALMmx/UNCqTWgI98OmJdtWBE/frtEd5EUEC4Q1l1b2IZQ6fjCKd X-Received: by 2002:a17:90a:d787:b0:26d:1a49:d1e9 with SMTP id z7-20020a17090ad78700b0026d1a49d1e9mr10471843pju.17.1694532971607; Tue, 12 Sep 2023 08:36:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694532971; cv=none; d=google.com; s=arc-20160816; b=ws0/a4OboB12OSlBY5yo9SeOrh08luNTomAnEpJh6j06QOwf0+NvuD9cVpsYXXxQ3S zpPjvG7ylSUmBD/Wa3m0QzxyR6THEWdMx7m389dWcgsvklymRg//MO9SjPAdLC0HxDpf 1oLdKYsNpT0X4WeA5ATVN6oT6XGfwBJHevMeBrBP39LPU12b4F1Kj9q1m+GXgh08p78D m0dY2ytKScPG8p3jKCvTp/OWrDstQC2jcueRGWCLN1NNmVpNjB1dcTvMpOdB5jC5uRlO hDzeiY1lB/H10kRPIlJnGvOJJ6SYfAhhn6IoxgzNkQVc/uD7x8rrcrP6BNcZHCz4TIhB miwA== 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=kYU91k+Yt4At9Ky8Zo4xbD1ZbiophgceK/i0wy1hkcE=; fh=fEu3LQh54JSFYnJxHn8z24orYFKy+rUjUkHQQaUWIAk=; b=u+Tl3DHY9Pw+Vw9xZ94vEJEzB5Zj75/g9W7J5j9YisFRPjYDwp5j4tXchkWaxWn4PQ NjXiLoloY+w+T9y93BYjYQEtlHCT8kSyE6AXmu+WzYywxDpAK+xoz37C8lzm08sRqU9V 3Wgschj2tr/88+zsKP1ySelHOCtfqTTEr4/deqHKKpi5jQonWqlMW1EUDZoO1SpvQI7L I7p73jTajXsL/t7mfwwZe4+tqFuqKEOHgHY4hPHJvbYH6f+Hy4RvxB+NJXcrRE3qmGqO g0pFyEZ1y/Fiqw1lT9U63h3rT7FDopAjxkEvlx7ifSs0u3M4cKXtDwUkxLVLROb28Fio hcJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oM1KeU9A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id a13-20020a17090a8c0d00b0026b49dac834si8228677pjo.34.2023.09.12.08.36.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 08:36:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=oM1KeU9A; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 73EE880B5A15; Tue, 12 Sep 2023 05:58:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231830AbjILM6D (ORCPT + 99 others); Tue, 12 Sep 2023 08:58:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232646AbjILM6B (ORCPT ); Tue, 12 Sep 2023 08:58:01 -0400 Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8160C10D7 for ; Tue, 12 Sep 2023 05:57:48 -0700 (PDT) Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-401da71b83cso63553085e9.2 for ; Tue, 12 Sep 2023 05:57:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1694523467; x=1695128267; darn=vger.kernel.org; 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=kYU91k+Yt4At9Ky8Zo4xbD1ZbiophgceK/i0wy1hkcE=; b=oM1KeU9A9owCdaEte5TrhrLoFDn8eEZ7XFqowsD1+jCBHoOR4z2wGxC/KpgAQPYi4F JMUOa4Ys8L8NG4x7V6VGDDZMbLlYOTehcXJwokQtMG/1o10di+7wYCjXSp5KooITV8+b EOeja1DO9pwCsWmHCwv6+xyFklVDt9mosle/sfwmr/ste2tne5lCftxDt0o0dFQMzY7H LQpF6UkaPkQn5XtZFVaQQtdHoUURRZV83DQPmS4CVmzM0s60Rpjqgz6I7lDchF7LS5Ul Y9j4CWWs39wTaP/ACWSHx+aHJr6U3PYJ5kPU0ZnQQGRkXW0UQbQRnuwaBWOr+Y4+JEs4 BGNw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694523467; x=1695128267; 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=kYU91k+Yt4At9Ky8Zo4xbD1ZbiophgceK/i0wy1hkcE=; b=K2a1eGbVGID4BugJ9Jpdgvdqshzs8mj40JRtbeN2t8IR3FoEFxAuB88fdp5w/mDAWC 9yXyEXMlqTczYI/tko9AcnyllxJKq2wVItvLlsumFB5Gh4oo1Y8l31u0LPQleH9+1G4j yrzmny3ZLOL0qrQ6C3WTJJOWo1gqC19lXcN0R54kQUMPy1gZczKLaToMOCAPzjA9dilh uEdHwIfhz1tsy8zwNuHJm1AnOr2r+9vEyB5Yc9cThtpkXRX4FULt7oCldGOHPSJVd7gM 03X7Kfo9JEX0pLodX6sC24hQqieAF5X197K2tY16b9T32AYnJV4imwR7xdZEHQlEnVTZ rWzg== X-Gm-Message-State: AOJu0YwV208GO/lEzYFAnZ2TCmUzxII9mNbvLiObbif+/4DWmJe0lKYB PgzkES2gKPBDgrmaaM4oVyEqkw== X-Received: by 2002:a05:600c:228f:b0:401:d803:6246 with SMTP id 15-20020a05600c228f00b00401d8036246mr11053444wmf.2.1694523466766; Tue, 12 Sep 2023 05:57:46 -0700 (PDT) Received: from ?IPV6:2a05:6e02:1041:c10:6333:6696:6b64:4890? ([2a05:6e02:1041:c10:6333:6696:6b64:4890]) by smtp.googlemail.com with ESMTPSA id t15-20020a7bc3cf000000b00402be2666bcsm16205152wmj.6.2023.09.12.05.57.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 12 Sep 2023 05:57:46 -0700 (PDT) Message-ID: <07a569b9-e691-64ea-dd65-3b49842af33d@linaro.org> Date: Tue, 12 Sep 2023 14:57:45 +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: Aw: regression with 33140e668b10 thermal/drivers/mediatek: Control buffer enablement tweaks Content-Language: en-US To: Frank Wunderlich Cc: Markus Schneider-Pargmann , Fabien Parent , Amjad Ouled-Ameur , Daniel Golle , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Alex Riabchenko , AngeloGioacchino Del Regno , Matthias Brugger References: From: Daniel Lezcano In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 12 Sep 2023 05:58:06 -0700 (PDT) X-Spam-Status: No, score=-2.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Hi Frank, thanks for reporting and investigating the issue. On 31/08/2023 15:34, Frank Wunderlich wrote: > Hi, > > looked a bit deeper into it and it looks like i only need to add the fields in the mtk_thermal_data struct > > --- a/drivers/thermal/mediatek/auxadc_thermal.c > +++ b/drivers/thermal/mediatek/auxadc_thermal.c > @@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7986_thermal_data = { > .adcpnp = mt7986_adcpnp, > .sensor_mux_values = mt7986_mux_values, > .version = MTK_THERMAL_V3, > + .apmixed_buffer_ctl_reg = APMIXED_SYS_TS_CON1, > + .apmixed_buffer_ctl_mask = GENMASK(31, 6) | BIT(3), > + .apmixed_buffer_ctl_set = BIT(0), > }; > > in my quick test the temprature can be read again and i'm near room temperature...i though it was a bit higher before, but as far as i understand the code, the values were fixed before and only made it configurable. > > if someone can confirm that i'm right, i can send official patch. At the first glance, it seems the proposed change is correct and could be proposed as a hot fix. However, the conditions with the version and the apmixed_buffer_ctl_reg looks a bit fuzzy. Markus, can you revisit this part of code and consolidate the configurable approach ? -- Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog