Received: by 2002:a05:7412:3210:b0:e2:908c:2ebd with SMTP id eu16csp1201278rdb; Fri, 1 Sep 2023 16:43:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXTc6deBXXskk2/epYpT34FZh/5ckKOcjdMVSA5NEDwTuaIFkczFbhCRds0lx6e3ajt2Q7 X-Received: by 2002:a05:6a00:22ce:b0:68b:dbad:7ae0 with SMTP id f14-20020a056a0022ce00b0068bdbad7ae0mr5402017pfj.21.1693611835594; Fri, 01 Sep 2023 16:43:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1693611835; cv=none; d=google.com; s=arc-20160816; b=Xe9tooHkkxFuQVCyO9S2sWMvPYiN1RnN/GnPCq50/xh1Ec7XORu3r98nE7QZz83fg8 gws1srkvwc4vGmZiV4m8ni9G1odRASwCJ5T50cFlKinmB1KNVYlxHupnBX9+JJHSpqRs dYGuD40+M13QcAhVrXR9O36qSQcks63KlEeIwajb+VDQn0v20Wz4PMks+Vh9P4UWTB98 0bmjsofx+3xswGIaAHW+/Ni9b7lOCLJkCwLtsQ/rO5oSnZ3cYz1fom0vOoGihepptGe4 DgeUqVg/JMtJK8UXCLoKZfh6lQwDyueGJRn7so4aId4c9By9ZHRH7AyEvU6hPr9CUmXM 0h3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:ui-outboundreport :references:in-reply-to:sensitivity:importance:date:subject:cc:to :from:message-id:mime-version:dkim-signature; bh=KSB7lQCHaeF8Mz8+pf6byhF3khjV6D4NIjmrfxvK5Zo=; fh=NlQvg2He0qTjyDoa4DV1dGkNfeLCJDUAJZ1zqoqpZOA=; b=XXeCz75gzMNKhLMzrG18Gu2y1TEbBhtyxWUfMXUiIaOAO/VPPHgbpmmIfK8SiLEdkm sw0y3d8QkMW34jjt9VXgRrFnvlVF2+dOEr5EU+nL2Ib0JfG1zQKgJ3zsThFdpu5njQll 1g7slhom0VM2fpuPj41G2BTdYmOw0rajzmw0RyXceT/DsxMR9fW72E1un8GANzGt1NWh FA/46KOT66yY1yTO/WLAi1WuuNQBW5Puii9+9outpR04RcEDddcGawRCjBOi0sDUN6mF xe8LdxRCh3YZ1XOMSTItmWMd6IepVALPgNqumgaLcp82n+EhLTMqdqBXX09B2VflKIcu e1/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@public-files.de header.s=s31663417 header.b=sCuHdZdm; 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=NONE sp=NONE dis=NONE) header.from=public-files.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ct19-20020a056a000f9300b0067bc790ce11si3641008pfb.161.2023.09.01.16.43.51; Fri, 01 Sep 2023 16:43:55 -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=@public-files.de header.s=s31663417 header.b=sCuHdZdm; 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=NONE sp=NONE dis=NONE) header.from=public-files.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244585AbjHaNep (ORCPT + 29 others); Thu, 31 Aug 2023 09:34:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55566 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231714AbjHaNep (ORCPT ); Thu, 31 Aug 2023 09:34:45 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1A51F1A2 for ; Thu, 31 Aug 2023 06:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=public-files.de; s=s31663417; t=1693488871; x=1694093671; i=frank-w@public-files.de; bh=HMDb6+RioAHke7j9RSJ/2v9RMCbqej1Z9hJqWh6sXGI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=sCuHdZdmaz0Bww5gYVmD69aGrl+4ULyboz9dPO4xYrTcCzS+QQF5xeYF6MZuQR4a34MHtTL S2JnbfnO3zhy7DOiyA8/wNhhsZ6TUyft5ZMavlsQIQVCdWz3VdaLw8StuefIk95zLdQ41xHWL R2TeJB+LSJA8/ONtXht4U4pFeTGabSFh8Xu1bD3AYm52Z7F6FkdyPq26cKeSxpWY5xUQuIzG/ +gP+Jft1Dv82nuWqUiLiO5qVQNdZeJ4vSrmJ1cVVykpBak2/opg9f6XZ2UJ/QqPpSJRYj6Drg 9ZrjPavY79EqmLbhyTVryOhxplSDUJN22pP0N80rCWGA83MsUkTw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from [217.61.156.102] ([217.61.156.102]) by web-mail.gmx.net (3c-app-gmx-bs12.server.lan [172.19.170.63]) (via HTTP); Thu, 31 Aug 2023 15:34:31 +0200 MIME-Version: 1.0 Message-ID: From: Frank Wunderlich 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 , Daniel Lezcano Subject: Aw: regression with 33140e668b10 thermal/drivers/mediatek: Control buffer enablement tweaks Content-Type: text/plain; charset=UTF-8 Date: Thu, 31 Aug 2023 15:34:31 +0200 Importance: normal Sensitivity: Normal In-Reply-To: References: X-UI-Message-Type: mail X-Priority: 3 X-Provags-ID: V03:K1:eP/i3AepHzHiRNAom7jECnpS1u2vDlFap7n1KSAqYjWklDExb61WSqDcQnfMEfkOwfDiY sNo+uiX2Q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GguvELXHBo/RfzVGT 53ztBt1GT4bEQycXbrQbFoig== Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2,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 Hi, looked a bit deeper into it and it looks like i only need to add the field= s in the mtk_thermal_data struct =2D-- 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_da= ta =3D { .adcpnp =3D mt7986_adcpnp, .sensor_mux_values =3D mt7986_mux_values, .version =3D MTK_THERMAL_V3, + .apmixed_buffer_ctl_reg =3D APMIXED_SYS_TS_CON1, + .apmixed_buffer_ctl_mask =3D GENMASK(31, 6) | BIT(3), + .apmixed_buffer_ctl_set =3D BIT(0), }; in my quick test the temprature can be read again and i'm near room temper= ature...i though it was a bit higher before, but as far as i understand th= e code, the values were fixed before and only made it configurable. if someone can confirm that i'm right, i can send official patch. regards Frank > Gesendet: Donnerstag, 31. August 2023 um 11:25 Uhr > Von: "Frank Wunderlich" > Hi, > > The commit 33140e668b10 "thermal/drivers/mediatek: Control buffer enable= ment tweaks" is merged between 6.3 and 6.4 and causes a regression where t= emperature cannot be read correctly at least for mt7986/Bpi-R3. > > bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp > -274000 > > after reverting the commit and fixing some build-errors in 6.5-rc7 becau= se new members used in mt8365_thermal_data too, we can read temperature on= mt7986 again. > > i guess reverting the commit is not the right way, so i ask here for a b= etter solution > > regards Frank