From patchwork Thu Jul 12 08:39:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141801 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1241814ljj; Thu, 12 Jul 2018 01:39:44 -0700 (PDT) X-Google-Smtp-Source: AAOMgpftF0mNR5P9qbr2COqEWKPPgprVYh3BphliAFl3xpMhhmLoGgDPA4FZuBs89a6WOfMMFuBi X-Received: by 2002:a17:902:d24:: with SMTP id 33-v6mr1325213plu.22.1531384784209; Thu, 12 Jul 2018 01:39:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531384784; cv=none; d=google.com; s=arc-20160816; b=ytB7nF9y7eQ+CTQqHN/92Q8gwiY5j3XRaAG0lxre0Yl17QvwunxaSaigyz1IWzCHjz hXha17GjuA9aZK2ojbeYVXaPW8AcBSYxEAHCa2cMAgwu1IV/egMyYqu4BOS54MGKHm2n VnwUPAVIqzzAAUC/uEdjs8K0lccw8l08dONLJ0FT6u9N2Mz5N3oMFLydsdO4+XjifW+w n6F8+ToZgRgOldDy8kgtgOCtzKXcudl0y+mqYEFmCYEoVeVFA9Nowtl12gQfhVn4beIk VLvv6gpwq7yeEyqjIbHFO9bLA/sYfLW47ChZw6W/dO1V1JuVyeuwvK7TpZDxi3ZmdXOa kecQ== 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=wpYbk5rcyJ5//drPAdl8NqUEO8qLDEnBQNfgS2eY8w0=; b=NDV0FBtpNdOV3ESaUOpaoeRYoGUKHBBjim4NYWLwfD9LpZ7thR1DvtM1mLNC/i2OYf 0WKuaVTyYco/PPZDu9j8tDn5qmJHBL0O1WO878Mp0e0SL+6QsSWZpi4yunUTYxylfx+9 s2G53osc0qnONi3lktJPBBWhJXDd0YXNJFIA+mRerHVEMrpvUFnILjlx6wLTwVHv+mF1 rmGSK1Ew/0TjHkPsDXtS0V8tOx19Wwa3/szpStQb2n7NNgId6uTsHLSgX63iGITqlFsz ZT2cTBNLKdQAYnoXL9Zkkv8QoaMDKfk1uvWdOFqebk1ff/BBs5aVu85gkPtHU4T3U9zS mFoQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=a3OWoL4V; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 f5-v6si23550818pln.414.2018.07.12.01.39.43; Thu, 12 Jul 2018 01:39:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=a3OWoL4V; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1732317AbeGLIsR (ORCPT + 13 others); Thu, 12 Jul 2018 04:48:17 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34659 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726623AbeGLIsR (ORCPT ); Thu, 12 Jul 2018 04:48:17 -0400 Received: by mail-wr1-f66.google.com with SMTP id c13-v6so20751195wrt.1 for ; Thu, 12 Jul 2018 01:39:41 -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=4oDCvpizcqb4/i72AEYMNJaEhphPFSx5aHBq53Ho/iA=; b=a3OWoL4Vp80GEEuiDKAcU/ezGaF6QUXrPPqun6YOEM430ATQ/tv6xlqMWYN3C8kLVy sc5M+Ai2YZDqebh5I3O1+kU1zQw52Hy8Ui1nUaiEhvTxGvri4U/YivldyJ5MVvMasv01 dH15X6u//xcTAQKZPItMYBCW0a+adlAg+PSV4= 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=4oDCvpizcqb4/i72AEYMNJaEhphPFSx5aHBq53Ho/iA=; b=nxw91qJQuYRzN9vpAD73BR1ykMm7fw5mPsMzIUDxW2i6KNLTZLo0nF/Omkb6SRA5AI 3pHiiJnPshRVD+ipM6gZOLzFeFzoV6XGTSZshUlR0H5TUGx7SC+kGfNjcr+DpQ1yoaid 7wM0p62RbH4tS6N0JfEsOiO/8LKpMYXLzdckSa2MG6BGSXjrg0oHMJpDhDOQsEoCTAjv UT99yV4xN9WQyAIVsHIeR6Ye4KMXY14rFXqauKS7kPQaYoZsQs8aSWVjuHq8yjzyRf9e bCx0xgf0c0M/K6qKjjTaGHv5K395GZ0pfsIc8P8chaVCVtwWHRyghle2KiA3OelVbvB/ 2vlA== X-Gm-Message-State: AOUpUlFE2HGM2udybA2RvJhca44erbtfMQBI21WXydr27h+qn4yItthN Cbr9HhPsJwVBx4tK96UZfFJZhw== X-Received: by 2002:adf:c554:: with SMTP id s20-v6mr1048205wrf.46.1531384781236; Thu, 12 Jul 2018 01:39:41 -0700 (PDT) Received: from localhost ([103.249.91.93]) by smtp.gmail.com with ESMTPSA id q8-v6sm7631341wmb.3.2018.07.12.01.39.39 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 01:39:40 -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, dianders@chromium.org, mka@chromium.org, Zhang Rui , linux-pm@vger.kernel.org Subject: [PATCH v7 1/7] thermal: tsens: Get rid of unused fields in structure Date: Thu, 12 Jul 2018 14:09:02 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 Tested-by: Matthias Kaehlcke --- drivers/thermal/qcom/tsens.h | 2 -- 1 file changed, 2 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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 Thu Jul 12 08:39:05 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141804 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1242190ljj; Thu, 12 Jul 2018 01:40:13 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdsF5WvF0u+q0AbQ6XXzFGp6XD9jmZap41dBzSXXYsfyKPpEw0qzhoQVMflS6VRmORD8zII X-Received: by 2002:a65:428b:: with SMTP id j11-v6mr1240391pgp.200.1531384813172; Thu, 12 Jul 2018 01:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531384813; cv=none; d=google.com; s=arc-20160816; b=etS4+Sg5WPTpsl04DwUZ3Bm9Va7vWYfwQo8pysFPbia4Gpu57ftmfnYGpFlzc4AiO6 VJF0vlWgF0yCvx1cVP7c2xNWeYYLpQboQU5XA5W1Fk0WSGg1N7kxbDl8oNo4aDXqIvl4 9AA5WvOuxCyzoZMzk3Z+RWuMCpSbVqAnEBu6hs3ihrrAyowu8oLrgc71rjrEpyGcLVPC m31j1jnvyd2hNOn8pW93Lu347xoV6I4wVambJhMBRO+35CT9xZoZd3D92KQEScl3QSaF r27cxg+buvnDTuF3YtqZXBOgJEqQZ8w09ig8x7c+OdKHPdBMcuMoRGbV6VkJxEo0EKnt HZhA== 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=0fzH3pVjhD56x3Jj0wgn5u0Bcn1PKQEEcsMM2JK+1Fw=; b=nQUamjDKrNSy894TG0/xG5zorpVD5yGfoindX5PZ866vio1trnqU7wOuW0IUdBnEo3 V22MjInhgUe86dKpcz3iIG/zwioLATDY4LnKEuRQR6AhGa0Oc6tn8MDAkHPRD6y+QJwb ClSrI4nSCvk/y3FIylYlmdDyvmQAWNdLlLx1Zp1fV9eVLQ7Xdu0kF9JOJ8eLS9qHP67g WuceaE1pVjPr1SNffQ0cvNSrmU+hCwHPPGVzuCqZaP3Sg5pl+MHFFSct7TxKoBQNqmvp HoLaRgqmOAAqCTQheK3Kpttabq16zVopiSIZSUghcIDjjLuXL7X0uYBo3CBujfn2wYPs VdlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Tcb3f1EJ; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 s22-v6si20930307plr.498.2018.07.12.01.40.12; Thu, 12 Jul 2018 01:40:13 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=Tcb3f1EJ; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1732488AbeGLIsq (ORCPT + 13 others); Thu, 12 Jul 2018 04:48:46 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:33284 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732449AbeGLIsq (ORCPT ); Thu, 12 Jul 2018 04:48:46 -0400 Received: by mail-wm0-f67.google.com with SMTP id z6-v6so1488772wma.0 for ; Thu, 12 Jul 2018 01:40: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=/Jcia/6RdTo1f61k1V6jn6EIFW590aCTA6rf2xM6d8g=; b=Tcb3f1EJ1khAr5wXHhY6J/8jm8GT6vjNrKuf7orWkO5GIP1AH+8XsXIJ67qgBYznt4 li84hbj0LvP7Vq6OGQkZpU1jOqeCepOtn0MaX1Hpb0qV7KY0q/+wSZ9Han1bS7rGu3wz f947CHj093qKhEEycz15qsMxdfS7uc2gAJqNI= 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=/Jcia/6RdTo1f61k1V6jn6EIFW590aCTA6rf2xM6d8g=; b=CUHzKOW7ZnRYKNrKIpTUWDpXo9WQIGp3xXAFcoshIQKEJgoQHXHfetM9K+9nffyJbD mHX41aUlua402ZH2nlt7Mo1Axh41xKnpEgavg2XZDslN1BYgDdflxFm1BysdavawYtzK yz1rejN/rm+f6LmpalrxWndAVBrAwyi1GD9OPauNg2Xi3O0OOyUY1IaoxO22L4EjLQcg u0whX4S2bPFHTgNjAjdVN+RCtCZF62NamyCPHmjr0Atu+lIT9R8J6Ky4tT5GAJIcRJe8 KtgcTWa9DOce0qAssPO0wDmy72L5+zrMNDSAImXr3Surb73h5/8wr6F2li9qiYdxGk0X fEIg== X-Gm-Message-State: AOUpUlFkYsTwwxR+c+k8W2yaw6zUz0/VG2Sxt8PfnuPNYeMMokEBO86Y tkX8jqwpxQqqqVnUcLYQqzTH1g== X-Received: by 2002:a1c:1802:: with SMTP id 2-v6mr696778wmy.81.1531384809847; Thu, 12 Jul 2018 01:40:09 -0700 (PDT) Received: from localhost ([103.249.91.93]) by smtp.gmail.com with ESMTPSA id r17-v6sm22764677wrt.44.2018.07.12.01.40.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 01:40: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, dianders@chromium.org, mka@chromium.org, Zhang Rui , linux-pm@vger.kernel.org Subject: [PATCH v7 4/7] thermal: tsens: Rename tsens-8996 to tsens-v2 for reuse Date: Thu, 12 Jul 2018 14:09:05 +0530 Message-Id: <3bd2c05db1bfe6fd3891abd87b0c767152346a1d.1531384019.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The TSENS block inside the 8996 is internally classified as version 2 of the IP. Several other SoC families use this block and can share this code. We rename get_temp() to reflect that it can be used across the v2 family. Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/{tsens-8996.c => tsens-v2.c} | 25 ++++++++--------------- 2 files changed, 9 insertions(+), 18 deletions(-) rename drivers/thermal/qcom/{tsens-8996.c => tsens-v2.c} (66%) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Matthias Kaehlcke diff --git a/drivers/thermal/qcom/Makefile b/drivers/thermal/qcom/Makefile index 2cc2193..a821929 100644 --- a/drivers/thermal/qcom/Makefile +++ b/drivers/thermal/qcom/Makefile @@ -1,2 +1,2 @@ obj-$(CONFIG_QCOM_TSENS) += qcom_tsens.o -qcom_tsens-y += tsens.o tsens-common.o tsens-8916.o tsens-8974.o tsens-8960.o tsens-8996.o +qcom_tsens-y += tsens.o tsens-common.o tsens-8916.o tsens-8974.o tsens-8960.o tsens-v2.o diff --git a/drivers/thermal/qcom/tsens-8996.c b/drivers/thermal/qcom/tsens-v2.c similarity index 66% rename from drivers/thermal/qcom/tsens-8996.c rename to drivers/thermal/qcom/tsens-v2.c index 3e60cec..44d3736 100644 --- a/drivers/thermal/qcom/tsens-8996.c +++ b/drivers/thermal/qcom/tsens-v2.c @@ -1,27 +1,18 @@ +// SPDX-License-Identifier: GPL-2.0 /* * Copyright (c) 2015, The Linux Foundation. All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 and - * only version 2 as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * + * Copyright (c) 2018, Linaro Limited */ -#include #include #include "tsens.h" -#define STATUS_OFFSET 0xa0 -#define LAST_TEMP_MASK 0xfff +#define STATUS_OFFSET 0xa0 +#define LAST_TEMP_MASK 0xfff #define STATUS_VALID_BIT BIT(21) #define CODE_SIGN_BIT BIT(11) -static int get_temp_8996(struct tsens_device *tmdev, int id, int *temp) +static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) { struct tsens_sensor *s = &tmdev->sensor[id]; u32 code; @@ -73,12 +64,12 @@ static int get_temp_8996(struct tsens_device *tmdev, int id, int *temp) return 0; } -static const struct tsens_ops ops_8996 = { +static const struct tsens_ops ops_generic_v2 = { .init = init_common, - .get_temp = get_temp_8996, + .get_temp = get_temp_tsens_v2, }; const struct tsens_data data_8996 = { .num_sensors = 13, - .ops = &ops_8996, + .ops = &ops_generic_v2, }; From patchwork Thu Jul 12 08:39:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141805 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1242251ljj; Thu, 12 Jul 2018 01:40:18 -0700 (PDT) X-Google-Smtp-Source: AAOMgpckHz5iwvRp33uPJv52DCd4IV9PohC/qws6a6VwPJLYI8qkV61e2iqeKSyKi6fH362D+LF5 X-Received: by 2002:a17:902:4424:: with SMTP id k33-v6mr1289041pld.242.1531384818679; Thu, 12 Jul 2018 01:40:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531384818; cv=none; d=google.com; s=arc-20160816; b=yL/Jfjmzyx0pxiGgPgJQARVb8nBsJjsmqC5Qbz+KSuTrPtPEzIHS1glNd7ervIWZUk UC4gNbbm4vCM0q+L3+QH/a2Vb5/QeY/1YK7nw81Quv8GYJ5rTpVVB+3PFw68CtN3FWWd gq2iMwqoEECGRG+41KB5kkQar18t6wrCiqIbGFFL8A8iVCFjCf2HM9QY0CR1jh092zaP ORJVWAV1kAsiWBIFhx/K4oGtB8UMyo5/PDlZ+3hfvcw3wqevmB/Vhw9CI7m/2MgSbtDn s72sdm4K+CYOwsgcxalXxd4RDdZjwlfgg3hJieUNfgZaC9MYOctPG8gATFkrzuq+nE9q qbxw== 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=87wSDx+vexmmWqL1OtxaD1UAffFBwrzG1X9ioY0ysh8=; b=GLHqJlLVMe2dY0354wXhZsA9Ad8YkqDz6ehqCPYvoxkiw0v9/fDZIVQ+6E3tacgDQn VC+ZqsU+tikK82IdO4zXix1QnE4uKmJBCaqhtDwnKpPxOfljoMi/iWOs9fD2XoQfs2D2 +i2PTKL7aiQhWoDdz2JPaiUsaNWbeeMEv5H0fMtO1pdZXLeExF2IFWynefvfKHe2+Hw/ YzNfkmi/F5Nz6m7UXff99oNGfU3mpW6eg8uWeXqQ84hsjNKr6jmUDUjj3aLwqBZ1udxN 0J6ZzMdxo98UTm3/BoHWqyyzXrp7MvmYhyelMS8KiyaPZjiYuYa9KmuwZnPc/xT5Bbc4 9HOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XpPlh2nm; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 b23-v6si20420837pls.341.2018.07.12.01.40.18; Thu, 12 Jul 2018 01:40:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=XpPlh2nm; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1732510AbeGLIsw (ORCPT + 13 others); Thu, 12 Jul 2018 04:48:52 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:38322 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726474AbeGLIsv (ORCPT ); Thu, 12 Jul 2018 04:48:51 -0400 Received: by mail-wr1-f65.google.com with SMTP id m1-v6so8073942wrg.5 for ; Thu, 12 Jul 2018 01:40:16 -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=Z/Epa84MInFKAspg0c1M9qw1LPPX0QzXvaRtMaKoXvI=; b=XpPlh2nmPQe9Q1iTS+L3nE04p1J3EeifQ+V0qTbLqfghrjK2wryGCzAzc9wtDIJc6+ +z8k+XImaeGz7SnyswlG4azQ3HB20Hw/zigxdcvDZw0W2XZ5Sc27tn87ZOXhbhATbn2H 4auyTxKM3TkZWTT9tYjkyyMdIflDwYzxekBtw= 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=Z/Epa84MInFKAspg0c1M9qw1LPPX0QzXvaRtMaKoXvI=; b=pmF2m/Y1CB7LP5BGOn3P3oFgChxR60kGAplky7cDMFglIdUBCooi/w0K56AnEYWz3R MT/ZvVbJa0m3o4OhAEeiTTtXWNlVxFoHBgGz9j1Sd3OKEfHW4lBAEjMouxhl3YNxvUik 84zglQYJUBTp45RAjlTXzs9GEhNdGRjsvdV/S/sQ8jybT4L2JM4vGYsFkkP2Ugcaiw7I H3HH+xhrlzprLPMwxdcQquA/IZvDLByamL9nmbrplp5SLF5ZJgSALT4iXfwZTKb96bkz k/Uvvp+klO5jwiq9JEJqxExOEvePva0+X8a4ZrY6hzZESwCkyH+tcMre6/op+1s8zMgr ApBA== X-Gm-Message-State: AOUpUlG1cH5k7YTF/QgGgtksiqqCDS3piMTxHvJxvHSDqETvNcDzuPPc crwXGo1ltwfOzOnQHDjiWvhZ5Q== X-Received: by 2002:adf:9d46:: with SMTP id o6-v6mr973758wre.51.1531384815812; Thu, 12 Jul 2018 01:40:15 -0700 (PDT) Received: from localhost ([103.249.91.93]) by smtp.gmail.com with ESMTPSA id y203-v6sm5760396wme.42.2018.07.12.01.40.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 01:40:15 -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, dianders@chromium.org, mka@chromium.org, Zhang Rui , Rob Herring , Mark Rutland , linux-pm@vger.kernel.org, devicetree@vger.kernel.org Subject: [PATCH v7 5/7] dt: thermal: tsens: Document the fallback DT property for v2 of TSENS IP Date: Thu, 12 Jul 2018 14:09:06 +0530 Message-Id: X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org We want to create common code for v2 of the TSENS IP block that is used in a large number of Qualcomm SoCs. "qcom,tsens-v2" should be able to handle most of the common functionality start with a common get_temp() function. It is also necessary to split out the memory regions for the TM and SROT register banks because their offsets are not constant across SoC families. Signed-off-by: Amit Kucheria Reviewed-by: Rob Herring Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke --- .../devicetree/bindings/thermal/qcom-tsens.txt | 31 +++++++++++++++++----- 1 file changed, 25 insertions(+), 6 deletions(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt index 06195e8..b5312a8 100644 --- a/Documentation/devicetree/bindings/thermal/qcom-tsens.txt +++ b/Documentation/devicetree/bindings/thermal/qcom-tsens.txt @@ -1,18 +1,28 @@ * QCOM SoC Temperature Sensor (TSENS) Required properties: -- compatible : - - "qcom,msm8916-tsens" : For 8916 Family of SoCs - - "qcom,msm8974-tsens" : For 8974 Family of SoCs - - "qcom,msm8996-tsens" : For 8996 Family of SoCs +- compatible: + Must be one of the following: + - "qcom,msm8916-tsens" (MSM8916) + - "qcom,msm8974-tsens" (MSM8974) + - "qcom,msm8996-tsens" (MSM8996) + - "qcom,msm8998-tsens", "qcom,tsens-v2" (MSM8998) + - "qcom,sdm845-tsens", "qcom,tsens-v2" (SDM845) + The generic "qcom,tsens-v2" property must be used as a fallback for any SoC + with version 2 of the TSENS IP. MSM8996 is the only exception beacause the + generic property did not exist when support was added. + +- reg: Address range of the thermal registers. + New platforms containing v2.x.y of the TSENS IP must specify the SROT and TM + register spaces separately, with order being TM before SROT. + See Example 2, below. -- reg: Address range of the thermal registers - #thermal-sensor-cells : Should be 1. See ./thermal.txt for a description. - #qcom,sensors: Number of sensors in tsens block - Refer to Documentation/devicetree/bindings/nvmem/nvmem.txt to know how to specify nvmem cells -Example: +Example 1 (legacy support before a fallback tsens-v2 propoerty was introduced): tsens: thermal-sensor@900000 { compatible = "qcom,msm8916-tsens"; reg = <0x4a8000 0x2000>; @@ -20,3 +30,12 @@ tsens: thermal-sensor@900000 { nvmem-cell-names = "caldata", "calsel"; #thermal-sensor-cells = <1>; }; + +Example 2 (for any platform containing v2 of the TSENS IP): +tsens0: thermal-sensor@c263000 { + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; + reg = <0xc263000 0x1ff>, /* TM */ + <0xc222000 0x1ff>; /* SROT */ + #qcom,sensors = <13>; + #thermal-sensor-cells = <1>; + }; From patchwork Thu Jul 12 08:39:07 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141806 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1242410ljj; Thu, 12 Jul 2018 01:40:30 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeHW1zvkS02g99cmdi3wHDwBoMALlRCdjJv78pLmWWBVJ5O/5OJW83MixxMp/kAa2882QtX X-Received: by 2002:a63:9a01:: with SMTP id o1-v6mr1220269pge.439.1531384830561; Thu, 12 Jul 2018 01:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531384830; cv=none; d=google.com; s=arc-20160816; b=XzBm+9Bumlb7rGOIv0RooVmnVDt/6z4yhqlxSixltjjPYhlgdti5+JrXbIgyTVWevh dtyw7EXx6fsRECIgcn0b49QbcpCAAB7ZNaepr3fvSc2JEPAowUFVb0JDghXCOZM+/Phx fWL6e0qkOT0v7H8kGF20u5OpCoGrWTDClGLh86gC2BzubXAuordUseZXLmmwWfnWp78y QYoQ/Cxyht4J9lvi9vnkletOi525Ekq/N6EjG3d0wixkQdXKlli5RR46iFkhP82LShEM vGjkD9ZZzy4z7PcGcLN0/Ceis1SWv+Ia5TALXP8zHWT6FWK969JC+dTn5xQzIWClBT31 ohGQ== 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=x8W2FZ0SFEDCIfmT4eRiDkFuO8DfzpKuaK+ZtLrZVOQ=; b=QsK177bBwOTyHNLIcHTkHmmnvx2eosaAxheAE6yPqnVyUC6mdYJ6soqEChdpIktyJ4 gAVRZ3yH43MAg1e3d3mH7QqdO7ozF00hiVAZHeOGJXoELL2OpWyuElrgbaFYQuD3W3ed TSMokcYoEilHe1OnBjJAmwktozhOLXgzluX3prgmA7GcFH8pLI93uHrwUq7PWxJslGjJ X9jw9qrRo9KTWg6M1Q2ge5eGnicg3Tyae8cS6kJiP4Tn/TY7ujW+AxsROlMMDTsLoIna uxQWEN8H1mNZ3/5LScwX7Su/YV2k7M4o/rUk+dY1uwoHsnyVZNh9pd81cM6GAMBHTRU/ O0Fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="ScWUq/gl"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 r1-v6si21322683plb.172.2018.07.12.01.40.30; Thu, 12 Jul 2018 01:40:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b="ScWUq/gl"; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1732359AbeGLItE (ORCPT + 13 others); Thu, 12 Jul 2018 04:49:04 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:35704 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725845AbeGLItD (ORCPT ); Thu, 12 Jul 2018 04:49:03 -0400 Received: by mail-wm0-f68.google.com with SMTP id v3-v6so5141674wmh.0 for ; Thu, 12 Jul 2018 01:40: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=vbAo4YPMYQgk6zgSFWvnv30sIR33ZaQ7TfJtCgG/Otw=; b=ScWUq/gloUeYlWyNN6xomryUM3I6GoUtc6E5mtv6tj6cP1pax2GRMfy71Za/UyRL/J oaDyoDRAPfEMtuLaa+CbGp/rPFk6xO9wZ6TNo5RjCKj/RO4lawt1DN1O8HvaoGAaRG1q yMR/dpzOF4wOVzJOtcxwzojyYnjblyGyziX0o= 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=vbAo4YPMYQgk6zgSFWvnv30sIR33ZaQ7TfJtCgG/Otw=; b=btvS/XXhFeVxatEM7rg85QGU+1MFPL30V6E4l9/Vwjo7xt3zjlcaO9wQ1wGHOUfyKU JDVbO8WVttiVxwoAyLsFOOed3ubgCby9MzDt96/O1UI8ddPdrQTxevhtgfzfqymWryOz UvHqOoyjTf9A1G1T95KtsjbOUa4kyhkMTEv6GUEWwyENGMskqhAN4RvL5CFo2BHr+wIo kgcCtRajzRPNsrtlke5upeu24C778Gs9JktRGWA+BPr5QfblP408kXzQVWUJrtQ+bjp/ E2xy20DYd+/XY/mxWefxC5XmGth+czW4l99rKbKG5vieItN+5J38LSF5ln1ctu0KvgXX XQ0A== X-Gm-Message-State: AOUpUlHPufeuTH58eiw09lOwwCsNulPiJF0CaQSzBick52M1VCU6+cc4 EPM79OPEM/Chg3RRTT1bU0GeYA== X-Received: by 2002:a1c:ac84:: with SMTP id v126-v6mr709276wme.32.1531384826945; Thu, 12 Jul 2018 01:40:26 -0700 (PDT) Received: from localhost ([103.249.91.93]) by smtp.gmail.com with ESMTPSA id u4-v6sm21762797wro.12.2018.07.12.01.40.25 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 01:40: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, dianders@chromium.org, mka@chromium.org, Zhang Rui , Rob Herring , Kees Cook , linux-pm@vger.kernel.org Subject: [PATCH v7 6/7] thermal: tsens: Add generic support for TSENS v2 IP Date: Thu, 12 Jul 2018 14:09:07 +0530 Message-Id: <34de426540a878bf77a77dd2c42a16678d6545a7.1531384019.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke --- drivers/thermal/qcom/tsens-v2.c | 5 +++++ drivers/thermal/qcom/tsens.c | 3 +++ drivers/thermal/qcom/tsens.h | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c index 44d3736..f40150f 100644 --- a/drivers/thermal/qcom/tsens-v2.c +++ b/drivers/thermal/qcom/tsens-v2.c @@ -69,6 +69,11 @@ 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 Thu Jul 12 08:39:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 141807 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1242490ljj; Thu, 12 Jul 2018 01:40:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpd7lWsv4WEVyPU7yKNK3qijrPulAGhpqXmK+vAEJ+iNZJKBmM1WsUZ1yayLWMQpKNSDiFj3 X-Received: by 2002:a62:41d6:: with SMTP id g83-v6mr1366769pfd.219.1531384836365; Thu, 12 Jul 2018 01:40:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531384836; cv=none; d=google.com; s=arc-20160816; b=MP202yKVc73VwAtXFLMj34UAzjVGUesmbdmajIPvj3wDXjX84pJ8w61+YFfXI2le0H wdicH2FPVtu1BDEeO848u/SqDKOLB0vpyk6ymn+eUoKLSTt0DdZeP2ZFXJvPOq7OnBQD gJp/XKrFSiBAEhlkWKs4btm9twm4GHshva1cesNL8XZsh6tHWgp7KRFpsZrd/LeXdCrb 7CmwKP65sTExLigxiA4OXw9zFGWgemL23qih2OMSG0Be56mw0PvAxE2NV6UGIAKEDj6K QnVxF8BGuURAU1jRdeFhw2u/igk5SPlIzcCyMXnWWrxNsPB0CBYVEE2q04+j2HkOWKdD llWA== 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=AaKNp6ZDIuvDhdQBOaE+GIW1Zp4tfSjeVSbLMuNI4Kk=; b=TvWmDl3FZ5El4ZcpPfztLSuin+BtuqZ7VX9qxXhQ3lm6cNIShq29IbAbxRHan+u35D UYlBMCjicZKjzsOoHYtXSWqMopOu7QniF2QklOJFBRPPnWi5x8XlNknUMEXIWjsFUcOM nHtyu4fWP2j6CEDX8ulyQVCw8GZAqYPQeYxLXM1lRyZ/Qsv0r1JnCfhTTd/+t+s2UkB5 PcHaq3Tuofc0i0Xwg3tSurLApHLr74khiQ/Zo2eDHusXmStZESwPw4geOP70RwLGGEZW 8ZnHordi6RQsUNTNqezYWCRNBeQZ9+myNLiqCHdzpZmC//OqoMxBnvC5lzoWBV31u4ZH Hxvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TGYTKa3A; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 b8-v6si21823344plb.125.2018.07.12.01.40.36; Thu, 12 Jul 2018 01:40:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=TGYTKa3A; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1732297AbeGLItJ (ORCPT + 13 others); Thu, 12 Jul 2018 04:49:09 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:40855 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727057AbeGLItJ (ORCPT ); Thu, 12 Jul 2018 04:49:09 -0400 Received: by mail-wm0-f68.google.com with SMTP id z13-v6so5119144wma.5 for ; Thu, 12 Jul 2018 01:40:33 -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=gaOY9NRaeiUkrGltnYCPQSkt3TOSQxN5osLFYQfxr7M=; b=TGYTKa3Aoi2HhgmODW8Qq1+XRJjUTd0lpRR0I1O0YajhSECFoKaYA6kSrbupgKTbZC +3rDlvWL1X8iWwsi3pin+BEQHW0XF6ftghqLHvsPJlYNEMeNmj4OQJVlEAKWKFRgbXF6 DeicoWZ1irBQH06MhWNV7a+H1Y7tjvmWXZrKI= 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=gaOY9NRaeiUkrGltnYCPQSkt3TOSQxN5osLFYQfxr7M=; b=ALMeSWth8B1IaVGF5RkGy1y0wuDiUgzDf/93IGVDGR71BYHa4ukMtgKO6Xu0YOMgee J8Y5GpHMLfSoXRNmRTSWje5pJ1i9yHutTS0NZ+MmDPzKt6IOSXXT08JzSBCXyouZsQo9 Rq8aH9CskcypbKl1SzxnPRplHdrto2Rm1bFBcqeXKcnHVH6uHRZA0iEgCjRPLoLOBXnM sBH66iXyQZu2JV2675SqkuMgWPl5IN89HLJHBnf0W5lbGW41ApHZap1bkn+hX1DcbQ0V Sm5CnmOM+QERWmpet9P0/NTlFBfcVa3RBoMI76Ph1rHGlLsnmBJLmHNeRU/ftsH+zS+j tr+Q== X-Gm-Message-State: AOUpUlHvn7M1MgIMjqOaGhnx2zbP/3mErt6MbehR1rE3h8MLnvDP0kWo ttSorROpFB5NM69x9ZOb95xKAg== X-Received: by 2002:a1c:cc08:: with SMTP id h8-v6mr698144wmb.82.1531384832987; Thu, 12 Jul 2018 01:40:32 -0700 (PDT) Received: from localhost ([103.249.91.93]) by smtp.gmail.com with ESMTPSA id n8-v6sm20484249wrn.69.2018.07.12.01.40.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jul 2018 01:40:32 -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, dianders@chromium.org, mka@chromium.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 v7 7/7] arm64: dts: sdm845: Add tsens nodes Date: Thu, 12 Jul 2018 14:09:08 +0530 Message-Id: <0dfdbfa82edced85ea5be02e1d74d73d232c7a08.1531384019.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: References: In-Reply-To: References: Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@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 Reviewed-by: Bjorn Andersson Tested-by: Matthias Kaehlcke --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Reviewed-by: Douglas Anderson Reviewed-by: Matthias Kaehlcke diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index cdaabeb..01ff146 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: thermal-sensor@c263000 { + compatible = "qcom,sdm845-tsens", "qcom,tsens-v2"; + reg = <0xc263000 0x1ff>, /* TM */ + <0xc222000 0x1ff>; /* SROT */ + #qcom,sensors = <13>; + #thermal-sensor-cells = <1>; + }; + + tsens1: thermal-sensor@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>,