Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2869902rdb; Tue, 12 Sep 2023 15:02:34 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEt7J7TUnGnzZOKidLP6E5xIfBCPoGr9ETnwoiITYUhErvEnBb4lCjaNM067SHbY0nMn9F5 X-Received: by 2002:a05:6a20:8f11:b0:14e:2c56:7b02 with SMTP id b17-20020a056a208f1100b0014e2c567b02mr694419pzk.0.1694556154435; Tue, 12 Sep 2023 15:02:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694556154; cv=none; d=google.com; s=arc-20160816; b=YhSEvB41lnodyIuoYjP6h9eJPIcyw6/agX9IxyavkyIJdp0HfGVcfwa5nMfcsf5H6P lz6lvJ8nhCDzeOq5Jo442M3TWEPnzX2NKmRB0mUznn4FW5sfzv44vB+vSiZiOFUlCd/G 8tOWtuVZYH7uXEvXBGX+Qj8l9yTivBUlLUaGjOFnx6Usdxm1OsFZhn3OSJHQ7OUdKgSF 9IESLzhNfDuTiongzCy1TrF+h4EnbF9EaEuL3H5N24J3BxTZSyVMVqgkroM4dMnpdRKM w4MSEAeXt+5QLETdwYmlnkN51ZWZj4iLxe5k9rh6geCLGKmKBkZ5gghapW6tEh6dC/VJ VMYg== 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-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=jepfeoNOxEjzjxCx4a1HfCNQ7Fn9JfA8nF0tCrt92S8=; fh=j9kVjHnde59JpmwoIy3D5QhqNkUv77m4BrRcSxYW2IY=; b=xxTSAKLNvryPJ3McJxUIa0s1TW3I+obFq87XbqxWLvp/kUQm0Q2e+ETeCE1t2oTCDt nXOiouYV5v/CcYWB5XUOdN4SkBJyQVqxrd3ALf0sC8lUFbaEl9rUUocw6Nkk+sowWgP8 XjdmEPISpF82MJbyWzOjpjHyMXIvnbXzc2yeQGqdlzDmnsBSnE13QfAjDBD0T+VJb3Ig iCJPWttuYmPfsyKGanoD87340XXbgfSPvbM74l+wERz65JKulQbgrCa4Rd5s57+TmRI7 UpXFFLiTi9FBDeYuj/PQ3SSLJwvRXmzH8+e/KoMy+TB8Nu/tK7O5uPw6eUuGtOOHy5e7 mdSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=gCwKRJEs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id u15-20020a63b54f000000b00577448019b5si6511678pgo.276.2023.09.12.15.02.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 15:02:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=gCwKRJEs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id AA3DC8411D53; Tue, 12 Sep 2023 06:46:26 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235526AbjILNq0 (ORCPT + 99 others); Tue, 12 Sep 2023 09:46:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233774AbjILNqZ (ORCPT ); Tue, 12 Sep 2023 09:46:25 -0400 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [IPv6:2a00:1450:4864:20::630]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 11E8F10CE for ; Tue, 12 Sep 2023 06:46:21 -0700 (PDT) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-9936b3d0286so743067466b.0 for ; Tue, 12 Sep 2023 06:46:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1694526379; x=1695131179; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=jepfeoNOxEjzjxCx4a1HfCNQ7Fn9JfA8nF0tCrt92S8=; b=gCwKRJEs3M6OPni0CtceBrE9cCicBCuAoOPAnhP8HWgw2Wsn3kijbjlaZAv9hjS3g6 sKmy5Sao1zO9hF9wXZ8Bnm+V/9ozMrGTYgP0JldZDbzUQgC1/CZDzoZJCskTl+SfGMlo QGu81p6rj9hvd0rEJ4EKcjsJprgcnFMWH/05hJx1eD3fuiKJ1qSo46vNkenbw5QyIkGa 1kdZFCbN8OpPPQPkG29JZd7TNS3U241YzwiiemwE85mCBQ7ZaffFnyUvHJeRfiz+mCIf 8QyLtJqXHm0pasVIlzzvwyU1WeTBGCMuTnxiMOyOhUUFgqupHFtPsikQ6qxGiI66OZMK Ku2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694526379; x=1695131179; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=jepfeoNOxEjzjxCx4a1HfCNQ7Fn9JfA8nF0tCrt92S8=; b=EtEKZroNvT6UbSpRC7y3VlNE8kwd2sFO2/NjGhDe6iyFkWOJDT1RZYxOOPJFQIM1s5 YklGgC0jX96FiysnaJ7uKP1aRmRaZxdlNmaoiQsu85bLvcA9JrQqTj27EwMN8vjEWHS9 D4XKhHHOYx+EfUyoz6OFKxeqW4WlEFZUpK5XEZP3JWT6fVvHN1CT0tHFHS1UKhPrh2Re NP74wAiuta/EoyiE4Gl3k1jyUJYMFd3C2gsny+UaWtJdYvUGHHq7Fk/U/6I1EN2+7bea 8vaxv2hvc7LmcxnqHEcbDU2O5TjXuDWntzwYRTcnU9q4CaNTldaWegOcaxqdbuNb0A8f EhhA== X-Gm-Message-State: AOJu0Yx4mwtWlSImGc1/LMsZq+xFN/wM7hl/0erKleCubKmJfkrTSSex 37uYZ7ZIYcEqYDe6gGztWpbxfA== X-Received: by 2002:a17:907:762d:b0:9a1:ec3d:9004 with SMTP id jy13-20020a170907762d00b009a1ec3d9004mr11419584ejc.9.1694526379364; Tue, 12 Sep 2023 06:46:19 -0700 (PDT) Received: from blmsp ([2001:4091:a246:82a0:6611:d59a:8ba3:9a66]) by smtp.gmail.com with ESMTPSA id n12-20020a170906118c00b009a5f1d15642sm6868756eja.158.2023.09.12.06.46.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 06:46:18 -0700 (PDT) Date: Tue, 12 Sep 2023 15:46:17 +0200 From: Markus Schneider-Pargmann To: Daniel Lezcano Cc: Frank Wunderlich , Fabien Parent , Amjad Ouled-Ameur , Daniel Golle , linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, Alex Riabchenko , AngeloGioacchino Del Regno , Matthias Brugger Subject: Re: regression with 33140e668b10 thermal/drivers/mediatek: Control buffer enablement tweaks Message-ID: <20230912134617.jwonuolt56nofifz@blmsp> References: <07a569b9-e691-64ea-dd65-3b49842af33d@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <07a569b9-e691-64ea-dd65-3b49842af33d@linaro.org> 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 (howler.vger.email [0.0.0.0]); Tue, 12 Sep 2023 06:46:26 -0700 (PDT) Hi Frank and Daniel, On Tue, Sep 12, 2023 at 02:57:45PM +0200, Daniel Lezcano wrote: > > 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. Sorry for the delay, this was in my inbox but somehow not on my todo list. The patch looks correct. I think I simply missed adding the fields for MTK_THERMAL_V3 chips. Sorry! > > 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 ? Yes, it indeed looks like I broke another condition there. I will give it another close look and send a fix. Best, Markus