Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp572251pxb; Wed, 24 Feb 2021 09:15:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxDDYninASiW0S3zrHdUk6nJbU6uHguj24oQ6BB32U7ZMtMgL3iuDU+x2Cd2aa80DQR6Grp X-Received: by 2002:a17:906:4e95:: with SMTP id v21mr6914421eju.112.1614186940855; Wed, 24 Feb 2021 09:15:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614186940; cv=none; d=google.com; s=arc-20160816; b=f3zAQKRzlGqcNt7KobxtkiAojcLCsAhLAgQjU+lBmoP7/i6TY7h9JjFV0jALlcquXq MAblgKdWVMO2VoK3qHM7/36np1OEIL5RHxM3em1MUr/g1BXTEup22FZSZu1E4uwdPVy6 6U7+4tKoo1yAJSq3M6KYTlcL2vVmOmuZALn5DchfIbC6ZTWTDWTIYxQ2bTJfUBkfqqUD TRw+2ttCXEJVHv8kK6LpCejPT/FDxR0tbtl84yFEk6m21OJdYldOZBxiqGh8HeHfeXFF spxPpDUznuc4pRSPOcGtJqAwuDu9d7B2xpN17ivdOUjtxr6dtfDGVUxIPDlliHVqnln/ pWRg== 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=miL1G96DLlMS5QA+pTrA9NtlqcqBwLFfkCCcFZY5vqs=; b=QoNIYn9r9RsN6lcI4YMAS7QKqGg9C0ZYUrrhc3J6+9WTVGpXFiKZDDoObX241Z+/oL hueMOlezQ7FSgt2s0IhccLT0HTviMkVu3SrA5KLZSLOGu/Dg6qsTdEu5X9gKyv4E8Q2i IZbw9BdtZGgbMqKm5qwRAigWTyUwnLc2GGbHKHH7KbZygeGP5USy9XUgNcbsyzVh3MGE M9jhrJprjRWQa1a9SoTKOeyKpegiD2tkk9/jqIgQ6tfAxkDCVsaOOv5/Fem5dkXHi1VT UYwL5y3xUNZhXbhlCFs5uj6zPBwBpPbzjQ4cVV/OIJ4kuw4KDyxd/dlzv6E1SWI0rsXv ifKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nX12R12O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m16si1462219edd.406.2021.02.24.09.15.18; Wed, 24 Feb 2021 09:15:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=nX12R12O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231439AbhBXRND (ORCPT + 99 others); Wed, 24 Feb 2021 12:13:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229993AbhBXRM5 (ORCPT ); Wed, 24 Feb 2021 12:12:57 -0500 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1B4EC061574 for ; Wed, 24 Feb 2021 09:12:16 -0800 (PST) Received: by mail-pf1-x42b.google.com with SMTP id z5so1750555pfe.3 for ; Wed, 24 Feb 2021 09:12:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=miL1G96DLlMS5QA+pTrA9NtlqcqBwLFfkCCcFZY5vqs=; b=nX12R12OGc/BV5IKrHJEZsqW/kYe3QDsGgyLcPHydyI/28eWbx3f0HGgTllZg36iAm XU5x4JI6XOghYs9UdNYT95rR0EfP+ehIyyOO5CiQzZbxbm+2rZlCGuYCCsC/VYFDXSS8 zQaEh3fMLmILGFYGQk5iO2Rz0bfKWhcelMmew= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=miL1G96DLlMS5QA+pTrA9NtlqcqBwLFfkCCcFZY5vqs=; b=T211Wiw2W5qEYD444SmgpaLcO+XPpFqLf1LC3mInCevcZ+mwqcUv66deKYsOiU3C2o +3ZJ45NHpZxuhksFlr3Evt/0Cv1JLj8D41RQaahG6oPTaktIR3CmV+0ONSVHjA7j7fQc EkyIj3BAcZKr//jjaemBCYjA4xfK2OzuJD3ChUe9Q+SmQ7gbBGxsdjDQ1Bym2/gTf9C9 Y+iHzO4wQOr75qOThXx/T5tnHJaz0o8voYhT9G61+Sbbn8LAiG3+TsogHw3obzPf7m5j hsahWltKeNLpcA6XIgfXnCiNY6mROqqlFoykQ3ggbTgH3SfXRGF2mDFZHP/+L9BzLNg5 x6RQ== X-Gm-Message-State: AOAM5322DeRlHwPI1oZarC7Xbo2D0wfsI72aFbwK+kFAUYszVRAvncZ5 OyHIUaKIRcxz/QOfXq7W5DMzBw== X-Received: by 2002:a63:1b1b:: with SMTP id b27mr28616898pgb.377.1614186736208; Wed, 24 Feb 2021 09:12:16 -0800 (PST) Received: from localhost ([2620:15c:202:1:9f5:1448:883f:b01]) by smtp.gmail.com with UTF8SMTPSA id d12sm2806501pgm.83.2021.02.24.09.12.15 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 24 Feb 2021 09:12:15 -0800 (PST) Date: Wed, 24 Feb 2021 09:12:13 -0800 From: Matthias Kaehlcke To: Stephen Boyd Cc: Andy Gross , Bjorn Andersson , Rob Herring , linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, Douglas Anderson , devicetree@vger.kernel.org Subject: Re: [PATCH 3/3] arm64: dts: qcom: sc7180: Delete charger thermal zone and ADC channel for lazor <= rev3 Message-ID: References: <20210219181032.1.I23e12818c4a841ba9c37c60b3ba8cfeeb048285f@changeid> <20210219181032.3.Ia4c1022191d09fe8c56a16486b77796b83ffcae4@changeid> <161402520418.1254594.7435679604383921403@swboyd.mtv.corp.google.com> <161402672369.1254594.14091287979440332862@swboyd.mtv.corp.google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <161402672369.1254594.14091287979440332862@swboyd.mtv.corp.google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Feb 22, 2021 at 12:45:23PM -0800, Stephen Boyd wrote: > Quoting Matthias Kaehlcke (2021-02-22 12:38:46) > > On Mon, Feb 22, 2021 at 12:20:04PM -0800, Stephen Boyd wrote: > > > Quoting Matthias Kaehlcke (2021-02-19 18:10:59) > > > > Lazor rev3 and older are stuffed with a 47k NTC as thermistor for > > > > the charger temperature which currently isn't supported by the > > > > PM6150 ADC driver. Delete the charger thermal zone and ADC channel > > > > to avoid the use of bogus temperature values. > > > > > > > > Signed-off-by: Matthias Kaehlcke > > > > --- > > > > > > > > arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts | 9 +++++++++ > > > > arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r1.dts | 9 +++++++++ > > > > arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r3.dts | 9 +++++++++ > > > > 3 files changed, 27 insertions(+) > > > > > > > > diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts > > > > index 30e3e769d2b4..0974dbd424e1 100644 > > > > --- a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts > > > > +++ b/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts > > > > @@ -14,6 +14,15 @@ / { > > > > compatible = "google,lazor-rev0", "qcom,sc7180"; > > > > }; > > > > > > > > +/* > > > > + * rev <= 3 are stuffed with a 47k NTC as charger thermistor which is currently > > > > + * not supported by the PM6150 ADC driver. Delete the thermal zone and ADC > > > > + * channel to avoid the use of bogus temperature values. > > > > + */ > > > > +/delete-node/ &charger_thermal; > > > > +/delete-node/ &pm6150_adc_charger_thm; > > > > +/delete-node/ &pm6150_adc_tm_charger_thm; > > > > > > Can we disable pm6150_adc_tm instead on <= rev3 boards? It would be the > > > same number of lines, but is simpler to reason about disabled nodes vs. > > > deleted nodes usually. > > > > For Lazor theoretically this could be done since it doesn't use other ADC > > channels, however it won't work for other trogdor devices that will be > > upstreamed eventually. Some of these boards have the same problem, however > > they have other thermistors connected to the ADC. One could argue that it's > > preferable to do things in a uniform way, but I'm open to do it either way > > for Lazor. > > > > I see. Can the thermal-zone be disabled then vs. deleting three nodes? I > think the thermal driver uses for_each_available_child_of_node() so that > would work? Yes, that would work. I also deleted the ADC/TM nodes to remove the bogus temperature completely from the system, but one could argue that it does no harm to keep it as long as it isn't used.