From patchwork Mon Jan 19 11:20:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lukasz Majewski X-Patchwork-Id: 5657611 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: X-Original-To: patchwork-linux-pm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0C5D89F333 for ; Mon, 19 Jan 2015 11:21:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B5E4201C0 for ; Mon, 19 Jan 2015 11:21:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 105EF2037B for ; Mon, 19 Jan 2015 11:21:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751520AbbASLVt (ORCPT ); Mon, 19 Jan 2015 06:21:49 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:40431 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751090AbbASLVs (ORCPT ); Mon, 19 Jan 2015 06:21:48 -0500 Received: from epcpsbgm2.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NIF003M98WA1G40@mailout3.samsung.com>; Mon, 19 Jan 2015 20:21:47 +0900 (KST) X-AuditID: cbfee61b-f79d76d0000024d6-c9-54bce8ca7118 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id AF.C4.09430.AC8ECB45; Mon, 19 Jan 2015 20:21:46 +0900 (KST) Received: from mcdsrvbld02.digital.local ([106.116.37.23]) by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0NIF00DOL8V62U10@mmp2.samsung.com>; Mon, 19 Jan 2015 20:21:46 +0900 (KST) From: Lukasz Majewski To: Eduardo Valentin , Zhang Rui , Kukjin Kim , Kukjin Kim Cc: Linux PM list , "linux-samsung-soc@vger.kernel.org" , Bartlomiej Zolnierkiewicz , Lukasz Majewski , Amit Daniel Kachhap , Abhilash Kesavan , Abhilash Kesavan , Kyungmin Park , Chanwoo Choi , Lukasz Majewski Subject: [PATCH v5 02/18] thermal: exynos: Provide thermal_exynos.h file to be included in device tree files Date: Mon, 19 Jan 2015 12:20:46 +0100 Message-id: <1421666462-7606-3-git-send-email-l.majewski@samsung.com> X-Mailer: git-send-email 1.7.10.4 In-reply-to: <1421666462-7606-1-git-send-email-l.majewski@samsung.com> References: <1412872737-624-1-git-send-email-l.majewski@samsung.com> <1421666462-7606-1-git-send-email-l.majewski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrFLMWRmVeSWpSXmKPExsVy+t9jQd1TL/aEGJyZam7xeM1iJouGqyEW G2esZ7W4/uU5q8X8K9dYLdb8VbLoXXCVzaL/8Wtmi7NNb9gt3jzitnjzcDOjxefeI4wWM87v Y7J48rCPzYHPY+esu+wei/e8ZPLYtKqTzWPdtLfMHn1bVjF6fN4kF8AWxWWTkpqTWZZapG+X wJVx/ds/5oLJEhXrFyo3MLaJdDFyckgImEjs7T/PBGGLSVy4t56ti5GLQ0hgOqPEt9UHmSCc LiaJibNmsIBUsQnoSXy++xSsQ0RgAqPE/1XRIEXMAs+YJfZ83c4MkhAWyJNYsP4IWAOLgKrE jO+LwOK8Aq4Sm2YfZ4VYpyjR/WwCG4jNKeAm8aajmRFiWwOjxOfmB+wTGHkXMDKsYhRNLUgu KE5KzzXSK07MLS7NS9dLzs/dxAgO0WfSOxhXNVgcYhTgYFTi4d3guydEiDWxrLgy9xCjBAez kggv4wWgEG9KYmVValF+fFFpTmrxIUZpDhYlcV4l+7YQIYH0xJLU7NTUgtQimCwTB6dUA+P6 DrPDk9XvyrXEuP8+cntWiUL1T6ZdBTsuel+tDL3atfr+gaev55wq5TItejWNYeEHDg09FxGl 3NY1L/5cT0vsfPv3kn/NnjOSch6OVaqris3Cd1/q+iHR0KLtekjCZEuKcdKUjCynpe5S2p4H vZnjTi1r0H3EuWDSHI2SxDUWCezPvKo3sSuxFGckGmoxFxUnAgBjQ/j0TQIAAA== Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch is a preparatory patch to be able to read Exynos thermal configuration from the device tree. It turned out that DTC is not able to interpret enums properly and hence it is necessary to #define those values explicitly. For this reason the ./include/dt-bindings/thermal/thermal_exynos.h file has been introduced. Signed-off-by: Lukasz Majewski --- Changes for v2: - None Changes for v3: - Restore 'enum soc_type type' since TMU sensor type will be extracted from device tree compatible Changes for v4: - None Changes for v5: - None --- drivers/thermal/samsung/exynos_tmu.h | 12 +++--------- include/dt-bindings/thermal/thermal_exynos.h | 28 ++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 9 deletions(-) create mode 100644 include/dt-bindings/thermal/thermal_exynos.h diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index da3009b..7f880d2 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h @@ -26,14 +26,6 @@ #include "exynos_thermal_common.h" -enum calibration_type { - TYPE_ONE_POINT_TRIMMING, - TYPE_ONE_POINT_TRIMMING_25, - TYPE_ONE_POINT_TRIMMING_85, - TYPE_TWO_POINT_TRIMMING, - TYPE_NONE, -}; - enum soc_type { SOC_ARCH_EXYNOS3250 = 1, SOC_ARCH_EXYNOS4210, @@ -44,6 +36,7 @@ enum soc_type { SOC_ARCH_EXYNOS5420_TRIMINFO, SOC_ARCH_EXYNOS5440, }; +#include /** * struct exynos_tmu_platform_data @@ -115,8 +108,9 @@ struct exynos_tmu_platform_data { u8 second_point_trim; u8 default_temp_offset; - enum calibration_type cal_type; enum soc_type type; + u32 cal_type; + u32 cal_mode; struct freq_clip_table freq_tab[4]; unsigned int freq_tab_count; }; diff --git a/include/dt-bindings/thermal/thermal_exynos.h b/include/dt-bindings/thermal/thermal_exynos.h new file mode 100644 index 0000000..0646500 --- /dev/null +++ b/include/dt-bindings/thermal/thermal_exynos.h @@ -0,0 +1,28 @@ +/* + * thermal_exynos.h - Samsung EXYNOS TMU device tree definitions + * + * Copyright (C) 2014 Samsung Electronics + * Lukasz Majewski + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * 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 _EXYNOS_THERMAL_TMU_DT_H +#define _EXYNOS_THERMAL_TMU_DT_H + +#define TYPE_ONE_POINT_TRIMMING 0 +#define TYPE_ONE_POINT_TRIMMING_25 1 +#define TYPE_ONE_POINT_TRIMMING_85 2 +#define TYPE_TWO_POINT_TRIMMING 3 +#define TYPE_NONE 4 + +#endif /* _EXYNOS_THERMAL_TMU_DT_H */