From patchwork Wed Sep 12 09:52:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 146529 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4618175ljw; Wed, 12 Sep 2018 02:53:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYiJQjr6S9B9B0RWWy/CBnWZ/PaF5LXei5nEF0RAQyQSOZOX/Ug7bckPuxphDBrTx5Aqxr5 X-Received: by 2002:a62:9b46:: with SMTP id r67-v6mr1284945pfd.105.1536746017575; Wed, 12 Sep 2018 02:53:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536746017; cv=none; d=google.com; s=arc-20160816; b=EN/44gsWmjeg7Pl4q8eH6kcR35o3wBdex93+uclex/p0/HDW9wMrhc8fOwHHk+lz9+ 8mrY0znd+OY8uLrW/gExPEfTYv0D8XzlD+dOeL903MXznrRFnWbMl6Xo7CXF6sia4EVl G6s1ri8TyPchi985rHncBwek/bW9RgCRH9tPPDL/ZITYBOC4w3pVBhhlvkJkjLWB99PH aed0rKMBfHPIexrEnthgI/gyXLCE7v+hnGGjEi1WrFoBZOxJQsSA9bdGTeowSNaSZvNh yNFgciGNbK8v2r6atcs70W2CwJaGhjjqQT9y46MX3CFHyjXQO74XbnWTllLZuXBkhba2 ZB2g== 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; bh=C01eNk3NwvsIILRxSmGNc2O1AsfcJ/1SiL94aPpnU1o=; b=vVvw3LGskMScosGB0nkrgsBauEhtUwF9sr4aaVpTWo5ksv8R5LwCvTtq1NUWRyqIkE 5M3CJU3e3feD3lErG51VzvqcrXaPYCwnOVtrIX6b3VutrNfalsJrpVSRVAQvw9sZEPXD j3zdkdm1COfu9LDI42zDbtFwg5cMZtO6CxummtmzWIkQ91pDgqXRfnZmUMF+iiu8Xrwc nDIw35kanIMRRAcgz0oCi5QVfejEAvKTydWjQWEjKytoVF7rQSYK19AW1jbuNIOvDmqu yUYVcnPHp0p4hx23oHmhjBOeONJqo70Qky/uIehxwtsvOzR3a2JhSsx6aX7zh1mZS8F2 zNcA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=BnpNtCrc; 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 s10-v6si631341pgh.6.2018.09.12.02.53.37; Wed, 12 Sep 2018 02:53:37 -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=BnpNtCrc; 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 S1727473AbeILO5V (ORCPT + 32 others); Wed, 12 Sep 2018 10:57:21 -0400 Received: from mail-ed1-f67.google.com ([209.85.208.67]:37527 "EHLO mail-ed1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726932AbeILO5U (ORCPT ); Wed, 12 Sep 2018 10:57:20 -0400 Received: by mail-ed1-f67.google.com with SMTP id a20-v6so1265519edd.4 for ; Wed, 12 Sep 2018 02:53: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=C01eNk3NwvsIILRxSmGNc2O1AsfcJ/1SiL94aPpnU1o=; b=BnpNtCrcNgH4c+El2+edawnt/IUENWb+siPT2y+6maMo5vKcXvDkyX2bLiuKQO/GhT J6F0WSeue+xIu+MOHmGhL3KFA7mLSykVs5czobeMSyvTT7m0hY1I3ExIrebHJ/7w8KoW 5OMwNFJkBCPEps5rPBI5trL7nERNkApfOIYr8= 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=C01eNk3NwvsIILRxSmGNc2O1AsfcJ/1SiL94aPpnU1o=; b=n5mwLOQDCTiyZP7GFqnt33/Qyql57JMyjbQKTcbnJwNjxcL5yA5MQQ8rIg0Bib8zs0 SC/yReY+NZoqOs476Hf7sOSQq5EJBBRuHhzWOdOZ8qfCEn9kVD5HQQOd+oVTEkqdTAXG tvymDJGSY3dPb8UH18nsyc+8admZXs+rwyDnpXZyi/vu5Pf+d3JKOOlRbTeG6MZYPCKy touwzMcTG/CYH0ZXJZfwLzzt8an18F3GVn224NgbjW7eMIzTbVGtQrx44XjGcLklEXFV WncU0dgJZit/FjXijQLHkIiBJxURkSLpKN6rNZa+qdnsUfPE27yOIJQycSDxQMCCNQ7U 6XAA== X-Gm-Message-State: APzg51AUi/jnqPqz64xVmo92nDzFXyzoBDPtLRlyB5NgERQgbIkKMCni XQkpqaNSRLyQi9IwH7d1pHVd8/Tvluw= X-Received: by 2002:a50:fd84:: with SMTP id o4-v6mr1746928edt.116.1536746012859; Wed, 12 Sep 2018 02:53:32 -0700 (PDT) Received: from localhost ([49.248.190.214]) by smtp.gmail.com with ESMTPSA id g20-v6sm328160edm.36.2018.09.12.02.53.30 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Sep 2018 02:53: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, andy.gross@linaro.org, dianders@chromium.org, mka@chromium.org, Zhang Rui , Daniel Lezcano , linux-pm@vger.kernel.org Subject: [PATCH v3 02/16] thermal: tsens: Add SPDX license identifiers Date: Wed, 12 Sep 2018 15:22:47 +0530 Message-Id: X-Mailer: git-send-email 2.17.1 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 drivers use a GPL-2.0 license. Replace with equivalent SPDX tags and delete the full license text. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Reviewed-by: Bjorn Andersson --- drivers/thermal/qcom/tsens-8916.c | 11 +---------- drivers/thermal/qcom/tsens-8960.c | 11 +---------- drivers/thermal/qcom/tsens-8974.c | 11 +---------- drivers/thermal/qcom/tsens-common.c | 11 +---------- drivers/thermal/qcom/tsens.c | 11 +---------- drivers/thermal/qcom/tsens.h | 11 ++--------- 6 files changed, 7 insertions(+), 59 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens-8916.c b/drivers/thermal/qcom/tsens-8916.c index fdf561b8b81d..c4955c85e922 100644 --- a/drivers/thermal/qcom/tsens-8916.c +++ b/drivers/thermal/qcom/tsens-8916.c @@ -1,15 +1,6 @@ +// 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. - * */ #include diff --git a/drivers/thermal/qcom/tsens-8960.c b/drivers/thermal/qcom/tsens-8960.c index 0451277d3a8f..4af76de7dc2e 100644 --- a/drivers/thermal/qcom/tsens-8960.c +++ b/drivers/thermal/qcom/tsens-8960.c @@ -1,15 +1,6 @@ +// 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. - * */ #include diff --git a/drivers/thermal/qcom/tsens-8974.c b/drivers/thermal/qcom/tsens-8974.c index 9baf77e8cbe3..7e149edbfeb6 100644 --- a/drivers/thermal/qcom/tsens-8974.c +++ b/drivers/thermal/qcom/tsens-8974.c @@ -1,15 +1,6 @@ +// 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. - * */ #include diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index 478739543bbc..303e3fdaca98 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -1,15 +1,6 @@ +// 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. - * */ #include diff --git a/drivers/thermal/qcom/tsens.c b/drivers/thermal/qcom/tsens.c index a2c9bfae3d86..90bb431cf740 100644 --- a/drivers/thermal/qcom/tsens.c +++ b/drivers/thermal/qcom/tsens.c @@ -1,15 +1,6 @@ +// 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. - * */ #include diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index 14331eb45a86..8207610f326a 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -1,15 +1,8 @@ +/* SPDX-License-Identifier: GPL-2.0 */ /* * Copyright (c) 2015, The Linux Foundation. All rights reserved. - * - * This software is licensed under the terms of the GNU General Public - * License version 2, as published by the Free Software Foundation, and - * may be copied, distributed, and modified under those terms. - * - * 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. */ + #ifndef __QCOM_TSENS_H__ #define __QCOM_TSENS_H__ From patchwork Wed Sep 12 09:52:50 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amit Kucheria X-Patchwork-Id: 146532 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp4618427ljw; Wed, 12 Sep 2018 02:53:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYQ092BhOJwbmiXiXyka5ATERvIqatglK5nGiFu3+JagORQOaum+kxGFv7yqJwv12xXN0VC X-Received: by 2002:a63:991a:: with SMTP id d26-v6mr1267247pge.159.1536746036481; Wed, 12 Sep 2018 02:53:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536746036; cv=none; d=google.com; s=arc-20160816; b=TuLCH2bxjXZC6D0wRZ1EGlGfwhl1BcOauaz34HVzkTqabXpSEPKisLErt5y8kaabMg FAAW43Ga5XFyUcy0dIaEkDMyUQp6o5J7mujHJRm4V+pNSKLZzRx9hqY5q67aFY567zih PJTgVBKO2ZT4xPMFDjIIwrMw2vjHwh1yRFqe1kubSfVOPEXHOFF8zzQN3E2uuk78Tvh2 p7vhag3kVHhR9uAYatN23XJIaPOxIdsGDDWl2upQII4MrWWI9NAZq96aEFhj9fzL5D/I UtS/hpSWeYtlyD+TdPLucWqa67PHZ+bAPHGMazCjAh5CvV9pXiJeOkq6U3vOFOyB/RGF t9gg== 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; bh=FjREbFGVR4U2BlmcUg5I3xLlSlYd4TVVX+ZjdpIMju8=; b=CeKyvQ3gc+sbLsotLtAaBFGMG1/wM7wrcUx2bhQcM4LT6W1g+vE8FQiO5pW6yCtfQ3 24/X6hXoOKNfs2lwboJ0iYLN2y92m7F7NyRN3KWricDLTB6kpbWMNQM/4bi4veweS/5X OSxPoRpwRIK1MffOpq3s1Q3A8v92LUivYaL7MhUaKLN+sOKTgwMM+VAiYVJC6J1vBtlh jXM3t720grj5QssTOUl62ItOjv2jU6gtjPXMe6N1lJW/ZomCpgx9HwhZcKrXaT3dUmDq KScoJWA8AyfT0sH7/uPNwAlP1LQ4N12GarD8BBPsgfQYNMZccfeBzz31civQVFIROfpE d3XA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gSDuBvzg; 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 h14-v6si622405pgl.289.2018.09.12.02.53.56; Wed, 12 Sep 2018 02:53:56 -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=gSDuBvzg; 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 S1727726AbeILO5k (ORCPT + 32 others); Wed, 12 Sep 2018 10:57:40 -0400 Received: from mail-ed1-f68.google.com ([209.85.208.68]:44719 "EHLO mail-ed1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727685AbeILO5j (ORCPT ); Wed, 12 Sep 2018 10:57:39 -0400 Received: by mail-ed1-f68.google.com with SMTP id s10-v6so1234588edb.11 for ; Wed, 12 Sep 2018 02:53:52 -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=FjREbFGVR4U2BlmcUg5I3xLlSlYd4TVVX+ZjdpIMju8=; b=gSDuBvzg5L1d1hFDoKnmjQix+KFeP1cO2uVFU56g2/qrZxMTvgh2xfjzWq5lb0E0Tk Wvv+qDIhwcL7lBs/wnayTmppcEG2rfEQkaD8auHl1nwy1UgBRHa9C4uWrT3LQB29XTgS eP+tbT6VRGAjL5x8b42lx36NpdXb7tRSIlNTo= 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=FjREbFGVR4U2BlmcUg5I3xLlSlYd4TVVX+ZjdpIMju8=; b=Zir30yUTw+kTQhi1ao957BbPXh9vATr3CM3/uUb+gUnpO2eG4WOYoYnotMtjs+yJKh ddr36Cm9C6+vzjcpQ4q/PU5jA7WyY/pPte+UKunrfmywnxboj7O/6wRQ9X7ne8zRKpgi +Wwn1rp9L7TL3AbbAULmkUXOwXNGdccF8LhbKCL2xLKHzG6DtFwpHTZXHDxFXMKrXWld /H9UVsAw4IUdpIJWhdT0RVdFMpqFiZevDVzUuvWhfze8eYnYkQI0aExCJvoYEGMxFJn/ aphMUWbRX4eKh4/qwYPiQ4YQybumU/iSS1MqSFUGaI43F/Po0J/fj4JE/EJ7ZLRZnFTo vHnQ== X-Gm-Message-State: APzg51CdcuDiApFhyBJs+9P6OgszVBJ6arDzfQeFiA2lH13LN5y8hobk f5puOxbWQs7uh3wEYuX/yKO4TCZ7MZw= X-Received: by 2002:a50:86b5:: with SMTP id r50-v6mr1736811eda.201.1536746031759; Wed, 12 Sep 2018 02:53:51 -0700 (PDT) Received: from localhost ([49.248.190.214]) by smtp.gmail.com with ESMTPSA id a19-v6sm481328edd.69.2018.09.12.02.53.49 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 12 Sep 2018 02:53:50 -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, andy.gross@linaro.org, dianders@chromium.org, mka@chromium.org, Zhang Rui , Daniel Lezcano , linux-pm@vger.kernel.org Subject: [PATCH v3 05/16] thermal: tsens: Add the SROT address map Date: Wed, 12 Sep 2018 15:22:50 +0530 Message-Id: <2900c1006e7e978403b1b95448f9c959c7ae486a.1536744310.git.amit.kucheria@linaro.org> X-Mailer: git-send-email 2.17.1 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 On platforms whose device trees specify two address spaces for TSENS, the second one points to the SROT registers. Initialise the SROT map on those platforms. Signed-off-by: Amit Kucheria Reviewed-by: Matthias Kaehlcke Reviewed-by: Bjorn Andersson --- drivers/thermal/qcom/tsens-common.c | 14 ++++++++++++-- drivers/thermal/qcom/tsens.h | 1 + 2 files changed, 13 insertions(+), 2 deletions(-) -- 2.17.1 diff --git a/drivers/thermal/qcom/tsens-common.c b/drivers/thermal/qcom/tsens-common.c index 0585084630b3..0b8a793f15f4 100644 --- a/drivers/thermal/qcom/tsens-common.c +++ b/drivers/thermal/qcom/tsens-common.c @@ -117,16 +117,26 @@ static const struct regmap_config tsens_config = { int __init init_common(struct tsens_device *tmdev) { - void __iomem *tm_base; + void __iomem *tm_base, *srot_base; struct resource *res; struct platform_device *op = of_find_device_by_node(tmdev->dev->of_node); if (!op) return -EINVAL; - /* The driver only uses the TM register address space for now */ if (op->num_resources > 1) { + /* DT with separate SROT and TM address space */ tmdev->tm_offset = 0; + res = platform_get_resource(op, IORESOURCE_MEM, 1); + srot_base = devm_ioremap_resource(&op->dev, res); + if (IS_ERR(srot_base)) + return PTR_ERR(srot_base); + + tmdev->srot_map = devm_regmap_init_mmio(tmdev->dev, + srot_base, &tsens_config); + if (IS_ERR(tmdev->srot_map)) + return PTR_ERR(tmdev->srot_map); + } else { /* old DTs where SROT and TM were in a contiguous 2K block */ tmdev->tm_offset = 0x1000; diff --git a/drivers/thermal/qcom/tsens.h b/drivers/thermal/qcom/tsens.h index 58e98c4d3a8b..b9c4bcf255fa 100644 --- a/drivers/thermal/qcom/tsens.h +++ b/drivers/thermal/qcom/tsens.h @@ -70,6 +70,7 @@ struct tsens_device { struct device *dev; u32 num_sensors; struct regmap *tm_map; + struct regmap *srot_map; u32 tm_offset; struct tsens_context ctx; const struct tsens_ops *ops;