From patchwork Mon Jul 9 11:43:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141387 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2563059ljj; Mon, 9 Jul 2018 04:44:03 -0700 (PDT) X-Google-Smtp-Source: AAOMgpekbuUmEK18BtrwgyLgdtJi+W3ZgAc3eLB/X/66x2gMEFGMixn98eCfNrIE9Ye336Lc5SP6 X-Received: by 2002:a17:902:9a08:: with SMTP id v8-v6mr20479937plp.148.1531136643791; Mon, 09 Jul 2018 04:44:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531136643; cv=none; d=google.com; s=arc-20160816; b=Mu0YlLdcpTvyLZLMfeUwwQjDnSDCTTYDV+AhPS7q9G5O9f3A9VJd/o0+Urd2cyCMn1 jfOBhMLucALCEjYDUWJb3RHVSY20fvvIQdCZ+2iZrNTv3GZywPHeZZ4OUoMVbwSIBc5s Za6FbzqWKkSQy7p5GyAPkqUvVf3psXnKDSky5ucy3Vv6nJjv8MzrGWeFnIet5vbM6t89 088aOTwTEFVgkdI+PQd0WuMPMctytmRQ0/u2UwnNaeOQSjjXqLnOHerMAboC8LN8VSGe FBvY+80/5INFIHnc4V2KF3n9UE8XvTKsqNOsZmbYkD/4lxuFQAk7gFro5umuJ4hnd1gg yH8g== 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=RqHvCXWgQNEn4X6AU/ZqYttyBtBVtMakbjX0moav5Ps=; b=ZR1LOhMWtJI1nrz6jAGp2FkvPhw9v2IxgMP3LxydXqyi/9rnOJ8RmpKRy4WB0AJJKH ej44k8xD//TC7AzNbk6RmT+Bi7uPxivUlMm13qkerA1FE3WJ1ci5mpUyd430FoEgK6Q2 NqeDH0Jye5gBQGwjTeieFtL7qmMiP8GfLpWqejnT/xP3MmYcjx/XFxuCwVdGtKw0CzvO QYMzMgilZVxEeBDTKK7WoTmT5nOO4hjduy/AFsRGhKHxJbpFf6tiLIcNJcsJ0dhO/8dW gShRXqPKTzveMhzE4DcoRQckbyvmLxMDIdy0wR6YgZLCKKG1OJBDdVJ29GN0/z+XzYZ2 txwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CISB1Njq; 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 v14-v6si11150033pga.270.2018.07.09.04.44.03; Mon, 09 Jul 2018 04:44:03 -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=CISB1Njq; 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 S1754520AbeGILoC (ORCPT + 31 others); Mon, 9 Jul 2018 07:44:02 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:42312 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754467AbeGILn7 (ORCPT ); Mon, 9 Jul 2018 07:43:59 -0400 Received: by mail-pf0-f193.google.com with SMTP id l9-v6so1872952pff.9 for ; Mon, 09 Jul 2018 04:43:59 -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=RqHvCXWgQNEn4X6AU/ZqYttyBtBVtMakbjX0moav5Ps=; b=CISB1Njq3EwhHIEELfi+QKNGw0UrCiOaotNAGzoY0sPV0ZozSTMQ2faE6hhaQstqL/ v+AyzosbCgoofvyt6B/5Bqeps1WHxqwaLrIASoftzwtCnjhnc3oNyvE9+iy44np0ZW15 5Mw/FY26Z+KUf221TkM97NVawFY66L/zz6A7s= 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=RqHvCXWgQNEn4X6AU/ZqYttyBtBVtMakbjX0moav5Ps=; b=ifo7OSbXBEOjO1kgC8TPvXgBs5nOO1oS+qaVZYC18icOq/8ah3yEZdpjkFUIMb5RM2 rvgf85gXM5lP9Co9js8mhH1dnr+X0XyI94B+1O6rQW4SNerYWZAtjKa58MdYeZxWtHp+ uB/eypP6gboOrT2bnpxITRUArSsbRQ/2cSEhRmyZXPOHKQ9948ID2bf/TgTB7llVFKrw CwMzI1xYZygN/5rYxlNCBt4aKGIdEMR+Qjcqk5yW7NZtOMPBMIKt6LZ2kAvO7qvuKRa9 wQX5QGJF4bg/a1y+CH4Bz+2vNdzHRss5kIEMG+U5l1A1moYfCLd2bmIJeSqQRVd6HWmt Rsrg== X-Gm-Message-State: APt69E1+YfM9M6o8o6Fyp849yhM4MEs8kZOPuOIPNwbXYFo4/N1zshHR 05qG6nkDG0rwLlhkglA2T3fkLUD/n54= X-Received: by 2002:a62:dc1d:: with SMTP id t29-v6mr21149179pfg.244.1531136638539; Mon, 09 Jul 2018 04:43:58 -0700 (PDT) Received: from localhost ([103.249.91.93]) by smtp.gmail.com with ESMTPSA id z8-v6sm25592443pfg.24.2018.07.09.04.43.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 04:43:57 -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, smohanad@codeaurora.org, vivek.gautam@codeaurora.org, andy.gross@linaro.org, Zhang Rui , linux-pm@vger.kernel.org Subject: [PATCH v6 1/7] thermal: tsens: Get rid of unused fields in structure Date: Mon, 9 Jul 2018 17:13:23 +0530 Message-Id: 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 status_field and trdy are unused in any of the tsens drivers. Remove them. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Acked-by: Rajendra Nayak --- drivers/thermal/qcom/tsens.h | 2 -- 1 file changed, 2 deletions(-) -- 2.7.4 diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index 911c197..dc56e1e 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -77,9 +77,7 @@ struct tsens_device { struct device *dev; u32 num_sensors; struct regmap *map; - struct regmap_field *status_field; struct tsens_context ctx; - bool trdy; const struct tsens_ops *ops; struct tsens_sensor sensor[0]; }; From patchwork Mon Jul 9 11:43:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141389 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2563344ljj; Mon, 9 Jul 2018 04:44:21 -0700 (PDT) X-Google-Smtp-Source: AAOMgpe0Uf06F2/IkaRGa5KI05LDC6t8eHqHQ3XPebDOJf00YBLhu4wLb2Us9MakcWYhGnlWdk6F X-Received: by 2002:a63:9b19:: with SMTP id r25-v6mr956339pgd.44.1531136661275; Mon, 09 Jul 2018 04:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531136661; cv=none; d=google.com; s=arc-20160816; b=Kp2Y8YMhNT7sv4whhrrE0iAgNNNrxP5pQNbfTAM3lpeIMMnzGaZdFJHj0NYIqoXFkn r1xVFiH0AXUrSWmNfjO0ScxcbQRR9XPkusdewXn2ys8xGScb2lBccKOE82zOfwIMLjvr xGogfTGMnDj8kznmMy85JycwcU/GElGFQVdkfyz1eJDhx0sVkOUUbPmptHC45SjgJwv2 rI/Lcp883XRNYLAnuQeI33it67od8ZYlb/Fu1v+pqTLA6UpN7+czyiytznv8V6xTAIsW jOKFaJVjSiEpLe8Uewwr2risUp8IHbLHXkH4v32MUqH+mgq3AoDBt+cjzLYbn9Ej+rbb 2KNg== 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=LboO0m9tdUv5OClL5JGmFqiWh7zVC6d1MgWg2XNw1k8=; b=ZIXkhSQlc5hk6i6zcoJvEuUJCbxl2se6nPB/D7yt5ykkpSj4AqDY+xL/OTPXj+WUHj j/p8S7Ab9c26ZuPQ/aKl1BzzqnzyxDMymcoFWSWiAeNuyGouqnsQhenw+GGzOszZJzbm PACZEto3ofhDKP1GjL9toCcs9nQ7UKOZsY6xEnBcL2yRtJZj4e/4LxCD3J8NMZFOWCys 05kOwWQRKrpV25Mhe818JO1PGUJoXdbYe0vaGokz08PmC8ACGtW3rMQyaOsYoqVvxqcB xdYnWqBZOrT76g3Tqet6HtDfcCunB3pLRKl4XPRSaydBAznH3VykrpVu7VUqC0CtvK8U cBQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=V7gEpZZm; 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 l1-v6si13487248pgb.464.2018.07.09.04.44.21; Mon, 09 Jul 2018 04:44:21 -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=V7gEpZZm; 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 S1754547AbeGILoS (ORCPT + 31 others); Mon, 9 Jul 2018 07:44:18 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:37540 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932628AbeGILoL (ORCPT ); Mon, 9 Jul 2018 07:44:11 -0400 Received: by mail-pl0-f66.google.com with SMTP id 31-v6so5928047plc.4 for ; Mon, 09 Jul 2018 04:44:10 -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=LboO0m9tdUv5OClL5JGmFqiWh7zVC6d1MgWg2XNw1k8=; b=V7gEpZZm0OGwpFFvpwBpwBmb9UDv7dab6XKaeNfVwWvuULotqtXmUVnd6Cx1QJb14L KFf2iT8oeypZjV0SDMx8Ni9OkfXQgylDhsN6ci/nkTFJbnoUs7C3Mt5j5d5mg/arfpbx 6Ez+8u+PUijBrREBbLITH9OkmcCZNgNX1p1Tc= 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=LboO0m9tdUv5OClL5JGmFqiWh7zVC6d1MgWg2XNw1k8=; b=TnOCQiKZExidTdal3P0PSMA7i3wjvrEsyqdGEy7HbmDQ6KdPG0W6zPnkmQ8rvU8M+E EbdekdfuY7nt2u8UFYYF8Hu3pH1JKFCu6vieVALO8fxTBzKT3VUHaCX3e6EbqPQdbojp RDpuTR51gvQOnrtr0M5b9Lk67Icp+Yea342/Rjz2vOyjkmLCm3cXwe6xd2E1NvW+N2Q5 NVIeJUYXOilVCLmLwnf8G7EjLJEGfZvI57FpveFJlj2Aq39oRhASt0K3iGnl+w6vJmys gqMKX2iYwqt4OYAoxet2qV3GPw+y2cYfJYK/yWHe0zz+LM/hjx1kFcsiOhqWalULQEAi 0UDw== X-Gm-Message-State: APt69E0zSOAyv3b/l6a99UBlN4ucy5tszRQbonTH2zNK70ZXzwVrMF/n vhI1U/cz3Z/BCo+7cTfApB0N6LMzg1E= X-Received: by 2002:a17:902:7798:: with SMTP id o24-v6mr20713741pll.165.1531136650294; Mon, 09 Jul 2018 04:44:10 -0700 (PDT) Received: from localhost ([103.249.91.93]) by smtp.gmail.com with ESMTPSA id g124-v6sm24269175pfb.5.2018.07.09.04.44.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 04:44:09 -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, smohanad@codeaurora.org, vivek.gautam@codeaurora.org, andy.gross@linaro.org, David Brown , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 3/7] dt: qcom: 8996: thermal: Move to DT initialisation Date: Mon, 9 Jul 2018 17:13:25 +0530 Message-Id: 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 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) -- 2.7.4 diff --git a/arch/arm64/boot/dts/qcom/msm8996.dtsi b/arch/arm64/boot/dts/qcom/msm8996.dtsi index 8c7f9ca..6c8a857 100644 --- a/arch/arm64/boot/dts/qcom/msm8996.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8996.dtsi @@ -461,7 +461,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>; }; From patchwork Mon Jul 9 11:43:27 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141391 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2563543ljj; Mon, 9 Jul 2018 04:44:34 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeXq0EkUSgLSg9JcWgociN0/HyJPGV78UayUxGqkL05uxjvflk0aLqEIls/+boeMffl7CwK X-Received: by 2002:a63:ec14:: with SMTP id j20-v6mr18338132pgh.28.1531136674132; Mon, 09 Jul 2018 04:44:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531136674; cv=none; d=google.com; s=arc-20160816; b=P7l/zmzC6Oc6lrSh9VcEbbfrv8jUcoIK8gjuDpY+LucLK3dXWfi+JVRAu28ApMQ5cl BkVIxztuGvET0TZWYcPY9Ky/v8WtjDdTZgZQ8rR+fFnyyfFxwhje6fop2gaMGj85qegP 1tyj7YEe7S5XzqLLXx+3fQcwMC5Uej1D9w4cs0RDUfqiHQD3umOVmAmGyyqhCikqt4z8 TghmHNlljGoy0D09H1kBl78kd5VBQr/r6lboTs7HSGZHl0GILHEs0nRzj2yA5v8ZWEL4 izBCID7W5XfnOVrHQKbiMWbi9/ZRBHGldisliywFUYZWVu7YDQ1dbu9zSh8qv3bFcXux cFgw== 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=wik4a7EH1S7fZsbVdZxGmOdjNtd0gVTKmBfpirkIe5U=; b=waIFvzDguuQC4xv4JOvFY7/OKpEB8t2EgrXyCL6I2CPDjgkUq5Zv6pp24gCWMgLJ/a QEK11itJnxlV9vuOtaw1b76MpCaJMvtNoebvYiYUMTVWQ15SU4bAieFltdlyw9ampjc6 j38iIQ1fQBnxIInb/2CaHhKii9TY+axfavrBNrN3Xe6so2d/jdP2rIpIYID3DvCBto44 RjZYN+4XBEcMhS3QDSwQtTbwDZjyfvcPy8SxW1qxjSB8DCh8XBhRomlJBZYgX1FGxtzY vCSMK/ekxKnZUsqCh0sIR/+ejxNW/j/irkAsHG2A2a3nLFldYKQqZChuR0CjUIOoI/yA ndig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cmxIMbpD; 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 a9-v6si14053314pgn.177.2018.07.09.04.44.33; Mon, 09 Jul 2018 04:44:34 -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=cmxIMbpD; 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 S932887AbeGILob (ORCPT + 31 others); Mon, 9 Jul 2018 07:44:31 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33226 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932842AbeGILo1 (ORCPT ); Mon, 9 Jul 2018 07:44:27 -0400 Received: by mail-pf0-f195.google.com with SMTP id b17-v6so13510843pfi.0 for ; Mon, 09 Jul 2018 04:44:27 -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=wik4a7EH1S7fZsbVdZxGmOdjNtd0gVTKmBfpirkIe5U=; b=cmxIMbpD8tI6sHlYKfOGZTrtpbKOXwRQAZpFgJ7Tmng7kIAQwvzxbrapIaZqYRwktU vCHpfBelrhTc2r+ApsBGPEQ/DYYGVl3+BInYKvh+som3IzeI0W4wcrty+F66xvaBS6yf sQ/r7HkoUE704DVuLzOvIkWaY4248qLY3h/F8= 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=wik4a7EH1S7fZsbVdZxGmOdjNtd0gVTKmBfpirkIe5U=; b=Vqif4Uzl/vwQEKulRELbMPXp1WuAIZyzu7JLat+LS1JxcKV9A2PBbCCIuqtUww6BwY EIDIca0jFtf3pl2/jVnCbPxu0bmy0lzbAgfXEwgScHsfGTw4r0ouJcACihctdS7sGEgP 1l0CDjyfm1H12X4EH4dufpcR9o4wFS5lbpai/WJMfpQFY7Unb378wmovRldGOokt00KX p7XGdbzRw/j8wrfeXiU91a0D7cClSLEU85zqr/c/U9o3BAbpzGWGe/V2GNKN0eh52met UAmHXH1PrZe557gqvnUifNJChGsCf38hq6ssD7gDZ81yQOg4xfy4G/E5EsnMxS57ncZ3 QZ2w== X-Gm-Message-State: APt69E0Mk6lt95XMUIgB2oa/m0nEJ5tWMcbGi4+lFoXN1ELnz/IWP7aP PaLks4jVQKmWLsTHpc27OX8ci5S3SNE= X-Received: by 2002:a62:c00c:: with SMTP id x12-v6mr20946530pff.216.1531136666907; Mon, 09 Jul 2018 04:44:26 -0700 (PDT) Received: from localhost ([103.249.91.93]) by smtp.gmail.com with ESMTPSA id z10-v6sm23139630pfh.83.2018.07.09.04.44.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 04:44:26 -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, smohanad@codeaurora.org, vivek.gautam@codeaurora.org, andy.gross@linaro.org, Zhang Rui , Kees Cook , Rob Herring , linux-pm@vger.kernel.org Subject: [PATCH v6 5/7] thermal: tsens: Add generic support for TSENS v2 IP Date: Mon, 9 Jul 2018 17:13:27 +0530 Message-Id: <278b59d6a25f874a087995368cecec2572b5be89.1531135999.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 SDM845 uses v2 of the TSENS IP block but the get_temp() function appears to be identical across v2.x.y in code seen so far. We use the generic get_temp() function defined as part of ops_generic_v2. Signed-off-by: Amit Kucheria --- drivers/thermal/qcom/tsens-v2.c | 6 +++++- drivers/thermal/qcom/tsens.c | 3 +++ drivers/thermal/qcom/tsens.h | 5 ++++- 3 files changed, 12 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c index 34ba6c7..f40150f 100644 --- a/drivers/thermal/qcom/tsens-v2.c +++ b/drivers/thermal/qcom/tsens-v2.c @@ -69,8 +69,12 @@ static const struct tsens_ops ops_generic_v2 = { .get_temp = get_temp_tsens_v2, }; +const struct tsens_data data_tsens_v2 = { + .ops = &ops_generic_v2, +}; + +/* Kept around for backward compatibility with old msm8996.dtsi */ const struct tsens_data data_8996 = { .num_sensors = 13, .ops = &ops_generic_v2, }; - diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index 3440166c..a2c9bfa 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -72,6 +72,9 @@ static const struct of_device_id tsens_table[] = { }, { .compatible = "qcom,msm8996-tsens", .data = &data_8996, + }, { + .compatible = "qcom,tsens-v2", + .data = &data_tsens_v2, }, {} }; diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index d785b37..14331eb 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -88,6 +88,9 @@ void compute_intercept_slope(struct tsens_device *, u32 *, u32 *, u32); int init_common(struct tsens_device *); int get_temp_common(struct tsens_device *, int, int *); -extern const struct tsens_data data_8916, data_8974, data_8960, data_8996; +/* TSENS v1 targets */ +extern const struct tsens_data data_8916, data_8974, data_8960; +/* TSENS v2 targets */ +extern const struct tsens_data data_8996, data_tsens_v2; #endif /* __QCOM_TSENS_H__ */ From patchwork Mon Jul 9 11:43:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141393 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp2563717ljj; Mon, 9 Jul 2018 04:44:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfsbR1Q4rl0obgpJFE0BSU0HzfCs74LyFw4yzouATW1L+ITTr/vjv72qcIEn+YS+h+svLo7 X-Received: by 2002:a62:828a:: with SMTP id w132-v6mr8200096pfd.121.1531136686095; Mon, 09 Jul 2018 04:44:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531136686; cv=none; d=google.com; s=arc-20160816; b=y520ZcP5cM6GyP/JlQ0PGXjYULQldufBbrJmv3pruFJkg3bXGEgyDfb1BAVOX7fCdF HcflEpHh7CTuyghux3hJ1+6qn+szfy0QlRHQFE4tSNocOX9H80fyX9V6i/NDE4Y/y1zE ola03lehgOjolgTlS8jRbM0kqrPwbXXgIUWKByq/0m834/wlsFMx0o4ztimf1OIha/Gl lMFfFPGk1GCotVNFbvQWc3YklCfohVa6tol7kC8A+fndum0lGL8qZANUPfTK8KCDp+2T DYEELW7xvlC0dPAyp/MyuFvvY7UkMyehW5e87mi/340gIrhAOWD0cvzHxO3QEHMklVge EVDQ== 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=Ta7IG6QU9uQXIMjNn801Ta4qAYhVBfB/2Z+Ht5f83MQ=; b=bO9zPCDOiGrTnKn1OEHhAiV9TEjL2jtWz/id2aMxZfOySZdlYn8kDtvIEGEaU0ncp1 Nx+VeASbHzmZbmNYWrEljuSxCPzACSaydgNelM8l0zo3XcXHsO8WeUs3JWCP0c89TL7m vGK9Oj06J56ayt29yOKQcKHrdctRXjMDeUHph9iWwiVbuHmoMvG+ag0jR5NgX19Y3Sev a+OZcCoDFUPN1NGBgVqYLvbk1CxFu9hfp61n3/kIzLQddziVwftPdFoE6r2f0m2MJRmI H00oWAoiyy1UCwRDIjouG3NsJ/bXxhUSt1fB24rrZdxmdAUj9d7c5L7O4M0XFdb/r/ce 738Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CFiLC00P; 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 x24-v6si14265389pln.22.2018.07.09.04.44.45; Mon, 09 Jul 2018 04:44:46 -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=CFiLC00P; 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 S932993AbeGILoo (ORCPT + 31 others); Mon, 9 Jul 2018 07:44:44 -0400 Received: from mail-pl0-f66.google.com ([209.85.160.66]:34424 "EHLO mail-pl0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932921AbeGILoe (ORCPT ); Mon, 9 Jul 2018 07:44:34 -0400 Received: by mail-pl0-f66.google.com with SMTP id z9-v6so5925793plo.1 for ; Mon, 09 Jul 2018 04:44:34 -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=Ta7IG6QU9uQXIMjNn801Ta4qAYhVBfB/2Z+Ht5f83MQ=; b=CFiLC00PdmvxxS4DWrqNLL2khUpysqVR9W5y8s+6Nd759wpdjdIV2oxPaNQ1bBy0Os z8SkqZdO227jVfb0T7jF6gIKdLSce6lnHMOkU80XXBKpRoSTsnqh8ff1qPYhl30pzakI 9pJ4wCJEddidbDIemgPT0oUyjxjs0IIkc5/Cw= 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=Ta7IG6QU9uQXIMjNn801Ta4qAYhVBfB/2Z+Ht5f83MQ=; b=NqEvei0jFk3fsuFaiLGipiRd1NcW1fD4hwZQqhILXPBmWHrFxNxR2LIk8wKOkmTEEg oOknk9GxD8UV5LvmJuicmt/W5sOf2/3Q9O04Q0jcyOFMyKIVn6Yw0i+xiOxeMzoeT+Pu L1LY/2DfQ4Gpm82ZRKFQjcZS9OwhQGKAOoJo0Y+BqjHV615cCJGDLwizJqhvf0qj71SU Dv5Q14OwyuC1D3KGglPcQBgD1bVGLo9z1c/53c6nKhq9I+hlminbgweo4C9k/aGtW3fM oNErfVz9JsJnkEIuaBH1pOSBpli/rKxFJGVKT91Scc1XhX8OToGG8WPR8uPTOXY3Q2Ga Yqrw== X-Gm-Message-State: APt69E1Rst6Chvbfsz0/nhrJ5fsHWsNlJ39HX5Mf1sl7X2DBAOO41dka 634Gj8qayuNBfzd4XCvjj4xArlvd0og= X-Received: by 2002:a17:902:8309:: with SMTP id bd9-v6mr6236123plb.321.1531136673840; Mon, 09 Jul 2018 04:44:33 -0700 (PDT) Received: from localhost ([103.249.91.93]) by smtp.gmail.com with ESMTPSA id n80-v6sm5409828pfb.95.2018.07.09.04.44.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 09 Jul 2018 04:44:33 -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, smohanad@codeaurora.org, vivek.gautam@codeaurora.org, andy.gross@linaro.org, David Brown , Rob Herring , Mark Rutland , Catalin Marinas , Will Deacon , linux-soc@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v6 7/7] arm64: dts: sdm845: Add tsens nodes Date: Mon, 9 Jul 2018 17:13:29 +0530 Message-Id: <65c39c405076627bd43ec94c211c6998191b9f16.1531136000.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 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(+) -- 2.7.4 Reviewed-by: Bjorn Andersson 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 { + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; + reg = <0xc263000 0x1ff>, /* TM */ + <0xc222000 0x1ff>; /* SROT */ + #qcom,sensors = <13>; + #thermal-sensor-cells = <1>; + }; + + tsens1: tsens@c265000 { + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; + reg = <0xc265000 0x1ff>, /* TM */ + <0xc223000 0x1ff>; /* SROT */ + #qcom,sensors = <8>; + #thermal-sensor-cells = <1>; + }; + spmi_bus: spmi@c440000 { compatible = "qcom,spmi-pmic-arb"; reg = <0xc440000 0x1100>,