From patchwork Mon Jul 2 12:44: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: 140749 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3953949ljj; Mon, 2 Jul 2018 05:46:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJiqUMEbIZfqz9+/x4SnQYVB7kfkKoYdt5W+cgKc2voI1dg9iHia/zGwHmwZrW2JTByXLru X-Received: by 2002:a17:902:1101:: with SMTP id d1-v6mr25273312pla.147.1530535587718; Mon, 02 Jul 2018 05:46:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530535587; cv=none; d=google.com; s=arc-20160816; b=AQwe1LMcphY2LRSTbZIR6AHm+ScYKQ67fZ4Co8wlLjPMz1zaexdKGfPOAfBvGErN+j 2+/XeSoN7X23vBOjdcmRrUG52zdeqrGWCsh3pk5RKBKP/lGwewyzg+bSqZUr6ejZPvpi SISu5ttGMKHyJ1S+m1/FcTqxoW48rEyHrYRpjrtVAAACyjJCI5d+sVHbPlNRohyotQ6+ Bx675q3LJ5CyCF7PCUqzeBve9+bjF6zMrPBCERBAuFJ09UUmsLsr3w8pKjFzaTTbheom LRqJfwKQMj45oEYMAjHQoakiauIl1xz23dolz5iPwR8JzKVtIe7b2zFhD68mf83RfdmD 8hZQ== 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=L/L01C6WzvehucLFG86xEOcsywazU6bJIjWYV/jdL9A=; b=CSAsnTTxmz28ggF3GeilvViD2vlQEE+4h9tHTLO5/y5twKnYRRYGzlcpeS74ahyaD6 0qNpon3X0p3RwZ2FV4BkG5pccKlvvl23agPoR6qUoQY8/EIupv0BPWMblZNCil48RAVk G3TsA/AkNvNeLEHC24CgHA4UCWxZeAt7Wqh4+lwNjaPCZOEP56w1+GkFYt8rYFtVl0/i sFcMpa9aJHCVKqcWZQqT7wCc76aI+Enj2xnQPpKzklpixgZ1b5elPNo5PZrhR1GDDArT S4FoI88uXAbSJ7Ze3nSqLY5b94T4m3exxjVe1RsZYMkdMyV1GS6Iwe3cj0OQNjByxJ38 6MEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YNbfDIkv; 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 x1-v6si16039686plb.8.2018.07.02.05.46.27; Mon, 02 Jul 2018 05:46:27 -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=YNbfDIkv; 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 S1752682AbeGBMqZ (ORCPT + 31 others); Mon, 2 Jul 2018 08:46:25 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:43067 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752969AbeGBMor (ORCPT ); Mon, 2 Jul 2018 08:44:47 -0400 Received: by mail-pg0-f65.google.com with SMTP id v13-v6so1479939pgr.10 for ; Mon, 02 Jul 2018 05:44:47 -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=L/L01C6WzvehucLFG86xEOcsywazU6bJIjWYV/jdL9A=; b=YNbfDIkv1EjO7xDgiMjB8NC5orZPjuTJyaKKC9/kiGNvlyvJJn6xdotR+1jA7hIFu2 i3/l0+XNtqdwvlCQqQIVvroor5c5nfJ4p3n1ehKPQ7tkAFKsTSTOcUmXmxUeB84WEYSx EV6AxjLwexDrpRnh2NHMhy9lZfOozbjA7gqxk= 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=L/L01C6WzvehucLFG86xEOcsywazU6bJIjWYV/jdL9A=; b=iChSzGcRW39MA2AjZryKm/RHL/ua2DzFTr3qyFNfhKUALVP8woyM8JSv9uNkrSITHL SHHeqdZFDK+XF+dxUlYqApDZ0HvIUerZtx7CpWRDKCDVWJMV+NEhz1bNb/xtm91RkYUi AgO/Q+hbkgQ0hGBGCXgnxfS4nTUTvksg4sqr/NdKohpVkPnSyl8l4oioEXjwxhzejraP Pq6uI4RB/NgsQcFCFZbpojhFx7QtyD9Yk0VeOMjvVIeXYs0I2tQCUqPdbkBXCWJZxG2T jIKUZ8DSSPjtzulOG9tJhBIOYvBivW/39ztYV8TJQkKvQlGBzHvytfakAr7O7k6iQ7Nl Lviw== X-Gm-Message-State: APt69E3Vt/agNkqkXXnrBvowYvHwCb7KlwKXld3oEUtHChPQ7c7sYze1 gM96T/BLiUMsSlZcGjGRAl78ilnj4nc= X-Received: by 2002:a65:428b:: with SMTP id j11-v6mr13315320pgp.200.1530535486136; Mon, 02 Jul 2018 05:44:46 -0700 (PDT) Received: from localhost ([49.248.63.129]) by smtp.gmail.com with ESMTPSA id z10-v6sm26418883pgo.58.2018.07.02.05.44.45 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jul 2018 05:44:45 -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 v4 3/6] thermal: tsens: Rename tsens-8996 to tsens-v2 for reuse Date: Mon, 2 Jul 2018 18:14:06 +0530 Message-Id: <7e9beaa3218b1c46ea6a7399c5978c1538fce261.1530533998.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 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 --- drivers/thermal/qcom/Makefile | 2 +- drivers/thermal/qcom/{tsens-8996.c => tsens-v2.c} | 26 ++++++++--------------- 2 files changed, 10 insertions(+), 18 deletions(-) rename drivers/thermal/qcom/{tsens-8996.c => tsens-v2.c} (66%) -- 2.7.4 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 e1f7781..2eca7ff 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 0x10a0 -#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,13 @@ 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 Mon Jul 2 12:44: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: 140746 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3952641ljj; Mon, 2 Jul 2018 05:45:10 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfPNXWYNqz5roYCcBQTkjFYMsi3BpqP9Exi2JiaIlWplMAfvDOc4/SpXAQLpkVo9zhWhx7t X-Received: by 2002:a63:6e0a:: with SMTP id j10-v6mr5037831pgc.321.1530535510426; Mon, 02 Jul 2018 05:45:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530535510; cv=none; d=google.com; s=arc-20160816; b=A7tqitYM89yL2Zz+3trIwJU9284ocb9Qg6r2XOq3cVW3pRlzljtjF05iP+AGC8WMl+ OqmdKktSZTUSZb9Wa/SBPS98HhgwM1Ut2VVTwQzPWWc8rDIX4wDbctpeY2YByIXf5LBW xnGaFHsJnkVBE7nQ7H6oe0ODh66G1kMwnhdSQTic73mSA29qlAnQEr4bYEqtSyJhIG0F 0kB1R0ExEHcyWJISZH7LIXYbR+0n3Hddxa5M0hi4LUw2xXKufm2gVgRU9GhnsNAo27s/ eFk/sYV+eBcwst0ufO0oBIPMdA0NWTWsZqtMzrMNnCsD70dH3tyC24MaI42cSx0I6qOi YPWw== 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=p3koVhtRRzyhzphTmu+qmrI0x4JDa4s0PSex5KgY8no=; b=X2HtH4W77jfsBQ4Otcr466BKRImbpaYsx1wG9S9fRHyFGr5EX/Gp23nwywJbbmMcGd gAwo5cg72gD0jbVz7MGm449wQXPPRUiYL/o3YaenuvqaDNUCUdFWySQjgLCk5DkfhdXy DnwaOK5XfhAMPkTZ+9OKZdpNlthKrK8Xnz8xrV+dgRNyGR5Tmfshm1+ZRZNB1YYWToEH 6JnSxini3DEXrp7mQJsg3qGgCKKCCFlio4ur2XqFocG+p3kbfTfrntFnPPmu0nVweg0y 4qbZ73tTgkTFv++SLRg4LiqTXpi4SwLSItTBjjqviQ/b4YhzfBY51AHXM01SunLREkjM IdJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iMAf4CMk; 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 v22-v6si16000134plo.123.2018.07.02.05.45.10; Mon, 02 Jul 2018 05:45:10 -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=iMAf4CMk; 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 S1753146AbeGBMpH (ORCPT + 31 others); Mon, 2 Jul 2018 08:45:07 -0400 Received: from mail-pl0-f67.google.com ([209.85.160.67]:37293 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752146AbeGBMpD (ORCPT ); Mon, 2 Jul 2018 08:45:03 -0400 Received: by mail-pl0-f67.google.com with SMTP id 31-v6so7915247plc.4 for ; Mon, 02 Jul 2018 05:45:02 -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=p3koVhtRRzyhzphTmu+qmrI0x4JDa4s0PSex5KgY8no=; b=iMAf4CMkixc+6N4DEsUC+7GixyaVLiWNzVPXziMW0IhO6mxTMVfxYpSwvwENQdlKZc 5JUI+HpGPrnWnItKuszB2UUA/cjwQ2fr5EZcolwVdu39ea5JlbdXgShEZ2aSeMffdvS4 dBGoSokGFrgdG2+wu4oiD+ywb1VAhVpMmpGQY= 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=p3koVhtRRzyhzphTmu+qmrI0x4JDa4s0PSex5KgY8no=; b=Vlx+zrpjMW5gxJs1y8/gehOOpsoaauLXTliUXOHokdpyzNH+li0Y0/RAaKMIxoxJVt fnfzosDGakKLpzju0wq4ojhYuHra/VdJAEI6uRLyX3ReyvXDTXT7gQLX/etJETbUxTcM EQuH52UCwYQFeNiVR5l4pV484eQ5Xl9qBgi7Ng+gxib9OQIC4e1bOe6zWgcEt+osRDk4 peXovAgC8SkdRjMrDzuHbnwEg7hQEZaSFi7TwOxDUpl/8bbjdxjujO1aJP+g5MLYXdfl rdd+HsZtMFR8Isay0LBufGU2wuz+1jtKDsTUbza9o/wUZwoI8bt0qB+Z1B/kSxcONlrj tgPg== X-Gm-Message-State: APt69E2lrO0RhwEgbjk6d5GqR5AwDvtIZ/DiLJKVOhBgfg3BhHKfKooB GKs4OM9HvTM4W+aeEZAixlf7PaMPRMw= X-Received: by 2002:a17:902:7202:: with SMTP id ba2-v6mr25198257plb.119.1530535501540; Mon, 02 Jul 2018 05:45:01 -0700 (PDT) Received: from localhost ([49.248.63.129]) by smtp.gmail.com with ESMTPSA id c85-v6sm8483724pfd.110.2018.07.02.05.45.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jul 2018 05:45:01 -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 v4 5/6] thermal: tsens: Check if we have valid data before reading Date: Mon, 2 Jul 2018 18:14:08 +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 Signed-off-by: Amit Kucheria Reviewed-by: Bjorn Andersson --- drivers/thermal/qcom/tsens-v2.c | 9 +++++++++ 1 file changed, 9 insertions(+) -- 2.7.4 diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c index 1871945..0473f33 100644 --- a/drivers/thermal/qcom/tsens-v2.c +++ b/drivers/thermal/qcom/tsens-v2.c @@ -7,6 +7,9 @@ #include #include "tsens.h" +#define TRDY_OFFSET 0xe4 +#define TRDY_READY_BIT BIT(0) + #define STATUS_OFFSET 0xa0 #define LAST_TEMP_MASK 0xfff #define STATUS_VALID_BIT BIT(21) @@ -19,6 +22,12 @@ static int get_temp_tsens_v2(struct tsens_device *tmdev, int id, int *temp) unsigned int sensor_addr; int last_temp = 0, last_temp2 = 0, last_temp3 = 0, ret; + ret = regmap_read(tmdev->map, TRDY_OFFSET, &code); + if (ret) + return ret; + if (code & TRDY_READY_BIT) + return -ENODATA; + sensor_addr = STATUS_OFFSET + s->hw_id * 4; ret = regmap_read(tmdev->map, sensor_addr, &code); if (ret) From patchwork Mon Jul 2 12:44:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 140747 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp3952984ljj; Mon, 2 Jul 2018 05:45:30 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK2bE/dGbqgOcWDzy311TZ5olmIWUN94DeaRe7bpyNAoJQlWPF+n/tyaLdEYWYsmiQLSXV/ X-Received: by 2002:a17:902:28c8:: with SMTP id f66-v6mr25957553plb.60.1530535530132; Mon, 02 Jul 2018 05:45:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530535530; cv=none; d=google.com; s=arc-20160816; b=MG4vGYZFYWZG//Xu7mx55n+NIy7JxBdCKDKcSn9TlI4sUuTM2YYDeNzrijgeVLyeQZ e6t8KW6xukMlRM9aFADuCbYLDv4boFxuorD78Pyx4tgXsKScvTjHSPVpdcojNsPHw6n/ fgv6oRatA1smdLJrVOOYtPtiqaU8MFmHJz3FUYFEFv+6Gq23JMH/zeZUyOQX47JCQN9p kvvFugl054UvOPFUUIdWC9T+cq81fRXGhbreDIcAUKWk6ngDjifoLmkrPwL8toJgm6td 1huEgJtaDjNUBstQ9y3Lhv1d5BILj7GYzQFitHNgQH4kFRQxD0cYXaB/GGKMHm/BnHuM cGfQ== 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=I/Cu+imGJLbvwzue17C4MFRuKRC0pB6hIVYE9HwvMj0=; b=UBkymG4XQ0CN8YxHLYWd1Vf5PoBzyIkhf4wGlVae5vKps3M4dzb1nOSePLNYvHTJpp dtglcd1j1FR/eygsiOmeXhm83XrJ6b834AKxvJlh/6xxQ4yZdadEMMYJbBjyTlhHmeOl aRPFmkkN6BzM1zcEIRbVSMUL7Pe13l+ZmeGSo4Uw1AJ8/NMjBjoilx6q7/XxL/VeYU2t vwJhpzd3jZT4Uo1dVd2L2wvI42rlh1prq+z0TTHi/GyZOiIAVmGLQ6VhWTIeWwQNszwu +6aoLdP0A12dilozKq5kUoKmgwk+IP4xnxeURkbBgq55OahkGiBqJjTpGZx2cA2RM+4u na2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kBzC830o; 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 v22-v6si16000134plo.123.2018.07.02.05.45.29; Mon, 02 Jul 2018 05:45:30 -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=kBzC830o; 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 S1752862AbeGBMp1 (ORCPT + 31 others); Mon, 2 Jul 2018 08:45:27 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:44491 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753116AbeGBMpF (ORCPT ); Mon, 2 Jul 2018 08:45:05 -0400 Received: by mail-pf0-f194.google.com with SMTP id j3-v6so7471929pfh.11 for ; Mon, 02 Jul 2018 05:45:05 -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=I/Cu+imGJLbvwzue17C4MFRuKRC0pB6hIVYE9HwvMj0=; b=kBzC830oj0qVC2xX3J/qCCnpjKYz5m/boYyHTlcwF+sOgnTwLztXfOsiqE/OroEto6 fI6vPzQeagWSuNOP90KRPZdZBw4QS+CBFZERNpdg+AExGZSTlcUDc+U8esnuHSnBuAgD V1IFIMdiKZzZrh1zx88+WSGXOu0sxAcMjagGE= 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=I/Cu+imGJLbvwzue17C4MFRuKRC0pB6hIVYE9HwvMj0=; b=OSi9W3quRSaX3HJrqf27kzxi/icHxq3y/eRpiZ/ouegathClUQURwqViMotL/ecBbV h92ibBwt9OyfBcBQ+/Z+kk6dza3+J9KIcOgt3JQR9dJyDpwcYWqfb6W+8kYHJNtR43nh LhcnvXKrYzKCoVN8ruXjCjR9kDqmprDS21IP4bM480X9WtBf8vsQEjEIwpdvUsShw0WN 59Sefa1Im+OYAj7MK8kWvz4YA0Z/6ItkqZ6ELKNC626PgZnBPW+Q9QKZv3YSQHbwGmi/ GYiSvFLfPThWwWeCcxGfrEjccJlCJnUtwX10c6eJE0ubmYuC3/TlKbCPmeJQi37YIgDk 6PLg== X-Gm-Message-State: APt69E3rjHGxWAZU9HGiiYAuAh6bzxLRDaaeoGwGuv478ty9emqMw0pB lOBzBDJ9Wj7DomfhyCZJTyUyWX5VXYM= X-Received: by 2002:a62:d544:: with SMTP id d65-v6mr4700264pfg.107.1530535505155; Mon, 02 Jul 2018 05:45:05 -0700 (PDT) Received: from localhost ([49.248.63.129]) by smtp.gmail.com with ESMTPSA id n5-v6sm31790071pgd.7.2018.07.02.05.45.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 02 Jul 2018 05:45:04 -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 v4 6/6] arm64: dts: sdm845: Add tsens nodes Date: Mon, 2 Jul 2018 18:14:09 +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 SDM845 has two tsens blocks, one with 13 sensors and the other with 8 sensors. Signed-off-by: Amit Kucheria --- arch/arm64/boot/dts/qcom/sdm845.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.7.4 diff --git a/arch/arm64/boot/dts/qcom/sdm845.dtsi b/arch/arm64/boot/dts/qcom/sdm845.dtsi index cdaabeb..edf8505 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@c222000 { + compatible = "qcom,tsens-v2.4.0", "qcom,tsens-v2"; + reg = <0xc263000 0x1ff>, /* TM */ + <0xc222000 0x1ff>; /* SROT */ + #qcom,sensors = <13>; + #thermal-sensor-cells = <1>; + }; + + tsens1: tsens@c223000 { + compatible = "qcom,tsens-v2.4.0", "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>,