Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp5174488imm; Tue, 12 Jun 2018 03:56:25 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKQtdzUDe5PQnNmMhBWUZiaqO95awXOGq1nzn8o03ePsEbrDW1rHDNSzT4TBgPuU7ExlBbY X-Received: by 2002:a62:aa18:: with SMTP id e24-v6mr3327519pff.72.1528800985267; Tue, 12 Jun 2018 03:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528800985; cv=none; d=google.com; s=arc-20160816; b=kFWMkPReOu6LiC91HzHjgihfiQ79BAj2LFNFEdrh14shKXRP6gsKEI4IkuP3DaNBpJ f0Jq6npfsaS7ev/knW2ED6NvJeGDntGOyD/aSw0ACPv1pZ2h06rC1EOLutlv7teVJBgs x2B4Vp/QDOmqumXJXeMr9Vz0rVb1HD71P8Eh4UNf3bRtpOI0Lz57HI5J1o18a90EnAuf 0nnW5YhnjVGx1hzcV9egXEwGc2MVShLx8/mk+DKlrumVpcYmBvSDaXVvvgiLB0Ko/guN IZz1+rXJKusHU7QMY3UN0FhpSrBCWtrrkO4pgInkX+GutVyJ4T+SWbagzLUnLlDbfdeN c1Aw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=FhQ3e9gC5p6WExs3bb82v6CtoZfQFTo9EGSLXEduIAI=; b=rjSLXJxNvnkACsGuWeYpTTJzc/ztH/XqGUVyJyAKfWOu+idUiXchEpJStLQtL6Ob/X j4tU5t7rSo09EGbpU4cQie1eJKaRh3QH9ehlYYd+8MTcgSDFz1vH27sCuT8X51e7KtcC F0NGeBK1aqD2gkJLHMa5Qg41sttPtKQNw9wJPOXp84c0MLHZL5Ka+hL5p64Fq/mbBzcm Z8SG67IiHhgfR8STnBZkeYZooJxSDb6tbkNlhPbdNmoqnlBWgoQrJ1vc+ioA0RbOkqvD PMJpWwLOShkRJdttS0XeYxNx9EXdDnFBb1NSHnre37P46nFk4w8caD/XzjN3vQC8eF3+ 4gyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fQO+AqLr; 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 v40-v6si486310pgn.467.2018.06.12.03.56.10; Tue, 12 Jun 2018 03:56:25 -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=fQO+AqLr; 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 S932985AbeFLKzh (ORCPT + 99 others); Tue, 12 Jun 2018 06:55:37 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:36710 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932811AbeFLKzc (ORCPT ); Tue, 12 Jun 2018 06:55:32 -0400 Received: by mail-lf0-f66.google.com with SMTP id u4-v6so35317780lff.3 for ; Tue, 12 Jun 2018 03:55:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=FhQ3e9gC5p6WExs3bb82v6CtoZfQFTo9EGSLXEduIAI=; b=fQO+AqLrFnsGd6ljfxqQ4QrzpUlkP2SvBd3pxXeAS1wS8oSx+eZeUKSEM63LDYg+nh I9Qk6qJqjo/0ho/YczOBrxA0E78sxzBLEtAPvZ1ZlDpvxmSEeRu4bhcjpHO/bB2bsTb8 mM6IqT6a6vPP3QIsTBDWYSw8KhSxl00fEWZDo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=FhQ3e9gC5p6WExs3bb82v6CtoZfQFTo9EGSLXEduIAI=; b=fK2wqupxjkYZwGJo/B0xa3DjNncunOWeyOi8lfQ60srn++Bbz8VQppRnxSywEvQWkY gyTzyc0E4AJe1CwD8WKpYd7Iq2U0YCtf9Wpsx8hf8svKhtk33XJIhd7i7+jOa8l8fWl/ ScI0jlGOkMjZG2FwOc67nU4sty/DwwldHwZjkttBDcX8J4P9iNYvjidig2QPA6UrVbEs ZNnFJrc+XlwteF2RD7J93bahAdgWcigTuk0KWdsUBDJrgl0NLUahrknUQ9Luuu4WlnQm 9NL/wqV5JHCs+pYPZ2R/Vr78d++UIZFufanyhkj5hw2k4Gtch/s88cssRs6TqwrtvxP6 DF9g== X-Gm-Message-State: APt69E0Z6/SFW3dmOnxKsFIPlVrFXX8AQ0ztx98iLsB9tgijKjZiliWF 3VbaHxoEuowcnVuAsUicWsotpabfTB0= X-Received: by 2002:a2e:980f:: with SMTP id a15-v6mr2028012ljj.143.1528800930670; Tue, 12 Jun 2018 03:55:30 -0700 (PDT) Received: from localhost (85-76-96-64-nat.elisa-mobile.fi. [85.76.96.64]) by smtp.gmail.com with ESMTPSA id d4-v6sm160166ljg.44.2018.06.12.03.55.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Jun 2018 03:55:29 -0700 (PDT) From: Amit Kucheria To: linux-kernel@vger.kernel.org Cc: rnayak@codeaurora.org, linux-arm-msm@vger.kernel.org, bjorn.andersson@linaro.org, edubezval@gmail.com, Andy Gross , David Brown , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , Zhang Rui , linux-soc@vger.kernel.org (open list:ARM/QUALCOMM SUPPORT), devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS), linux-arm-kernel@lists.infradead.org (moderated list:ARM64 PORT (AARCH64 ARCHITECTURE)), linux-pm@vger.kernel.org (open list:THERMAL) Subject: [PATCH v2 2/5] dt: qcom: 8996: thermal: Move to DT initialisation Date: Tue, 12 Jun 2018 13:54:54 +0300 Message-Id: <683ceb9a7d283bcad47fc6e8e4fcfbd7e76c1018.1528799892.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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, .ops = &ops_8996, }; -- 2.7.4