Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1914558pxb; Mon, 22 Feb 2021 14:36:52 -0800 (PST) X-Google-Smtp-Source: ABdhPJzrKw6a2IifoeKgEZnjUuZ6l4TDrV8cWpG7AV8M1C4qz64LBwRMH6S9WTcv4csnjX6zV3gJ X-Received: by 2002:a17:907:76d6:: with SMTP id kf22mr16717045ejc.495.1614033411904; Mon, 22 Feb 2021 14:36:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1614033411; cv=none; d=google.com; s=arc-20160816; b=tcTevngwZdbPQQmTBUTCDas0+F30Y92b4p8/uTeF+yHPYnRiMMwAEKW1tvU65oxlD9 J3uDhxjf6OSHy7qFcIEa5JWQLO4N42050VpgDB2AGs4SuQBW1RNmwmN2LIGcEKo0w4yI sJfryP/Tyv2z54BCAY5k/ags6KuNmZ/RPYqMt7uf6oyHsqJpZ1kVndh95vWgoRp2Y+Kn WcoIXi6GAS3HwvNu1Bwo7qnsvyK5a61DbMbzsOQmXJEj1g9MdtIEscS969W27C3RJ4D2 R9i9saoocIWerair/7Pk4KiwlT3182MlsLtd9hZWl7X7o+2mOrCd/5ELMgJYrnyJ06Yu XChw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:message-id:date:to:cc:from:subject :references:in-reply-to:content-transfer-encoding:mime-version :dkim-signature; bh=LwMwnyMNe0dbsBjwrdA/4K91mX9d7JEcNbNBT2gfDLE=; b=OQdXxCgJCMECNaeCaQEfr78ZGjhZeLX0OJXY158QSuPr8BomdM36jiGcKbzw55r3+X TMPgtjR6xsW11rXlYp8FTEnSApBQdJHW7uCkp+M5vZRWT6NrqZK+z9YVfjvoyXceIEkX IMp7YIL8GImM48yRhAqHHM+DtxKKLyAYP+WCz4M0udvvby92JcYmT/iTu3/4y1Mge8et Y5zBnvmiielND9BpTRne3RZzuy16ZgXxRnaE2RydZVubV7HGoDTmHc86zHwu7lFiNYIn yHIN56o/wUNQ4bzcEETAyAFCxwDY35NXldBzuQ1zstECGud1gqRlYjvGQCyAUQ29PlUg JtRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=PiPgFgoR; 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 f16si13634480edy.263.2021.02.22.14.36.28; Mon, 22 Feb 2021 14:36:51 -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=PiPgFgoR; 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 S230512AbhBVUqJ (ORCPT + 99 others); Mon, 22 Feb 2021 15:46:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230240AbhBVUqG (ORCPT ); Mon, 22 Feb 2021 15:46:06 -0500 Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02070C06174A for ; Mon, 22 Feb 2021 12:45:26 -0800 (PST) Received: by mail-pf1-x42f.google.com with SMTP id q20so7334061pfu.8 for ; Mon, 22 Feb 2021 12:45:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:content-transfer-encoding:in-reply-to:references :subject:from:cc:to:date:message-id:user-agent; bh=LwMwnyMNe0dbsBjwrdA/4K91mX9d7JEcNbNBT2gfDLE=; b=PiPgFgoRJVCzZCl5lIpO1thRE8Msnn+qjIg+b+Ez5BJdtCLHqhzeME8kuAqFFhLXEe eDFr8N+O14ZrXRhmKEGiz8jwtselrH+PvzYUvHC3ELg83/fim//n/UO+IygmFZfoesMo +RjTEfpQlYxVmvusEvJJYZu1ZhTaf9KEZu91g= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:content-transfer-encoding :in-reply-to:references:subject:from:cc:to:date:message-id :user-agent; bh=LwMwnyMNe0dbsBjwrdA/4K91mX9d7JEcNbNBT2gfDLE=; b=TzwStf7GBUhoH7Bc6OvEVBMFTZOeO8HBTqQTkVnzUn25xec5spoCHEiXqm/F+iYlaJ MvH3NSha5QSodcHejFtBFex/aV4me13uCz2lU4Q2JqH42eYNYExhVAPlbD3CBAO9xqSR UIDSGmCeeMKC37lsRhDKbWueeadGustnz9hXLeyDec/qTJDJFyfJX0k4AztUuAwJvZB5 HQBZX5awX2yIrYrwgx7uthWnJIsnMV6xspVqYTCUrYh9//HqXzimaUhIAxVvEVXNRFJd RD7HNVWL4MV4Fek1hzlIKJutKAPwL9GZZPssA5xa1UJrZ2wlY4oJ2b/zVScqQyhdxaRD aiZw== X-Gm-Message-State: AOAM532Mp/XfHW5Y7bb/MRk12bM4qD4Kk6FYXUYKjdfG2zErIkXveNMv 9qAZqF2DTFSQDvV1ZIKVVgsqkA== X-Received: by 2002:a63:c702:: with SMTP id n2mr20903322pgg.382.1614026725558; Mon, 22 Feb 2021 12:45:25 -0800 (PST) Received: from chromium.org ([2620:15c:202:201:a878:327b:a10a:e189]) by smtp.gmail.com with ESMTPSA id o6sm20240447pfb.9.2021.02.22.12.45.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Feb 2021 12:45:25 -0800 (PST) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable In-Reply-To: References: <20210219181032.1.I23e12818c4a841ba9c37c60b3ba8cfeeb048285f@changeid> <20210219181032.3.Ia4c1022191d09fe8c56a16486b77796b83ffcae4@changeid> <161402520418.1254594.7435679604383921403@swboyd.mtv.corp.google.com> Subject: Re: [PATCH 3/3] arm64: dts: qcom: sc7180: Delete charger thermal zone and ADC channel for lazor <= rev3 From: 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 To: Matthias Kaehlcke Date: Mon, 22 Feb 2021 12:45:23 -0800 Message-ID: <161402672369.1254594.14091287979440332862@swboyd.mtv.corp.google.com> User-Agent: alot/0.9.1 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > > >=20 > > > Signed-off-by: Matthias Kaehlcke > > > --- > > >=20 > > > 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(+) > > >=20 > > > diff --git a/arch/arm64/boot/dts/qcom/sc7180-trogdor-lazor-r0.dts b/a= rch/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 =3D "google,lazor-rev0", "qcom,sc7180"; > > > }; > > > =20 > > > +/* > > > + * rev <=3D 3 are stuffed with a 47k NTC as charger thermistor which= is currently > > > + * not supported by the PM6150 ADC driver. Delete the thermal zone a= nd 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; > >=20 > > Can we disable pm6150_adc_tm instead on <=3D rev3 boards? It would be t= he > > same number of lines, but is simpler to reason about disabled nodes vs. > > deleted nodes usually. >=20 > 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. >=20 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?