From patchwork Mon Apr 16 10:11:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartlomiej Zolnierkiewicz X-Patchwork-Id: 10342561 X-Patchwork-Delegate: eduardo.valentin@ti.com Return-Path: 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 23236601C2 for ; Mon, 16 Apr 2018 10:16:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 12A0F26247 for ; Mon, 16 Apr 2018 10:16:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 074AB28632; Mon, 16 Apr 2018 10:16:39 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 92E7526247 for ; Mon, 16 Apr 2018 10:16:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754320AbeDPKQh (ORCPT ); Mon, 16 Apr 2018 06:16:37 -0400 Received: from mailout2.samsung.com ([203.254.224.25]:52054 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753994AbeDPKOI (ORCPT ); Mon, 16 Apr 2018 06:14:08 -0400 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180416101406epoutp0256b5c27092845b80cf6c075d7138e986~l4wISxzfM0421804218epoutp029; Mon, 16 Apr 2018 10:14:06 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180416101406epoutp0256b5c27092845b80cf6c075d7138e986~l4wISxzfM0421804218epoutp029 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1523873647; bh=HQ8NyJOkK70ix1SCrlOxZkcRrDYoNJmofbbagGtJE2Y=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=rbxrZM2XGP/dkzubuutQC0oeKrLt4HRqSzH6iqnin/P4Zf0o6fIpFiLuhtuVYWqJC rk3a9w0Rf2QoSlqtkOwIhn4puAQJtSGiCvab33Caeql2lwpDqiSFiUlDUJff30Es3u /okQMndRBoyUJCtgm+1h3d1DTRWMZ+2znxExU5oo= Received: from epsmges2p4.samsung.com (unknown [182.195.42.72]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20180416101406epcas2p2118b8d56bcc4748b3d4eb11f774a0145~l4wH9TZPz3253332533epcas2p2c; Mon, 16 Apr 2018 10:14:06 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p4.samsung.com (Symantec Messaging Gateway) with SMTP id C4.DE.04082.E6774DA5; Mon, 16 Apr 2018 19:14:06 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20180416101406epcas2p267a664bb26a00bdca6c4c176f9ce08ed~l4wHzVsPQ3253332533epcas2p2b; Mon, 16 Apr 2018 10:14:06 +0000 (GMT) X-AuditID: b6c32a48-8c1ff70000000ff2-cb-5ad4776eab12 Received: from epmmp2 ( [203.254.227.17]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id DA.79.03827.E6774DA5; Mon, 16 Apr 2018 19:14:06 +0900 (KST) Received: from AMDC3058.DIGITAL.local ([106.120.53.102]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P79000EEWCHS590@mmp2.samsung.com>; Mon, 16 Apr 2018 19:14:06 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Eduardo Valentin Cc: Zhang Rui , Krzysztof Kozlowski , Kukjin Kim , Daniel Lezcano , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com Subject: [PATCH 07/14] thermal: exynos: remove parsing of samsung,tmu_noise_cancel_mode property Date: Mon, 16 Apr 2018 12:11:58 +0200 Message-id: <1523873525-23718-8-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1523873525-23718-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCIsWRmVeSWpSXmKPExsWy7bCmuW5e+ZUog4aDKhYbZ6xntZj3WdZi /pVrrBb9j18zW5w/v4Hd4vKuOWwWn3uPMFrMOL+PyeLJwz42B06PnbPusnss3vOSyWPTqk42 jzvX9rB59G1ZxejxeZNcAFsUl01Kak5mWWqRvl0CV8bfB99ZCiaLVry7OYGlgfGdYBcjJ4eE gInE+g2/2bsYuTiEBHYwSsw+OwnK+c4oceXeW2aYqpPzZ7NCJDYwSiw8O4cZwvnFKLH/4jEm kCo2ASuJie2rGEFsEQEtiROXtjOBFDELTGCSePpqJhtIQlggSWL1lS5WEJtFQFXi1+NPYA28 Ah4SC84tZoFYJydx8thksBpOAU+JpjXX2EAGSQgsYJOYuLCXDaLIReL3rSNQ9wlLvDq+hR3C lpZ4tmojI0RDM6PEtx17oIomMErsWS8EYVtLHD5+EWwDswCfRMfhv0DNHEBxXomONqgSD4nL 3+5CHeQo8e30H2jAzGGU+PF0I+sERqkFjAyrGMVSC4pz01OLjQpM9IoTc4tL89L1kvNzNzGC 41bLYwfjgXM+hxgFOBiVeHh3nL0cJcSaWFZcmXuIUYKDWUmEd1kiUIg3JbGyKrUoP76oNCe1 +BCjNAeLkjhvg++ZKCGB9MSS1OzU1ILUIpgsEwenVAOj//07bQEStt+Kby6+E2BefHpB+fJP LOde3nHZ2OGRfsSt6sVbBcvbukq7WbgO5Ly4/v9ExbwLtszs0xb6u046fba2+/YR273ah7Ul Dy5dby6V7bxBUMusNDEg//6JzedfSfWcav/sksV0xdCZQ8faxOaAQmbsR5dzXkkeXtwMcy3b 3P5UWrUrsRRnJBpqMRcVJwIABiMZ+9cCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNLMWRmVeSWpSXmKPExsVy+t9jQd288itRBjNuiFpsnLGe1WLeZ1mL +VeusVr0P37NbHH+/AZ2i8u75rBZfO49wmgx4/w+JosnD/vYHDg9ds66y+6xeM9LJo9NqzrZ PO5c28Pm0bdlFaPH501yAWxRXDYpqTmZZalF+nYJXBl/H3xnKZgsWvHu5gSWBsZ3gl2MnBwS AiYSJ+fPZu1i5OIQEljHKPG4fwmU84tRYsmliawgVWwCVhIT21cxgtgiAloSJy5tZwIpYhaY wCSxZO0idpCEsECSxOorXWANLAKqEr8efwJr4BXwkFhwbjELxDo5iZPHJoPVcAp4SjStucYG YgsB1TROvMo4gZFnASPDKkbJ1ILi3PTcYqMCo7zUcr3ixNzi0rx0veT83E2MwCDbdlirfwfj 4yXxhxgFOBiVeHh3nL0cJcSaWFZcmXuIUYKDWUmEd1kiUIg3JbGyKrUoP76oNCe1+BCjNAeL kjgvf/6xSCGB9MSS1OzU1ILUIpgsEwenVAOjisimysNJGk4dUVctss+t3bom+W1i998n0fwz 3mx7V+u27szb86Jh2+uuik8KMGKP65haIBOa23qG7ezsqj96K5p71XYtmLzggKPqrzLZkqcu m6PMbKpePr8bWcSTXd639Xtlm7OZ0Y056/V2Oa+9J11WKLdxFSdbou6tiecKhLLb4k71Ryso sRRnJBpqMRcVJwIAkZYpbS4CAAA= X-CMS-MailID: 20180416101406epcas2p267a664bb26a00bdca6c4c176f9ce08ed X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180416101406epcas2p267a664bb26a00bdca6c4c176f9ce08ed X-RootMTR: 20180416101406epcas2p267a664bb26a00bdca6c4c176f9ce08ed References: <1523873525-23718-1-git-send-email-b.zolnierkie@samsung.com> Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP All SoCs use the same value (4) for the noise cancel mode so just make it explicit and remove parsing of samsung,tmu_noise_cancel_mode property. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz Reviewed-by: Daniel Lezcano --- drivers/thermal/samsung/exynos_tmu.c | 10 ++++------ drivers/thermal/samsung/exynos_tmu.h | 3 --- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 7ec8061..1fa162d 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -168,6 +168,8 @@ #define EXYNOS_FIRST_POINT_TRIM 25 #define EXYNOS_SECOND_POINT_TRIM 85 +#define EXYNOS_NOISE_CANCEL_MODE 4 + #define MCELSIUS 1000 /** * struct exynos_tmu_data : A structure to hold the private data of the TMU @@ -368,10 +370,8 @@ static u32 get_con_reg(struct exynos_tmu_data *data, u32 con) con &= ~(EXYNOS_TMU_BUF_SLOPE_SEL_MASK << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT); con |= (pdata->gain << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT); - if (pdata->noise_cancel_mode) { - con &= ~(EXYNOS_TMU_TRIP_MODE_MASK << EXYNOS_TMU_TRIP_MODE_SHIFT); - con |= (pdata->noise_cancel_mode << EXYNOS_TMU_TRIP_MODE_SHIFT); - } + con &= ~(EXYNOS_TMU_TRIP_MODE_MASK << EXYNOS_TMU_TRIP_MODE_SHIFT); + con |= (EXYNOS_NOISE_CANCEL_MODE << EXYNOS_TMU_TRIP_MODE_SHIFT); return con; } @@ -1135,8 +1135,6 @@ static int exynos_of_sensor_conf(struct device_node *np, pdata->gain = (u8)value; of_property_read_u32(np, "samsung,tmu_reference_voltage", &value); pdata->reference_voltage = (u8)value; - of_property_read_u32(np, "samsung,tmu_noise_cancel_mode", &value); - pdata->noise_cancel_mode = (u8)value; of_property_read_u32(np, "samsung,tmu_efuse_value", &pdata->efuse_value); diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index a5d8c9c..b111a01 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h @@ -45,8 +45,6 @@ enum soc_type { * @reference_voltage: reference voltage of amplifier * in the positive-TC generator block * 0 < reference_voltage <= 31 - * @noise_cancel_mode: noise cancellation mode - * 000, 100, 101, 110 and 111 can be different modes * @efuse_value: platform defined fuse value * @min_efuse_value: minimum valid trimming data * @max_efuse_value: maximum valid trimming data @@ -57,7 +55,6 @@ enum soc_type { struct exynos_tmu_platform_data { u8 gain; u8 reference_voltage; - u8 noise_cancel_mode; u32 efuse_value; u32 min_efuse_value;