Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1301070imm; Wed, 11 Jul 2018 22:37:40 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcILFXVzyazI1slkPHIzrcSKjt7aZYtlL7xiYDbjTQnx72x+vjdVpBE57dznnS0R43rEGZq X-Received: by 2002:a65:608b:: with SMTP id t11-v6mr768722pgu.259.1531373860463; Wed, 11 Jul 2018 22:37:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531373860; cv=none; d=google.com; s=arc-20160816; b=IvPdTeDSNHL/DHPkYeNjdPeOxHAf1UHa7JcIi48yUaN6Pv/RYzY8xCb36Q+8DoFw27 6YGE8vP85Ul4CEv5fA6nnru14amqQHN9weveUJ2zSdjNnGLbNjxrKyftxODthOwFiiSq 6ve/kLzcvdbKzSqLcGewnFSWOPuTgfV/8gqegUb7OO2kmgUeN9Wj5PaoHsqVS/CmuuG5 P77KeGJxpZloB2JFwTM8Ud+XQH2vur25D351vuJqLwceUjhD/UYhNotH67s8FVqjn9Ed 9mjQLtyHLFgi4C9Ls7cGJlSSqwkXQKpI6e1xb55q+Skh9xPTLlkaxxM6yhGA5ftaOM+L ontg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature :arc-authentication-results; bh=zea+/lh3Rl6WTw8D0CgS/Juv/hztSi+wAA4fC5zJC/s=; b=GVJ/BgqMSzSL4Q2VInDHjq/kmiBdSA0Ab1AL//r8ba01qUTy1ZWuhMfjtdwDECTzfB YOeF8LAoL+7CQ1TfDOtsQxMy0C2jAbq9DZEsvA8XTaXgRaIr1NUwzBFuJfkKOXsswTJ6 E0qORZxMi4IKEsoosJKw42pHifRX7Rj2HT5DdwMoUsIO5jfmMDhTpIBU9KSMUGOArvTZ RidDAZP9vh6ZwOMjrT+szzBHqXIhr/CrIm6AMJnn1ew0wDbT5uG4y1Xsm6Qn/KwLyMUG 48zYpC9avGlGCuM+bKTYwM34vaMAWcGFS9fGYAZl/Vfhdpnnw3btVE94/kkb1Awl9cd0 9f3g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b+VH5KP+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i5-v6si20451882pgc.351.2018.07.11.22.37.10; Wed, 11 Jul 2018 22:37:40 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=b+VH5KP+; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726709AbeGLFoL (ORCPT + 99 others); Thu, 12 Jul 2018 01:44:11 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:39579 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726510AbeGLFoL (ORCPT ); Thu, 12 Jul 2018 01:44:11 -0400 Received: by mail-qk0-f195.google.com with SMTP id b5-v6so12876675qkg.6 for ; Wed, 11 Jul 2018 22:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=zea+/lh3Rl6WTw8D0CgS/Juv/hztSi+wAA4fC5zJC/s=; b=b+VH5KP+ZKXonzpYYSkNC619CcgJ3rphKfGbOp/n1K61PwAzGLmBzlfr6hR/4uIVam ck2pON/C9UrkroXL3ahECO8nXFvIe1sactDqtM3hXek0K+ItmJC9G6xOSCXSqSRIp1Ft bpK8zcS/+Oov5KyoPkZ9jlMXj/00q74cB0RRE= 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=zea+/lh3Rl6WTw8D0CgS/Juv/hztSi+wAA4fC5zJC/s=; b=WeH1r6v5uA7F6DpyvY7gHb7XM1lTrsC2fKH1D7vA23HzWGmcSw74o6W5Zn97PICRZy wyBiese/Ygs+dlQ/Tsg9Xj/6qFP6UBl0cQPaZ1qThRFCRaJIc+1txvVX5xmFjFa6ysVm E604R/pGYWTgGtGc8eSabYWPcTJfSeqUCIdr3+hWIuh6qVuhT8jvT5aTa4wAjT/UwsgT fLgIyELd1hhRf143npCwzjQtmTsIJsPwYRVYuA/TP1x3btKskqgLQ62R0rvNSfhx5kJQ ZmQ2k6OVn/uel39P8uO7Ml/qJkmXBgrGp3Qdik2Ncjl9TG9emDiMlrbrrkDNG2UnNYIl 6+yA== X-Gm-Message-State: AOUpUlGScTI2FQ9x5YH9Vg8Pd2P7wWl5DLTcTng2KFbSOCG/jXXQC8FX PMBqEpJFeUQKQ+B1NlVYbK058l3cBHVHwb5MudEOcQ== X-Received: by 2002:a37:9187:: with SMTP id t129-v6mr598372qkd.112.1531373775930; Wed, 11 Jul 2018 22:36:15 -0700 (PDT) MIME-Version: 1.0 References: <65c39c405076627bd43ec94c211c6998191b9f16.1531136000.git.amit.kucheria@linaro.org> <20180711215129.GT129942@google.com> In-Reply-To: From: Amit Kucheria Date: Thu, 12 Jul 2018 11:06:04 +0530 Message-ID: Subject: Re: [PATCH v6 7/7] arm64: dts: sdm845: Add tsens nodes To: Doug Anderson Cc: mka@chromium.org, Linux Kernel Mailing List , Rajendra Nayak , linux-arm-msm , Bjorn Andersson , Eduardo Valentin , smohanad@codeaurora.org, Vivek Gautam , Andy Gross , David Brown , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , "open list:ARM/QUALCOMM SUPPORT" , DTML , Lists LAKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 12, 2018 at 3:30 AM Doug Anderson wrote: > > Hi Matthias, > > On Wed, Jul 11, 2018 at 2:51 PM, Matthias Kaehlcke wrote: > > On Wed, Jul 11, 2018 at 11:44:13AM -0700, Doug Anderson wrote: > >> Hi, > >> > >> On Mon, Jul 9, 2018 at 4:43 AM, Amit Kucheria wrote: > >> > SDM845 has two tsens blocks, one with 13 sensors and the other with 8 > >> > sensors. It uses version 2 of the TSENS IP, so use the fallback property to > >> > allow more common code. > >> > > >> > Signed-off-by: Amit Kucheria > >> > --- > >> > arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++++++++++ > >> > 1 file changed, 16 insertions(+) > >> > > >> > diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi > >> > index cdaabeb..ba2899c 100644 > >> > --- a/arch/arm64/boot/dts/qcom/sdm845.dtsi > >> > +++ b/arch/arm64/boot/dts/qcom/sdm845.dtsi > >> > @@ -221,6 +221,22 @@ > >> > #interrupt-cells = <2>; > >> > }; > >> > > >> > + tsens0: tsens@c263000 { > >> > >> As per my comments in the bindings, nit that this should probably be > >> "thermal-sensor" not "tsens", AKA: > >> > >> tsens0: thermal-sensor@c263000 { Fixed. > >> > + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; > >> > + reg = <0xc263000 0x1ff>, /* TM */ > >> > + <0xc222000 0x1ff>; /* SROT */ > >> > + #qcom,sensors = <13>; > >> > >> As per my comment in the bindings and the code, I'm confused about the > >> whole "#qcom,sensors" bit. It's not documented and doesn't seem > >> hooked up in the code either. > >> > >> ...but if people have tested this, perhaps I'm confused. How can > >> things work if num_sensors is 0??? > > > > The mystery is resolved by: > > > > commit 6d7c70d1cd6526dc79e3d3b3faae1c40c1681168 > > Author: Bjorn Andersson > > Date: Mon May 7 16:53:39 2018 -0700 > > > > thermal: qcom: tsens: Allow number of sensors to come from DT > > > > For platforms that has multiple copies of the TSENS hardware block it's > > necessary to be able to specify the number of sensors per block in DeviceTree. > > > > Signed-off-by: Bjorn Andersson > > Reviewed-by: Amit Kucheria > > Reviewed-by: Rob Herring > > Signed-off-by: Eduardo Valentin > > > > > > I bumped into this during testing ;-) I think this was merged in 4.17, so you didn't see it in your tree :-) > Ah, now it makes sense to me! Serves me right for assuming it would > be in the same series and not checking if it was something that had > already landed. Thanks. Please ignore the parts of my comments > related to the "#qcom,sensors" property. I guess Rob must have > thought that the "#" in the name was fine and he's the one in charge > not me. Thanks for your review, Doug. I'll test this and post a v7 today. I'd really like to get this accepted for 4.19 so I can post interrupt support and some more cleanups. Regards, Amit