From patchwork Mon Apr 8 12:19:10 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Valentin X-Patchwork-Id: 2408181 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 16FE3DFE82 for ; Mon, 8 Apr 2013 12:21:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935638Ab3DHMVa (ORCPT ); Mon, 8 Apr 2013 08:21:30 -0400 Received: from comal.ext.ti.com ([198.47.26.152]:43876 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935569Ab3DHMV1 (ORCPT ); Mon, 8 Apr 2013 08:21:27 -0400 Received: from dlelxv30.itg.ti.com ([172.17.2.17]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id r38CLPaI019042; Mon, 8 Apr 2013 07:21:25 -0500 Received: from DLEE70.ent.ti.com (dlee70.ent.ti.com [157.170.170.113]) by dlelxv30.itg.ti.com (8.13.8/8.13.8) with ESMTP id r38CLPHu004413; Mon, 8 Apr 2013 07:21:25 -0500 Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE70.ent.ti.com (157.170.170.113) with Microsoft SMTP Server id 14.2.342.3; Mon, 8 Apr 2013 07:21:25 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id r38CLPrK001640; Mon, 8 Apr 2013 07:21:25 -0500 Received: from localhost (h68-18.vpn.ti.com [172.24.68.18]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id r38CLMV03315; Mon, 8 Apr 2013 07:21:22 -0500 (CDT) From: Eduardo Valentin To: CC: , , , Eduardo Valentin Subject: [PATCH 4/8] staging: ti-soc-thermal: introduce OMAP4430 extrapolation constants Date: Mon, 8 Apr 2013 08:19:10 -0400 Message-ID: <1365423555-2669-5-git-send-email-eduardo.valentin@ti.com> X-Mailer: git-send-email 1.7.7.1.488.ge8e1c In-Reply-To: <1365423555-2669-1-git-send-email-eduardo.valentin@ti.com> References: <1365423555-2669-1-git-send-email-eduardo.valentin@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org This patch defines and utilizes the extrapolation constants for OMAP4430. Signed-off-by: Eduardo Valentin --- .../staging/ti-soc-thermal/omap4-thermal-data.c | 8 ++++---- drivers/staging/ti-soc-thermal/ti-thermal.h | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/staging/ti-soc-thermal/omap4-thermal-data.c b/drivers/staging/ti-soc-thermal/omap4-thermal-data.c index ee9c902..d255d33 100644 --- a/drivers/staging/ti-soc-thermal/omap4-thermal-data.c +++ b/drivers/staging/ti-soc-thermal/omap4-thermal-data.c @@ -82,10 +82,10 @@ const struct ti_bandgap_data omap4430_data = { .registers = &omap4430_mpu_temp_sensor_registers, .ts_data = &omap4430_mpu_temp_sensor_data, .domain = "cpu", - .slope = 0, - .constant = 20000, - .slope_pcb = 0, - .constant_pcb = 20000, + .slope = OMAP_GRADIENT_SLOPE_4430, + .constant = OMAP_GRADIENT_CONST_4430, + .slope_pcb = OMAP_GRADIENT_SLOPE_W_PCB_4430, + .constant_pcb = OMAP_GRADIENT_CONST_W_PCB_4430, .register_cooling = ti_thermal_register_cpu_cooling, .unregister_cooling = ti_thermal_unregister_cpu_cooling, }, diff --git a/drivers/staging/ti-soc-thermal/ti-thermal.h b/drivers/staging/ti-soc-thermal/ti-thermal.h index 7b2d600..47cc902 100644 --- a/drivers/staging/ti-soc-thermal/ti-thermal.h +++ b/drivers/staging/ti-soc-thermal/ti-thermal.h @@ -26,6 +26,8 @@ #include "ti-bandgap.h" /* sensors gradient and offsets */ +#define OMAP_GRADIENT_SLOPE_4430 0 +#define OMAP_GRADIENT_CONST_4430 20000 #define OMAP_GRADIENT_SLOPE_4460 348 #define OMAP_GRADIENT_CONST_4460 -9301 #define OMAP_GRADIENT_SLOPE_4470 308 @@ -37,6 +39,8 @@ #define OMAP_GRADIENT_CONST_5430_GPU 978 /* PCB sensor calculation constants */ +#define OMAP_GRADIENT_SLOPE_W_PCB_4430 0 +#define OMAP_GRADIENT_CONST_W_PCB_4430 20000 #define OMAP_GRADIENT_SLOPE_W_PCB_4460 1142 #define OMAP_GRADIENT_CONST_W_PCB_4460 -393 #define OMAP_GRADIENT_SLOPE_W_PCB_4470 1063