Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp352391imm; Wed, 13 Jun 2018 01:14:02 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLEU1nOXfaqB+iq7IapGtiDJADiPZ23Ga+U9tpV1u68Z7LqxLoVlvEzGQkzGRq0xhm21o6y X-Received: by 2002:a62:9513:: with SMTP id p19-v6mr3847289pfd.239.1528877642793; Wed, 13 Jun 2018 01:14:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528877642; cv=none; d=google.com; s=arc-20160816; b=YF/cOdSKsAfnfafkOkpxwaYhVkjYPq7gyCX6DQYiaOxIb1kH1MpluOVJo/RwZTimbb qr72Vd8tdnPZmQU4qk8QXudW7cV+5f/E7g/saDXD5GP6Tfv7IWeZRGenpH4+kTd+zuNj P4u+hC0iimcEbBuWvOOOB/7cdQ93eTTrPkhrnkGW9TuP/7x3+l09Nama8DosYKaY9i8+ JSuA8XF5aB/lWQlRDTJ68ZL94/lWLu5ncARI6ln+tOE48M8cWoJqpH4NoqSootoTW2E4 0RxeR1V6098gyDv6FsaLziCqrhjjLFdiKu7ycvDl3/dVM9h1O8S7Ux+qDmnuDfqOUPQE PWUA== 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 :references:in-reply-to:mime-version:dkim-signature:dkim-signature :arc-authentication-results; bh=9MV/ItVzMmJXWaz308SYtRyRPaWVhi1bsWeAx57JmuQ=; b=V5fql7wkhPD0OsUmo3oMPG/9TQLHjQosVef7oiYPhYk3+IOo6jE7hPAvwZC9znrtly ZBf7MtAj2V9uBP2s5j/O/6eNZrAUBkouyCvcbkL21vdVFcu9KVPfNj+My2ZY3BE89tsJ Pc21isprPJxX1fiZtCAmm07GdH08B4eEXuYNbC91BXabY2X6vZX0WV/E2yaPQm+yaQY1 K2Tv1nP+ziw1Z7UbjfUrLSouH02PJp2KyOO6n51AeGa1jPxo1kBlCnfOu33lfEEPOaip dz0DnklDIBtstvDPTIjr/vVeJRWSeDCLFB+MLTJthaSYzsn4pLiBcRiPTFjv4kVS1BmP tAtA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b=ADycsJse; dkim=fail header.i=@linaro.org header.s=google header.b=kwIaxhPX; 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=fail (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 w1-v6si1765011pgr.489.2018.06.13.01.13.46; Wed, 13 Jun 2018 01:14:02 -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=fail header.i=@verdurent-com.20150623.gappssmtp.com header.s=20150623 header.b=ADycsJse; dkim=fail header.i=@linaro.org header.s=google header.b=kwIaxhPX; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754534AbeFMINQ (ORCPT + 99 others); Wed, 13 Jun 2018 04:13:16 -0400 Received: from mail-ot0-f196.google.com ([74.125.82.196]:35371 "EHLO mail-ot0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754495AbeFMINL (ORCPT ); Wed, 13 Jun 2018 04:13:11 -0400 Received: by mail-ot0-f196.google.com with SMTP id q17-v6so1981676otg.2 for ; Wed, 13 Jun 2018 01:13:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=verdurent-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9MV/ItVzMmJXWaz308SYtRyRPaWVhi1bsWeAx57JmuQ=; b=ADycsJseD4XbWvGcOhOJUUWo7Xe5eG3fL+MoIth+LjhlWATIlHW/foX6hvooo6egXr w/AlckuVcWeHnGSF21ZTNilTHvvcemsCor+aQXBejlwk/85EFgyDmQ9u01Mrb8zyBVVR b35PwV3t4UdLJciONspaW1Jd2QaoShiOf7FiNZen9YDQgPv3XriDjrdc9eoV+WhzmVow edn+7i1eeWNlZ6E6wBTyfB+4JUnVBurAYxJ71J+Dams4wiv8ZILQSj+GdIha2Ypx9mft YXFMco9s6qCjSscu/rObKx3vBHDXosCPb3Ep8/kLIjWPs0ybHOMXrMEwpDNxyjHuwIPj P5aQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=9MV/ItVzMmJXWaz308SYtRyRPaWVhi1bsWeAx57JmuQ=; b=kwIaxhPXmrUWefOlVZyktqyrsk5osi3vI1Z6SVNDb13eQ86DTYcSy5KD1ohRig/pHH LpWQoOrjA65tRs32i+m68Z2585phdxx8M8mXYuulObrRjoqnx6QJVASzJiBs0YpMz6+d hwkFq8bbdCe/wiJhYqfVbSnDq7aVC5KZpmm8Y= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=9MV/ItVzMmJXWaz308SYtRyRPaWVhi1bsWeAx57JmuQ=; b=uFFJRuAu27aDllit/cNoxhZ0U5WRyIkxYXUW6thj1iYhVS9I76GBLuTu6IYu+ovBnm 0k83TWYtH6VMPxwmWbp61E+UHV5+fRpFBz6uNvD6HZs5HngffoUdO11Sn6GmOv52LNI/ t50hzDgLAOA5lo8g4XLI4pQ7fzvjhRVHMeTbzytNwcP6iHLICIj0QV4ens43l6cDb+eJ DL9VqJKGlgOs80n3sej1ZvAXO1GrP6ueV80HgOUCFSpozt6aDkHh/gWAAKHb1q9jvbmC NV9xS0/prnADDbpXQovFxnra568+IeHtOwiMyLvErTDJVKAYlchlS1hVGb4p78NU5H5b zdIw== X-Gm-Message-State: APt69E3bIlpMuvG4nHhcjFuG7RIljyCnAhOngHtOyqWK8uexWt6RAfVy fzWof0gOSFjtiaK3O+46ccFl6byaS9diSBqiPcqw/g== X-Received: by 2002:a9d:3803:: with SMTP id i3-v6mr2311613otc.59.1528877590768; Wed, 13 Jun 2018 01:13:10 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4a:99ab:0:0:0:0:0 with HTTP; Wed, 13 Jun 2018 01:13:10 -0700 (PDT) In-Reply-To: <20180612193507.GO14924@minitux> References: <683ceb9a7d283bcad47fc6e8e4fcfbd7e76c1018.1528799892.git.amit.kucheria@linaro.org> <20180612193507.GO14924@minitux> From: Amit Kucheria Date: Wed, 13 Jun 2018 11:13:10 +0300 X-Google-Sender-Auth: QFjmco7sEFf-V6Wz2iDANlwYnD0 Message-ID: Subject: Re: [PATCH v2 2/5] dt: qcom: 8996: thermal: Move to DT initialisation To: Bjorn Andersson Cc: LKML , Rajendra Nayak , linux-arm-msm@vger.kernel.org, Eduardo Valentin , Andy Gross , David Brown , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , Zhang Rui , "open list:ARM/QUALCOMM SUPPORT" , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , "moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)" , "open list:THERMAL" 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 Tue, Jun 12, 2018 at 10:35 PM, Bjorn Andersson wrote: > On Tue 12 Jun 03:54 PDT 2018, Amit Kucheria wrote: > >> We also split up the regmap address space into two, one for the TM >> registers, the other for the SROT registers. This was required to deal with >> different address offsets for the TM and SROT registers across different >> SoC families. >> >> Since tsens-common.c/init_common() currently only registers one address space, the order is important (TM before SROT).This is OK since the code doesn't really use the SROT functionality yet. > > Please line wrap this. > >> >> Signed-off-by: Amit Kucheria >> --- >> arch/arm64/boot/dts/qcom/msm8996.dtsi | 12 +++++++++++- >> drivers/thermal/qcom/tsens-8996.c | 1 - >> 2 files changed, 11 insertions(+), 2 deletions(-) >> >> diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi >> index 410ae78..b4aab18 100644 >> --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi >> +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi >> @@ -451,7 +451,17 @@ >> >> tsens0: thermal-sensor@4a8000 { >> compatible = "qcom,msm8996-tsens"; >> - reg = <0x4a8000 0x2000>; >> + reg = <0x4a9000 0x1000>, /* TM */ >> + <0x4a8000 0x1000>; /* SROT */ >> + #qcom,sensors = <13>; >> + #thermal-sensor-cells = <1>; >> + }; >> + >> + tsens1: thermal-sensor@4ac000 { >> + compatible = "qcom,msm8996-tsens"; >> + reg = <0x4ad000 0x1000>, /* TM */ >> + <0x4ac000 0x1000>; /* SROT */ >> + #qcom,sensors = <8>; >> #thermal-sensor-cells = <1>; >> }; >> >> diff --git a/drivers/thermal/qcom/tsens-8996.c b/drivers/thermal/qcom/tsens-8996.c >> index e1f7781..6e59078 100644 >> --- a/drivers/thermal/qcom/tsens-8996.c >> +++ b/drivers/thermal/qcom/tsens-8996.c >> @@ -79,6 +79,5 @@ static const struct tsens_ops ops_8996 = { >> }; >> >> const struct tsens_data data_8996 = { >> - .num_sensors = 13, > > This will cause the current 8996 dts to fail probing the tsens. I think > you should just leave this as is, because specifying qcom,sensors in dts > will overwrite this number regardless. Ack, I didn't consider backword compatility of the code with the current dts. Will fix. > It also would make this change dts specific, which is convenient as it > breaks the interdependency between the different subsystems. > >> .ops = &ops_8996, > > Regards, > Bjorn