Received: by 10.223.185.116 with SMTP id b49csp3896508wrg; Tue, 6 Mar 2018 06:49:04 -0800 (PST) X-Google-Smtp-Source: AG47ELtH02i1FLZ1ulbZt1M7AO+rvBR/Uf2La3U48T8jMd6oXd8HlJxUkoVjMGkd4blWxJYm4BW6 X-Received: by 2002:a17:902:96a:: with SMTP id 97-v6mr17099172plm.183.1520347744878; Tue, 06 Mar 2018 06:49:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520347744; cv=none; d=google.com; s=arc-20160816; b=cHPmsnxfZfIDLydV73y2Rk4+gPUgcw/dw34UfXcJgrFXYBigakUY9WSz5Z5coyo99y 5q+0d4NvZbQzro3vqChkf0khwMETVQeffwUChkxp12/IVlPy8hjLGrBmx8zlqFi7u8tk FsIwyTi7O/jJWw3z3PRmOUvQli1gKFCT6Cayz/LdCkheueB9vgSFE54pQZALYH6zlrqK 0qPDvOfYuTtgrORiuGXzGF+ptuWrva/yKcsvpt8ZYgrwjougVOqRtLv61Qa4QODeXs5T vi+M5bKcAcMTBz63f1yxj2nRlTLDlD1c7laTxDcOUOUlGTc1KYQUm4eanrmI8Vk3L6zC VkQA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:cms-type:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=6DwqwIxuT+66WsPVMBODJzY6RbUTpZjspw+Dvdar3HM=; b=TbIRWG3fB53rUv/r0rbppROtSHqnNmzsAWenRgKu8vo7IwQ1kA41evBXJQkUJioUPC OVxhQOMLBnUbPu1AKZ28f4ufQS4O9DFrrV3NKR0JSDcX7GETs0ebq3CbNJrj1lRxWxu4 hOtPCcpn18NMSsCyheZmNnBOXaW4XARTmzSKwVVBO+OdPKq+6zShMm78Vp3sxAuW/nlX 4vYgn8g3aZswz8KH8b7P9BaLQDHcenH9nygTkTBFYL1/G8qgN/PYX8CJY/PxhhsCZ4nr 2iObthdEWbLJlcxckMkHBjoeaAxng/fbfo5ubHSByaQic5Mu5k/H2+1krHWlVGLMmgzo QWgw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=jwy/fWuY; 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g4si9895928pgr.797.2018.03.06.06.48.49; Tue, 06 Mar 2018 06:49:04 -0800 (PST) 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=@samsung.com header.s=mail20170921 header.b=jwy/fWuY; 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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933307AbeCFOpK (ORCPT + 99 others); Tue, 6 Mar 2018 09:45:10 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:49767 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932313AbeCFOpC (ORCPT ); Tue, 6 Mar 2018 09:45:02 -0500 Received: from epcas2p3.samsung.com (unknown [182.195.41.55]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20180306144500epoutp028a03bfaf4a7e539ccc06563c42fd6435~ZW-8kitTd1274612746epoutp02b; Tue, 6 Mar 2018 14:45:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20180306144500epoutp028a03bfaf4a7e539ccc06563c42fd6435~ZW-8kitTd1274612746epoutp02b DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1520347500; bh=6DwqwIxuT+66WsPVMBODJzY6RbUTpZjspw+Dvdar3HM=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=jwy/fWuY4t4IAPBVcS4w7wXfI2G8rJTQiGXSd59sDtAy/iDCpontTxhROnCJgjEWB xF2fO11mTh1xtF3mLeNb2hkpKpN3Y1CAtq/xaDlUyFhCCoDr+OH4wFsJKJTXPTrYPM U2P1oHaG+wSuNud5P1Kr+jyWy2QRgE5gqL082XBA= Received: from epsmges2p3.samsung.com (unknown [182.195.42.71]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20180306144459epcas2p19eeb540c257f29154f260d195ad02add~ZW-7k_PUD2385623856epcas2p1N; Tue, 6 Mar 2018 14:44:59 +0000 (GMT) Received: from epcas2p1.samsung.com ( [182.195.41.53]) by epsmges2p3.samsung.com (Symantec Messaging Gateway) with SMTP id DC.5C.04108.B69AE9A5; Tue, 6 Mar 2018 23:44:59 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p1.samsung.com (KnoxPortal) with ESMTP id 20180306144458epcas2p1102a06fa3e58b88cad914be624e0c1db~ZW-6qF48a0853508535epcas2p1p; Tue, 6 Mar 2018 14:44:58 +0000 (GMT) X-AuditID: b6c32a47-19fff7000000100c-72-5a9ea96b2736 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id CD.C3.03890.A69AE9A5; Tue, 6 Mar 2018 23:44:58 +0900 (KST) Received: from AMDC3058.DIGITAL.local ([106.120.53.102]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P56000X0BLSFM10@mmp1.samsung.com>; Tue, 06 Mar 2018 23:44:58 +0900 (KST) From: Bartlomiej Zolnierkiewicz To: Zhang Rui , Eduardo Valentin , Krzysztof Kozlowski Cc: Kukjin Kim , Rob Herring , Mark Rutland , Russell King , linux-samsung-soc@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, b.zolnierkie@samsung.com Subject: [PATCH 07/12] thermal: exynos: remove parsing of samsung,tmu_gain property Date: Tue, 06 Mar 2018 15:43:50 +0100 Message-id: <1520347435-22970-8-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1520347435-22970-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrAIsWRmVeSWpSXmKPExsWy7bCmqW72ynlRBp/XS1hsnLGe1WL+kXNA 4so1Vov+x6+ZLc6f38BusekxkHt51xw2i8+9RxgtZpzfx2RxaOpeRoul1y8yWbTuPcJu8eRh H5sDr8eaeWsYPS5fu8jssXPWXXaPxXteMnlsWtXJ5rF5Sb1H35ZVjB6fN8kFcERx2aSk5mSW pRbp2yVwZVz99ZO14I9qxdKGdpYGxiPyXYycHBICJhK7Pj5i72Lk4hAS2MEo8eH8VWYI5zuj xPxpE4EcDrCqM4tVIeK7GSUWPJ/IBOH8YpTY2XuRDWQUm4CVxMT2VYwgtohAicS0Vb2MIEXM AmeZJHZsf8cCkhAWCJVoWb2dGcRmEVCVeDhxISvIBl4BD4n/+8ohTpKTOHlsMiuIzSngKXGi 4xwbyBwJgRNsEhfeb2GCKHKR+HF0LSOELSzx6vgWdghbWuLZqo2MEA3NjBLfduxhhkhMYJTY s14IwraWOHz8ItgGZgE+iY7Df9kh3uSV6GiDKvGQWHrkDguE7Sixe10fNIzmMEosb53GOIFR agEjwypGsdSC4tz01GKjAmO94sTc4tK8dL3k/NxNjOB413LfwbjtnM8hRgEORiUe3g0ec6OE WBPLiitzDzFKcDArifBG6M+LEuJNSaysSi3Kjy8qzUktPsQozcGiJM7bGuASJSSQnliSmp2a WpBaBJNl4uCUamAMcuDJ+j6ftff68vJ4U3Pf02c1TlkVet3d9UBSvFVqx4HfNSWVdmYtbh7L 34l/cPtso78t6UrN/J5fT5mn6B9MijTo+X9bUYpzsVaiG9vhZz3V1hlWMZefsJ/5HpihlbRf fGdIkeGeAus2u1UBrtuDlTy+6D97/WnJjzzPu5JN7/SdlreLCSuxFGckGmoxFxUnAgAHzEhb 8wIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrGLMWRmVeSWpSXmKPExsVy+t9jAd2slfOiDA4/kbLYOGM9q8X8I+eA xJVrrBb9j18zW5w/v4HdYtNjIPfyrjlsFp97jzBazDi/j8ni0NS9jBZLr19ksmjde4Td4snD PjYHXo8189Ywely+dpHZY+esu+wei/e8ZPLYtKqTzWPzknqPvi2rGD0+b5IL4IjisklJzcks Sy3St0vgyrj66ydrwR/ViqUN7SwNjEfkuxg5OCQETCTOLFbtYuTiEBLYySix6tVLVgjnF5Bz 5DlbFyMnB5uAlcTE9lWMILaIQIlE57TXzCA2s8BZJomD/zlAbGGBUImW1dvB4iwCqhIPJy5k BVnAK+Ah8X9fOUhYQkBO4uSxyawgNqeAp8SJjnNg44WAShZ3/2abwMizgJFhFaNkakFxbnpu sVGBUV5quV5xYm5xaV66XnJ+7iZGYGhuO6zVv4Px8ZL4Q4wCHIxKPLwbPOZGCbEmlhVX5h5i lOBgVhLhjdCfFyXEm5JYWZValB9fVJqTWnyIUZqDRUmclz//WKSQQHpiSWp2ampBahFMlomD U6qBcYq5xaFbTCuaOlIWNQfv6JquZ26pG6VWtj6qPODp68kHrhwWdrDNONwxkZdPs/BKtJbR XTMl0bh4vwV2z7yMjSY9W9TQMqdqPd/mXfZuqlzsP6uMYs/5sdxYNN3x3iXPHeH28ybJyjU+ 4M6+GpsQ7bfu5J2zh1Mjpin+NRdkuySypbAk99JPJZbijERDLeai4kQANDFNHEkCAAA= X-CMS-MailID: 20180306144458epcas2p1102a06fa3e58b88cad914be624e0c1db X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180306144458epcas2p1102a06fa3e58b88cad914be624e0c1db X-RootMTR: 20180306144458epcas2p1102a06fa3e58b88cad914be624e0c1db References: <1520347435-22970-1-git-send-email-b.zolnierkie@samsung.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since pdata gain values are SoC (not platform) specific just move it from platform data to struct exynos_tmu_data instance. Then remove parsing of samsung,tmu_gain property. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/samsung/exynos_tmu.c | 18 +++++++++--------- drivers/thermal/samsung/exynos_tmu.h | 4 ---- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index 12bbf79..262ab41 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -192,6 +192,8 @@ * @max_efuse_value: maximum valid trimming data * @temp_error1: fused value of the first point trim. * @temp_error2: fused value of the second point trim. + * @gain: gain of amplifier in the positive-TC generator block + * 0 < gain <= 15 * @reference_voltage: reference voltage of amplifier * in the positive-TC generator block * 0 < reference_voltage <= 31 @@ -218,6 +220,7 @@ struct exynos_tmu_data { u32 min_efuse_value; u32 max_efuse_value; u16 temp_error1, temp_error2; + u8 gain; u8 reference_voltage; struct regulator *regulator; struct thermal_zone_device *tzd; @@ -386,8 +389,6 @@ static int exynos_tmu_initialize(struct platform_device *pdev) static u32 get_con_reg(struct exynos_tmu_data *data, u32 con) { - struct exynos_tmu_platform_data *pdata = data->pdata; - if (data->soc == SOC_ARCH_EXYNOS4412 || data->soc == SOC_ARCH_EXYNOS3250) con |= (EXYNOS4412_MUX_ADDR_VALUE << EXYNOS4412_MUX_ADDR_SHIFT); @@ -396,7 +397,7 @@ static u32 get_con_reg(struct exynos_tmu_data *data, u32 con) con |= data->reference_voltage << EXYNOS_TMU_REF_VOLTAGE_SHIFT; con &= ~(EXYNOS_TMU_BUF_SLOPE_SEL_MASK << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT); - con |= (pdata->gain << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT); + con |= (data->gain << EXYNOS_TMU_BUF_SLOPE_SEL_SHIFT); con &= ~(EXYNOS_TMU_TRIP_MODE_MASK << EXYNOS_TMU_TRIP_MODE_SHIFT); con |= (EXYNOS_NOISE_CANCEL_MODE << EXYNOS_TMU_TRIP_MODE_SHIFT); @@ -1153,14 +1154,8 @@ static int exynos_of_get_soc_type(struct device_node *np) static int exynos_of_sensor_conf(struct device_node *np, struct exynos_tmu_platform_data *pdata) { - u32 value; - int ret; - of_node_get(np); - ret = of_property_read_u32(np, "samsung,tmu_gain", &value); - pdata->gain = (u8)value; - of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type); of_node_put(np); @@ -1214,6 +1209,7 @@ static int exynos_map_dt_data(struct platform_device *pdev) data->tmu_read = exynos4210_tmu_read; data->tmu_clear_irqs = exynos4210_tmu_clear_irqs; data->ntrip = 4; + data->gain = 15; data->reference_voltage = 7; data->efuse_value = 55; data->min_efuse_value = 40; @@ -1231,6 +1227,7 @@ static int exynos_map_dt_data(struct platform_device *pdev) data->tmu_set_emulation = exynos4412_tmu_set_emulation; data->tmu_clear_irqs = exynos4210_tmu_clear_irqs; data->ntrip = 4; + data->gain = 8; data->reference_voltage = 16; data->efuse_value = 55; if (data->soc != SOC_ARCH_EXYNOS5420 && @@ -1247,6 +1244,7 @@ static int exynos_map_dt_data(struct platform_device *pdev) data->tmu_set_emulation = exynos4412_tmu_set_emulation; data->tmu_clear_irqs = exynos4210_tmu_clear_irqs; data->ntrip = 8; + data->gain = 8; if (res.start == EXYNOS5433_G3D_BASE) data->reference_voltage = 23; else @@ -1262,6 +1260,7 @@ static int exynos_map_dt_data(struct platform_device *pdev) data->tmu_set_emulation = exynos5440_tmu_set_emulation; data->tmu_clear_irqs = exynos5440_tmu_clear_irqs; data->ntrip = 4; + data->gain = 5; data->reference_voltage = 16; data->efuse_value = 0x5d2d; data->min_efuse_value = 16; @@ -1274,6 +1273,7 @@ static int exynos_map_dt_data(struct platform_device *pdev) data->tmu_set_emulation = exynos4412_tmu_set_emulation; data->tmu_clear_irqs = exynos4210_tmu_clear_irqs; data->ntrip = 8; + data->gain = 9; data->reference_voltage = 17; data->efuse_value = 75; data->min_efuse_value = 15; diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index 9f4318c..689453d 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h @@ -40,15 +40,11 @@ enum soc_type { /** * struct exynos_tmu_platform_data - * @gain: gain of amplifier in the positive-TC generator block - * 0 < gain <= 15 * @cal_type: calibration type for temperature * * This structure is required for configuration of exynos_tmu driver. */ struct exynos_tmu_platform_data { - u8 gain; - u32 cal_type; }; -- 1.9.1