Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1942902pxb; Mon, 22 Feb 2021 15:30:24 -0800 (PST) X-Google-Smtp-Source: ABdhPJywdvWkQWxbzP1c26bOH1xYOv9QFYyICjZrEKP7kuWwUDz4OpLmUU8P3Jvg9U1VpTciBiGJ X-Received: by 2002:a05:6402:3510:: with SMTP id b16mr24475470edd.242.1614036624127; Mon, 22 Feb 2021 15:30:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614036624; cv=none; d=google.com; s=arc-20160816; b=On1Gq7w61DTSZM4h2s7CIjUhEe93pk9yMlgqBOj0lHgxo0FqxPI6hTkJhEUnebySKh FOYA1NSd5c2GLI1yrjfXmny6hU4/R4f83W2l8UFp7Uhd7QN6eojRY6RyDgvZB0baJ9As Z7pG/y9jm9uvZK2T3oky49Qf805oSEgIrmTkpCfrcMjUhZDW/jCI80OnG7yJYAroovyk TKb8kDLfGkuEegvACb/3hWNhkPN4iwFONLYbplM04zQF3SnQBhvoGINKTxHSA6PP4j9u JG1l/8ZMer+RF6LEHpitfY8DIqoZX1HjhX7JjVfIAIfjGKTTZe5QOsFZXIGyGT68GXhm XMjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=la9ZqTZwDD/fbHYVkOWiL/ZTGoQj4SgcB++IQ81k71M=; b=ir1A6bP47v5y88G2A4FJRrVOTV+NZGLDiOvHouAMINGa7gwa7ifLYHxSu2Fa6jgVAF j70CrRG6IcZfCfvanmRsiSwIxr+TeeY2J5T7TKujakC9Q5loEn4azj1pDuLhTNrH++P/ OOeabAuu8CvSyqVT5UBcHrQBI8ZdLVPWG51eRDNd3+vX4hxjwtD4uIju5h5r7imk8sld nA+sHPQrkWUJE2sPb/uRNtrux6aF6/iBVvMysTGPAj+3K9JC0NL3LwvVmcI3OddG1tYw 0Is2Am0lNFqg4N1ZiBc3fYfMqHr5iO9AavL1ehdLG/1AYpdNO3LPaT6gGtkRrehuGikq OnOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=FUztHfmx; 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 s5si8176610edy.205.2021.02.22.15.30.00; Mon, 22 Feb 2021 15:30:24 -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=FUztHfmx; 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 S231269AbhBVX0t (ORCPT + 99 others); Mon, 22 Feb 2021 18:26:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230264AbhBVX0r (ORCPT ); Mon, 22 Feb 2021 18:26:47 -0500 Received: from mail-qt1-x836.google.com (mail-qt1-x836.google.com [IPv6:2607:f8b0:4864:20::836]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB392C06178A for ; Mon, 22 Feb 2021 15:26:06 -0800 (PST) Received: by mail-qt1-x836.google.com with SMTP id e15so10631934qte.9 for ; Mon, 22 Feb 2021 15:26:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=la9ZqTZwDD/fbHYVkOWiL/ZTGoQj4SgcB++IQ81k71M=; b=FUztHfmx7VQcHhA2XN3r0/uBNhN4l0szMZEAOVqXPdfPSQoulotBk12hS+SQl3/ucZ 2HJI0qAE3+YETwEcWJw/jEZa3W5IS5wKXmwkGso5kGtdL5hOz/Vf8nMT9zr40Sl1zyzo 9JMlIiXnNMi33uHXuaCJPDwoR8KGCOr+UUeus= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=la9ZqTZwDD/fbHYVkOWiL/ZTGoQj4SgcB++IQ81k71M=; b=tNL3zTfDWyJiEDEIrGZsu0Tv28Wq49MlnoeMhPPUgiJoEBNCFseG9X5FRMbA0peSty aauuiml0Jrs4dwFHh1jHkSffVrrmWVkh1PF75xYSN8VYDZ7VlLZ/XI1lSj4rApvzY+fl yonMsk5MhRHHv9s6FJ1sOV0Of9ZvSjrkoeVcfgf9M9S2CFxOLD7Yo94amlqdwSTQ/riG 6tUECNd/xsFfHpBaDkMZZNWi4raFj5ILzIsOvr3teOe39XhZMoT+nN/V7UamPFqAmwW0 L8KDtajA3zhW+R5pxCl5DeaZSHo59s+tMcD/th7HXtkxA/1yJAthsrUgQ1yn/1s4+ogO Mwfw== X-Gm-Message-State: AOAM530l3THXr18MIeSo/Lh9kJoWvIhJQ4imogkPZ5woKrzrM9Nhgbr8 D5vhJPqR0j6Tu+LzoqDphabiw8zIp+nxFw== X-Received: by 2002:ac8:5a02:: with SMTP id n2mr22012495qta.295.1614036365912; Mon, 22 Feb 2021 15:26:05 -0800 (PST) Received: from mail-yb1-f176.google.com (mail-yb1-f176.google.com. [209.85.219.176]) by smtp.gmail.com with ESMTPSA id q8sm13480952qkm.38.2021.02.22.15.26.05 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 22 Feb 2021 15:26:05 -0800 (PST) Received: by mail-yb1-f176.google.com with SMTP id d9so5744577ybq.1 for ; Mon, 22 Feb 2021 15:26:05 -0800 (PST) X-Received: by 2002:a25:4e83:: with SMTP id c125mr6137757ybb.343.1614036365019; Mon, 22 Feb 2021 15:26:05 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <161402672369.1254594.14091287979440332862@swboyd.mtv.corp.google.com> From: Doug Anderson Date: Mon, 22 Feb 2021 15:25:54 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 3/3] arm64: dts: qcom: sc7180: Delete charger thermal zone and ADC channel for lazor <= rev3 To: Stephen Boyd Cc: Matthias Kaehlcke , Andy Gross , Bjorn Andersson , Rob Herring , linux-arm-msm , LKML , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, Feb 22, 2021 at 12:45 PM 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? FWIW: +1 to what Stephen suggests assuming it works. -Doug