Message ID | 1489046762-11288-7-git-send-email-j-keerthy@ti.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C47F1602B4 for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 9 Mar 2017 08:34:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EE6D285AA for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 9 Mar 2017 08:34:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 928F1285CF; Thu, 9 Mar 2017 08:34:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3F1EF285AA for <patchwork-linux-arm@patchwork.kernel.org>; Thu, 9 Mar 2017 08:34:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pVSYz6rIPc+yRTgSuSf6hfU9EC+qSfBdPgJ0rYrknVU=; b=Y8cvvFdoa5btr1 KbZUZRE7wOTcZfUP3DMCYJiR+YaeBtfvvEp/uBK7g0mIndi41u/UN80r35sVWp2BqL3xMrH7tpbqU /t05YZ+c4VcdCV7jUT7OcFiB63CjgS9hTsoSxBj3u7sjwM17EbNOrSLL/AN6F8ihsEd024FOEeHsv 7a3teNepBYKh7Yls84QLJ5MxIIEymsBvZzI42G502fj3yOlhAWTb0y4WsqrEbDRruGDs2pccl/j1K nVuRUM5vD/JxGNe8K9dDhCMgM67ufzAO4CQA3vYj25yQpFhGOufOcf8izltH3pQCy4LUx6YMwuUtG s5LJ7gk+SVF1hBPF8+AQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cltWy-0002cR-PN; Thu, 09 Mar 2017 08:34:40 +0000 Received: from casper.infradead.org ([2001:770:15f::2]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cltVj-00008M-PE for linux-arm-kernel@bombadil.infradead.org; Thu, 09 Mar 2017 08:33:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:CC:To:From:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Q8cNyILlPCw3o2y0YB3PorZ+lixquCK9dJD3QPtOQ54=; b=qULXifESKgW7TXJUAw9bfrF3G /yXqYZlVY2UVe9354PbOF7saafipRI6IwoZ9BXqXBrgGj53ODpotpUpSOqMaoHd1VFPyPv/WLfnv0 xejF+miV2jkNUZKpL4917vkXRsmwp/R6N6Ol7AvkrWL5QAOD2dWVAa9O15hq/I7V7hbjohjn9Ea7a fTPHVpQdiIVM/OwEv94JHETl1Py4fSVuPdfSwUVAh94Swpff5pd9LTalfMc6i3kMVTxXCAA0e1Rpr msbhEd9JGlqhBpuv4PD0wr0ygPLvSX8pICmcnQMWspRl7Bg+Yi63w8Lh4i8T7wmpAel1/bW6VcnbZ Q9OzlQvTg==; Received: from fllnx210.ext.ti.com ([198.47.19.17]) by casper.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1clt6U-0003cd-Ke for linux-arm-kernel@lists.infradead.org; Thu, 09 Mar 2017 08:07:21 +0000 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v2986pXH002424; Thu, 9 Mar 2017 02:06:51 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1489046811; bh=OHlH0/RyTZqP6ks8gjZdXELaaP2Qz8AaJm0M7VPE9GY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=WPHEPNiZC9vTuz/RkTLVfzAivu9sfALegLkaU1Ig7MQyeq/a7bCZ499QHP7zKxlVv WGbLA2A4Nelgx7okcPhLClKsWZQBjj3BXuSwYpEQQ9CiXU0lzSf7epeMLCq3uZWf2O 15TU7PgkB0p9DblgmeSAZ/ADcD8eB7YGm93XijWM= Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2986pFO032560; Thu, 9 Mar 2017 02:06:51 -0600 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.294.0; Thu, 9 Mar 2017 02:06:50 -0600 Received: from ula0393675.dhcp.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id v2986Uke019463; Thu, 9 Mar 2017 02:06:48 -0600 From: Keerthy <j-keerthy@ti.com> To: <tony@atomide.com>, <edubezval@gmail.com> Subject: [PATCH v2 6/8] thermal: ti-soc-thermal: Fetch slope and offset from DT Date: Thu, 9 Mar 2017 13:36:00 +0530 Message-ID: <1489046762-11288-7-git-send-email-j-keerthy@ti.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1489046762-11288-1-git-send-email-j-keerthy@ti.com> References: <1489046762-11288-1-git-send-email-j-keerthy@ti.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170309_080718_980089_0DAAA09E X-CRM114-Status: UNSURE ( 9.57 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Cc: linux-pm@vger.kernel.org, j-keerthy@ti.com, linux-kernel@vger.kernel.org, t-kristo@ti.com, robh+dt@kernel.org, rui.zhang@intel.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c index 0586bd0..2054a5c 100644 --- a/drivers/thermal/ti-soc-thermal/ti-thermal-common.c +++ b/drivers/thermal/ti-soc-thermal/ti-thermal-common.c @@ -96,8 +96,8 @@ static inline int __ti_thermal_get_temp(void *devdata, int *temp) return ret; /* Default constants */ - slope = s->slope; - constant = s->constant; + slope = thermal_zone_get_slope(data->ti_thermal); + constant = thermal_zone_get_offset(data->ti_thermal); pcb_tz = data->pcb_tz; /* In case pcb zone is available, use the extrapolation rule with it */
Currently slope and offset values for calculating the hot spot temperature of a thermal zone is being taken directly from driver data. So fetch them from device tree. Signed-off-by: Keerthy <j-keerthy@ti.com> --- drivers/thermal/ti-soc-thermal/ti-thermal-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)