Message ID | 1491227226-12972-2-git-send-email-b.zolnierkie@samsung.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show
Return-Path: <linux-hwmon-owner@kernel.org> 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 CDD8A60352 for <patchwork-linux-hwmon@patchwork.kernel.org>; Mon, 3 Apr 2017 13:48:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BD35A285D4 for <patchwork-linux-hwmon@patchwork.kernel.org>; Mon, 3 Apr 2017 13:48:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ADB75284FE; Mon, 3 Apr 2017 13:48:42 +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=-6.9 required=2.0 tests=BAYES_00,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 E8351285B2 for <patchwork-linux-hwmon@patchwork.kernel.org>; Mon, 3 Apr 2017 13:48:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753352AbdDCNrl (ORCPT <rfc822;patchwork-linux-hwmon@patchwork.kernel.org>); Mon, 3 Apr 2017 09:47:41 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:48858 "EHLO epoutp01.samsung.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752984AbdDCNri (ORCPT <rfc822; linux-hwmon@vger.kernel.org>); Mon, 3 Apr 2017 09:47:38 -0400 Received: from epcas5p4.samsung.com (unknown [182.195.41.42]) by epoutp01.samsung.com (KnoxPortal) with ESMTP id 20170403134735epoutp0113b99e8f3ddb70c53a72f09970db94e8~x50nPTDdM0318203182epoutp012; Mon, 3 Apr 2017 13:47:35 +0000 (GMT) Received: from epsmges5p3.samsung.com (unknown [182.195.42.46]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20170403134735epcas5p20efad8420642317f958a8e65f9e0edae~x50nIoxk53093930939epcas5p2I; Mon, 3 Apr 2017 13:47:35 +0000 (GMT) Received: from epcas5p4.samsung.com ( [182.195.41.42]) by epsmges5p3.samsung.com (EPCPMTA) with SMTP id 23.24.18112.77252E85; Mon, 3 Apr 2017 22:47:35 +0900 (KST) Received: from epcpsbgm2new.samsung.com (u27.gpu120.samsung.co.kr [203.254.230.27]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20170403134735epcas5p252798426964621f81114614c525f38ba~x50mmIrvT2867828678epcas5p2Z; Mon, 3 Apr 2017 13:47:35 +0000 (GMT) X-AuditID: b6c32a2e-f79506d0000046c0-46-58e2527717c2 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 28.57.05013.67252E85; Mon, 3 Apr 2017 22:47:35 +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 <0ONU003916AWJW90@mmp2.samsung.com>; Mon, 03 Apr 2017 22:47:34 +0900 (KST) From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> To: Thierry Reding <thierry.reding@gmail.com>, Jean Delvare <jdelvare@suse.com>, Guenter Roeck <linux@roeck-us.net>, Kamil Debski <kamil@wypas.org> Cc: Tomasz Figa <tomasz.figa@gmail.com>, linux-pwm@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-samsung-soc@vger.kernel.org, b.zolnierkie@samsung.com Subject: [PATCH 1/3] pwm: pwm-samsung: remove redundant checks from pwm_samsung_config() Date: Mon, 03 Apr 2017 15:47:04 +0200 Message-id: <1491227226-12972-2-git-send-email-b.zolnierkie@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1491227226-12972-1-git-send-email-b.zolnierkie@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrPIsWRmVeSWpSXmKPExsWy7bCmlm550KMIg8WXNS02zljPanF2QqDF zBPtrBbtr7cyWlzeNYfN4u7dVYwWM87vY7J4svAMk8XPXfNYLFbt+sPowOWxc9Zddo+d3xvY Pfq2rGL0WL/lKovH501yHleONLIHsEVx2aSk5mSWpRbp2yVwZax4spe9YAV7Rd+B92wNjL1s XYwcHBICJhJtB7W7GDmBTDGJC/fWA4W5OIQEljJKXHr9lwXCaWeSWD/zEiNElYnEj9VroBJz GCUmXJvODuH8YpSYe+AMWBWbgJXExPZVjCAJEYHpjBLnr+xjBkkwC+xjlHh3rgTEFhaIkui4 fpMJxGYRUJXY+HceO4jNK+Ah8WLKAWaIdXISJ49NZgWxOQU8Jd5PXMUMMlRCYDK7xO8FnSwQ T8hKbIKpd5E4tGkGlC0s8er4FnYIW1ri79JbUC8AHbT9twTEnM2MEqt2T4AqspY4fPwiK8Sh fBK9v58wQcznlehoE4Io8ZD4P/MwE4TtKPHi/FtWeFDMbfvENIFRZgEjwypGsdSC4tz01GLT AmO94sTc4tK8dL3k/NxNjOBo19LbwfhvgfchRgEORiUe3gVOjyKEWBPLiitzDzFKcDArifBO 8AMK8aYkVlalFuXHF5XmpBYfYpTmYFES59VYeS1CSCA9sSQ1OzW1ILUIJsvEwSnVwFhYHhG1 4dUii8Qwrov++0z+e80U2zvHv8dkpWCok2jkQpmXEufFxb/WmZ59zBa+qeXfpZld58QOlHnV 2761qlIJk3R+Kcco9XXxYvswvbR5YSbbD72JXZhQumDjmuW1Gc4MtW+vP3h4XDFmXraAlDIb L/dGr8dfGPgSGszPOad6VX2POXD8jxJLcUaioRZzUXEiAB9Uh1XyAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42I5/e+xoG550KMIgzf72Sw2zljPanF2QqDF zBPtrBbtr7cyWlzeNYfN4u7dVYwWM87vY7J4svAMk8XPXfNYLFbt+sPowOWxc9Zddo+d3xvY Pfq2rGL0WL/lKovH501yHleONLIHsEW52WSkJqakFimk5iXnp2TmpdsqhYa46VooKeQl5qba KkXo+oYEKSmUJeaUAnlGBmjAwTnAPVhJ3y7BLWPFk73sBSvYK/oOvGdrYOxl62Lk5JAQMJH4 sXoNC4QtJnHh3nqgOBeHkMAsRomJM06xQji/GCU+znkPVsUmYCUxsX0VI0hCRGA6o8SMmdvB qpgF9jFKrO6awgxSJSwQJdFx/SYTiM0ioCqx8e88dhCbV8BD4sWUA8wQ++QkTh6bzApicwp4 SryfuAosLgRUs6l5EusERt4FjAyrGCVSC5ILipPSc43yUsv1ihNzi0vz0vWS83M3MYLD/5n0 DsbDu9wPMQpwMCrx8C5wehQhxJpYVlyZe4hRgoNZSYR3gh9QiDclsbIqtSg/vqg0J7X4EKMp 0GETmaVEk/OBsZlXEm9oYm5ibmxgYW5paWKkJM7bOPtZuJBAemJJanZqakFqEUwfEwenVANj TPPh9td3165jWzO7up9tuaDwJH25iT+eXnj9w1CGbdmKZVuinzUtfnPtipKqXvSlad8rgxqm cBy98Ortr0aNLaUvDrMH7I9f68o8e5Jv4O9wse0rDz26+W/z72ARhYje6Blv2xu+pZzjmdqy 8YDilGm6Qlpnpja9uCj9KZDj0y7uAt4r176ufaTEUpyRaKjFXFScCAAzfl9KlQIAAA== X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170403134735epcas5p252798426964621f81114614c525f38ba X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 X-Local-Sender: =?UTF-8?B?QmFydGxvbWllaiBab2xuaWVya2lld2ljehtTUlBPTC1LZXJu?= =?UTF-8?B?ZWwgKFRQKRvsgrzshLHsoITsnpAbU2VuaW9yIFNvZnR3YXJlIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?QmFydGxvbWllaiBab2xuaWVya2lld2ljehtTUlBPTC1LZXJu?= =?UTF-8?B?ZWwgKFRQKRtTYW1zdW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBF?= =?UTF-8?B?bmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 105P X-CMS-RootMailID: 20170403134735epcas5p252798426964621f81114614c525f38ba X-RootMTR: 20170403134735epcas5p252798426964621f81114614c525f38ba References: <1491227226-12972-1-git-send-email-b.zolnierkie@samsung.com> <CGME20170403134735epcas5p252798426964621f81114614c525f38ba@epcas5p2.samsung.com> Sender: linux-hwmon-owner@vger.kernel.org Precedence: bulk List-ID: <linux-hwmon.vger.kernel.org> X-Mailing-List: linux-hwmon@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/drivers/pwm/pwm-samsung.c b/drivers/pwm/pwm-samsung.c index f113cda..9ea7638 100644 --- a/drivers/pwm/pwm-samsung.c +++ b/drivers/pwm/pwm-samsung.c @@ -312,9 +312,6 @@ static int pwm_samsung_config(struct pwm_chip *chip, struct pwm_device *pwm, if (period_ns > NSEC_PER_SEC) return -ERANGE; - if (period_ns == chan->period_ns && duty_ns == chan->duty_ns) - return 0; - tcnt = readl(our_chip->base + REG_TCNTB(pwm->hwpwm)); oldtcmp = readl(our_chip->base + REG_TCMPB(pwm->hwpwm));
If the requested period_ns and duty_ns values are identical to the last programmed ones pwm_samsung_config() returns early and skips the hardware configuration. The same checks are now done by the PWM core so the driver specific ones can be removed. Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com> --- drivers/pwm/pwm-samsung.c | 3 --- 1 file changed, 3 deletions(-)