Received: by 10.223.185.116 with SMTP id b49csp3897231wrg; Tue, 6 Mar 2018 06:49:41 -0800 (PST) X-Google-Smtp-Source: AG47ELv0ENk4Vh4x4bF3tiXaKvB5YWD8f+YAeXW8vEKi22O/kiUY+mT7jfX3IQ3KTiEGtwtKDRah X-Received: by 10.99.126.22 with SMTP id z22mr14328153pgc.131.1520347781540; Tue, 06 Mar 2018 06:49:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520347781; cv=none; d=google.com; s=arc-20160816; b=fVjfhPhbNfgeakeh4HtFBVfkoSUaRI7Zp8hilcyx1yBHafR6nDm0K6pZmxM4gPp30p QaNFYODcZ5DFQFl5qdqPmzKzSLooZgzAkOm+QyL0EBL7dYAnjkxHqQZ1S6If13sQ01cA MmMa79ry6TLLfvY2ctpHjlyL2iPQAHFMTbPRc/Z7WDSYm2SK9UKIHjbn9USeV5+VBGRl 78fWtcDoM43Nmu5k/pP4YiJroHPGt5sMyiUDA9qA/9aoG5wbB2giyTW2Ze0k7Oop4A3T OaPF9c0iXyztuIiZoy9v/u0wowFS04lpbZOojmtm4YS+7KN02fMsbmQFrbNDRZG8D3cJ caeQ== 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=CEzr3cfHWVid9vqR/Vex8k9p65G2F0qVz1bKziMR/ZY=; b=QPpsgn6YQEWJabKcI81qfbMNBA5h84BH9lRJcQBZI1ViLMeegO2/a9IIFBQ1kjtU9R W7C4HTrp9IGytRaNL9xDW73TByZBhBRwNNWTioOSIvtTEJ1gkavT3JIS7X5+FieHTsQd IJl2dXvCb9I2UUYBPY7V46EXN3j45CZ/X+FFPBpmYjeVI/mPPg1qggs8UpiagY7izw4j Jn8a4oNp5JsmetruLEU2rUEjV9n8Q+BxMpeCLTkKhXrgB4deZsO8XYLNIhPzbpBDV30B 9+z5WV27m583iQo4jcHqbfqHG9uxBsFpoSQPHIxz4UOZwGtI0ApCyOfZ6hdNLtCsSjfg S48w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b=XUSSvtTf; 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 13-v6si11271800plb.515.2018.03.06.06.49.27; Tue, 06 Mar 2018 06:49:41 -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=XUSSvtTf; 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 S1753872AbeCFOsj (ORCPT + 99 others); Tue, 6 Mar 2018 09:48:39 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:53271 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932773AbeCFOok (ORCPT ); Tue, 6 Mar 2018 09:44:40 -0500 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout1.samsung.com (KnoxPortal) with ESMTP id 20180306144437epoutp018d2cb4533f36e55fd22fc60fb2462878~ZW-nNsyO42727327273epoutp01N; Tue, 6 Mar 2018 14:44:37 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.samsung.com 20180306144437epoutp018d2cb4533f36e55fd22fc60fb2462878~ZW-nNsyO42727327273epoutp01N DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1520347477; bh=CEzr3cfHWVid9vqR/Vex8k9p65G2F0qVz1bKziMR/ZY=; h=From:To:Cc:Subject:Date:In-reply-to:References:From; b=XUSSvtTfmtmF5q9HEGAQgaggSSeT+fXXyI9UEHuaeupdUZ5Fv1BV3EBvDC/QItp2b 8HFp4AnUDVYFKQ6gWlK7XapNpIqD90JQPpmrjKJK0B4TUJDHXPAnPwcMpx220mQvp0 ++fWce1QjZmyzHNHXgi+ou+Aff6gYPRtRfZN3rwc= Received: from epsmges2p1.samsung.com (unknown [182.195.42.69]) by epcas2p4.samsung.com (KnoxPortal) with ESMTP id 20180306144437epcas2p4adfe81d9d3631a4cd795aee2167fc022~ZW-m3CqC61830318303epcas2p4H; Tue, 6 Mar 2018 14:44:37 +0000 (GMT) Received: from epcas2p4.samsung.com ( [182.195.41.56]) by epsmges2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 07.DE.04131.559AE9A5; Tue, 6 Mar 2018 23:44:37 +0900 (KST) Received: from epsmgms2p2new.samsung.com (unknown [182.195.42.143]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20180306144436epcas2p2f26ee2297cbd0e654930e8bb85512fe6~ZW-l5HTGF0522005220epcas2p2g; Tue, 6 Mar 2018 14:44:36 +0000 (GMT) X-AuditID: b6c32a45-3ebff70000001023-d4-5a9ea9551a45 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2new.samsung.com (Symantec Messaging Gateway) with SMTP id 38.C3.03890.359AE9A5; Tue, 6 Mar 2018 23:44:36 +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:35 +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 02/12] thermal: exynos: remove parsing of samsung,tmu_default_temp_offset property Date: Tue, 06 Mar 2018 15:43:45 +0100 Message-id: <1520347435-22970-3-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+NgFnrEIsWRmVeSWpSXmKPExsWy7bCmhW7oynlRBi/ucVlsnLGe1WL+kXNA 4so1Vov+x6+ZLc6f38BusekxkHt51xw2i8+9RxgtZpzfx2RxaOpeRoul1y8yWbTuPcJu8eRh H5sDr8eaeWsYPS5fu8jssXPWXXaPxXteMnlsWtXJ5rF5Sb1H35ZVjB6fN8kFcERx2aSk5mSW pRbp2yVwZWy9Mp+5oEukonPCH5YGxs8CXYycHBICJhJ3tqxg7mLk4hAS2MEocfLzMijnO6NE x/qvbDBV7/40skAkdjNKTGhdywbh/GKUWPxqHzNIFZuAlcTE9lWMILaIQInEtFW9jCBFzAJn mSR2bH/HApIQFkiRuH7wMTuIzSKgKtHV/hqsmVfAQ2LRMph1chInj01mBbE5BTwlTnScA9sm IXCETeLZ9fdMEEUuEqf6JkDZwhKvjm9hh7ClJZ6t2sgI0dDMKPFtxx5miMQERok964UgbGuJ w8cvgm1gFuCT6Dj8F6iZAyjOK9HRBlXiIXHy/TuoVkeJQ1ca2SFensMoceT+a6YJjFILGBlW MYqlFhTnpqcWGxUY6hUn5haX5qXrJefnbmIEx7yW6w7GGed8DjEKcDAq8fBu8JgbJcSaWFZc mXuIUYKDWUmEN0J/XpQQb0piZVVqUX58UWlOavEhRmkOFiVx3rYAlyghgfTEktTs1NSC1CKY LBMHp1QD47mlvVGujPulFxxwCP5ksDtzelB0+MqC/oI01QjOkvVlWlPDeR4pi/n6NO7SmnFS tkNl6+FX3rN+n/jLKjd90/+H8vI7b/xOOipgKCLwmT9QjiVklv26rU0v2qseOUby/xeTmCkh lCHzUXGLzY0fBccDTjxTlCl/WuavfC5xr92rqsmu1ixXlFiKMxINtZiLihMBwXAsbvUCAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrBLMWRmVeSWpSXmKPExsVy+t9jAd2QlfOiDNrmsVtsnLGe1WL+kXNA 4so1Vov+x6+ZLc6f38BusekxkHt51xw2i8+9RxgtZpzfx2RxaOpeRoul1y8yWbTuPcJu8eRh H5sDr8eaeWsYPS5fu8jssXPWXXaPxXteMnlsWtXJ5rF5Sb1H35ZVjB6fN8kFcERx2aSk5mSW pRbp2yVwZWy9Mp+5oEukonPCH5YGxs8CXYycHBICJhLv/jSydDFycQgJ7GSUePt6NyOE84tR 4uKyTYwgVWwCVhIT21eB2SICJRKd014zg9jMAmeZJA7+5wCxhQVSJK4ffMwOYrMIqEp0tUPU 8Ap4SCxa9pUNYpucxMljk1lBbE4BT4kTHefA4kJANYu7f7NNYORZwMiwilEytaA4Nz232KjA KC+1XK84Mbe4NC9dLzk/dxMjMDy3Hdbq38H4eEn8IUYBDkYlHt4NHnOjhFgTy4orcw8xSnAw K4nwRujPixLiTUmsrEotyo8vKs1JLT7EKM3BoiTOy59/LFJIID2xJDU7NbUgtQgmy8TBKdXA uFBQJm7vpB8WL11PlGR8fsiVHGMgX79CdZJIZnh/x8kWK4U+6SjZy/Yd4S6nop7HcHJv17tc cujz0rueBhteTzsb2cOzt69fNzxMavmG7zF6jKcF3EL/pyy9GmjrmVAh6mX86ESio7Y+z6dj Sh/KBZ4u+z+zV/jmKaZ3fdOvOvdMvLumveqCEktxRqKhFnNRcSIA/wV0NksCAAA= X-CMS-MailID: 20180306144436epcas2p2f26ee2297cbd0e654930e8bb85512fe6 X-Msg-Generator: CA CMS-TYPE: 102P X-CMS-RootMailID: 20180306144436epcas2p2f26ee2297cbd0e654930e8bb85512fe6 X-RootMTR: 20180306144436epcas2p2f26ee2297cbd0e654930e8bb85512fe6 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 Trimming (one point based or two points based) is always used for the temperature calibration and the default non-trimming code should never be reached. Modify temp_to_code() and code_to_temp() accordingly (WARN_ON(1) in the default cases) and then remove no longer needed parsing of samsung,tmu_default_temp_offset property. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/thermal/samsung/exynos_tmu.c | 6 ++---- drivers/thermal/samsung/exynos_tmu.h | 2 -- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/thermal/samsung/exynos_tmu.c b/drivers/thermal/samsung/exynos_tmu.c index ed805c7..e42a08b 100644 --- a/drivers/thermal/samsung/exynos_tmu.c +++ b/drivers/thermal/samsung/exynos_tmu.c @@ -260,7 +260,7 @@ static int temp_to_code(struct exynos_tmu_data *data, u8 temp) temp_code = temp + data->temp_error1 - pdata->first_point_trim; break; default: - temp_code = temp + pdata->default_temp_offset; + WARN_ON(1); break; } @@ -287,7 +287,7 @@ static int code_to_temp(struct exynos_tmu_data *data, u16 temp_code) temp = temp_code - data->temp_error1 + pdata->first_point_trim; break; default: - temp = temp_code - pdata->default_temp_offset; + WARN_ON(1); break; } @@ -1164,8 +1164,6 @@ static int exynos_of_sensor_conf(struct device_node *np, pdata->first_point_trim = (u8)value; of_property_read_u32(np, "samsung,tmu_second_point_trim", &value); pdata->second_point_trim = (u8)value; - of_property_read_u32(np, "samsung,tmu_default_temp_offset", &value); - pdata->default_temp_offset = (u8)value; of_property_read_u32(np, "samsung,tmu_cal_type", &pdata->cal_type); diff --git a/drivers/thermal/samsung/exynos_tmu.h b/drivers/thermal/samsung/exynos_tmu.h index 8c468b6..a7e81b4 100644 --- a/drivers/thermal/samsung/exynos_tmu.h +++ b/drivers/thermal/samsung/exynos_tmu.h @@ -50,7 +50,6 @@ enum soc_type { * @efuse_value: platform defined fuse value * @min_efuse_value: minimum valid trimming data * @max_efuse_value: maximum valid trimming data - * @default_temp_offset: default temperature offset in case of no trimming * @cal_type: calibration type for temperature * * This structure is required for configuration of exynos_tmu driver. @@ -65,7 +64,6 @@ struct exynos_tmu_platform_data { u32 max_efuse_value; u8 first_point_trim; u8 second_point_trim; - u8 default_temp_offset; u32 cal_type; }; -- 1.9.1