Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5745970imm; Tue, 12 Jun 2018 12:36:42 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKOQhgCTq4IZmt2H9J83g/XxBbkCgMo4WyKHdiPkEGCtbCw+H+1+kulRgJjxE3KMZNTYYL+ X-Received: by 2002:a17:902:d807:: with SMTP id a7-v6mr1872812plz.92.1528832202340; Tue, 12 Jun 2018 12:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528832202; cv=none; d=google.com; s=arc-20160816; b=0jKcyzR0+CbsDlmKxmiMZTWBrZD3nUTzSQnH4VLvDN5b5oi0NNQ2LCHv+HqZ8qELb6 i/D12X/EV8UGGHyJbZ+tpzePUhkRae/WTea4RsxX1afKndoMTOCP+bCkG0lXVpV5hWOj 1X2j7xSlkDHdzgSSNU9mHwmT3dsUWv/Sfci76yXPxiuBy+JpbR1Sf2r1mhcR52S3dntX aGfzWbiHePxG12hjDGx/NXfYEUE9m9VWfJN3nmQgj/Z25q872zhh2aSOUmNIv7GhmjiC qR76X0+OocBFGesB2IWbkzzwAk6PfYtsgOH11yZsQ4ofXR3N16o2H8nfPQaRRbyQaB0N NYFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=SAMuhf0vaF3MUgU/uFUUNh8Ga/pQqEViocSlhwffGnI=; b=ey568gqB3C2Iajk0+OAr6EVlnWbjmkFwhMlzsUgW2+mXKku7DNK46T56DeaXUaLDe9 0qkSEDTdQeUblaab8xPqGdzwAsFVSxy0SipcKCOWUw2hWxAZX7a9ff1EOFgb+q15kT9o zeP9d5Go3yRvFnbvmYHvxmPxUbcbhkKD76nUXnXnXE8UOLQ4t+2+W4GUn32fLSevXeH0 RXYSb4ScxdRwkadxf1P0QOK7h6JWfTfnQrhb0LrJADstf1OQGJz9nPXa7r1NXUHtpfrF aZhhQ8cHE7HS3/dh979DYzthOreLPcsGHv1yuYCFh1PUOwJ+PmmiKdlNReCsj6hvA30g RjRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aRVpcnhc; 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 u13-v6si708153pgc.274.2018.06.12.12.36.19; Tue, 12 Jun 2018 12:36:42 -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=aRVpcnhc; 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 S933406AbeFLTfO (ORCPT + 99 others); Tue, 12 Jun 2018 15:35:14 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:37733 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933224AbeFLTfL (ORCPT ); Tue, 12 Jun 2018 15:35:11 -0400 Received: by mail-pl0-f68.google.com with SMTP id 31-v6so63920plc.4 for ; Tue, 12 Jun 2018 12:35:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=SAMuhf0vaF3MUgU/uFUUNh8Ga/pQqEViocSlhwffGnI=; b=aRVpcnhcbp0ya639DFHSLojpI5IR4sTwoRXrPxP6Pd0wzycUvXUqACPMoNrWA5ex3v XDamZQfHzUbbW8P4EVWblm0rzXMyi4JNAPhjOG2d6YfpYoM0YM2XcaepV+6+7WkAVK0P nEIIgWgWXOmrShHatSymfxZjoIPuBMnlg9Y+I= 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:user-agent; bh=SAMuhf0vaF3MUgU/uFUUNh8Ga/pQqEViocSlhwffGnI=; b=TlM2+90nBxrHX1z9A3mP7/IGsM7BHpkwFYjqxtN4ywTMfuruYacafOIdfmv8L8xDv0 f2yFWpyuVmhHMm1QyaEJfet1XsAf9POQAMpY7Z0VCF68rY00lv66uNFk9OYRlWeLKZf5 BVZOLUNSyilhroAOJFk6quJj4hGMaX9R5qE/iAxtLTtUTY0kvImeEK65Tf+uxlZUxlzS U9POj6wv9SsxjCdylvf/h7dLvAkPUI8LN9fSYhVNlF2fJXOgCo/2VQjBnoKr4cPSYLB0 CnImx2tH+iXs/3OzjEnxvtzAyyxbAkyFMZtiFDW8iVAzMfD7lY9gR21xiGI8Xn/dsAXK L8ww== X-Gm-Message-State: APt69E2kXXEngSsHFzzuFqY12sdZx6xTYcLQBKN5m6nQPselYQlgehTe cQ1NmIGTpYApdmtGlzxamx5H+g== X-Received: by 2002:a17:902:b18b:: with SMTP id s11-v6mr1862098plr.190.1528832110503; Tue, 12 Jun 2018 12:35:10 -0700 (PDT) Received: from minitux (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id p1-v6sm1068764pfp.137.2018.06.12.12.35.09 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Jun 2018 12:35:09 -0700 (PDT) Date: Tue, 12 Jun 2018 12:35:07 -0700 From: Bjorn Andersson To: Amit Kucheria Cc: linux-kernel@vger.kernel.org, rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, edubezval@gmail.com, 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" Subject: Re: [PATCH v2 2/5] dt: qcom: 8996: thermal: Move to DT initialisation Message-ID: <20180612193507.GO14924@minitux> References: <683ceb9a7d283bcad47fc6e8e4fcfbd7e76c1018.1528799892.git.amit.kucheria@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <683ceb9a7d283bcad47fc6e8e4fcfbd7e76c1018.1528799892.git.amit.kucheria@linaro.org> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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