Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1436850

Re: [RFC PATCH 1/2] rtc: s3c: Remove unnecessary call to disable already disabled clock

Path csiph.com!news.mixmin.net!news.unit0.net!news.panservice.it!bofh.it!news.nic.it!robomod
From Krzysztof Kozlowski <k.kozlowski@samsung.com>
Newsgroups linux.kernel
Subject Re: [RFC PATCH 1/2] rtc: s3c: Remove unnecessary call to disable already disabled clock
Date Tue, 05 Jul 2016 11:00:02 +0200
Message-ID <rRun0-ty-25@gated-at.bofh.it> (permalink)
References <rR9Vg-4SC-11@gated-at.bofh.it> <rRsOe-84a-15@gated-at.bofh.it> <rRudj-qd-9@gated-at.bofh.it>
X-Original-To Alim Akhtar <alim.akhtar@samsung.com>, rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
X-Auditid cbfec7f4-f796c6d000001486-c2-577b74ea6eb1
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0
MIME-Version 1.0
Content-Type text/plain; charset=windows-1252
Content-Transfer-Encoding 7bit
X-Brightmail-Tracker H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsVy+t/xK7qvSqrDDd4v57PouLaYyeLBvG1s Fm/ermGyeP3C0OLyrjlsFou2fmG32N/ZwejA7vFk00VGjz0TT7J5bOm/y+7Rt2UVo8fnTXIB rFFcNimpOZllqUX6dglcGfP2T2YqaOGsaHt7hLWBcSt7FyMnh4SAicTLPb2sELaYxIV769m6 GLk4hASWMkr0bV/ADOE8Y5SY/GAdE0iVsECSxOEtt1i6GDk4RARSJVqeGkLUtDFKLF99hBmk hlkgRuLShjVgNpuAscTm5UvYQGxeAS2JK6tvg21jEVCVWPNoEtgVogIRErO2/2CCqBGU+DH5 HguIzSmgLbF3SgsbyC5mAT2J+xe1IMbLS2xe85Z5AqPALCQdsxCqZiGpWsDIvIpRNLU0uaA4 KT3XUK84Mbe4NC9dLzk/dxMjJMC/7GBcfMzqEKMAB6MSD++JhVXhQqyJZcWVuYcYJTiYlUR4 DxdXhwvxpiRWVqUW5ccXleakFh9ilOZgURLnnbvrfYiQQHpiSWp2ampBahFMlomDU6qBMf/S B5nPKYXaW4r5Kn4eCmvUCQ/bvjK7bO5VTtaToodDa7oOp4UfkU2cPPOoiGFJ/t8HiSXzLuut MWCYXiGY+qBOSU/zq9PVxoB5rQu4i9+kVM17KP3Yc5+65FGWa3VfJj9P5jr13M/91M0j7dln uWTOCBo0lld80396wmhW5aeYS7Ulwa4iSizFGYmGWsxFxYkAxKa+5GwCAAA=
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 30
Organization linux.* mail to news gateway
X-Original-Cc alexandre.belloni@free-electrons.com, javier@osg.samsung.com, pankaj.dubey@samsung.com
X-Original-Date Tue, 05 Jul 2016 10:50:48 +0200
X-Original-Message-ID <577B74E8.3010208@samsung.com>
X-Original-References <1467630195-6929-1-git-send-email-alim.akhtar@samsung.com> <577B5F28.1010905@samsung.com> <577B73FE.1020509@samsung.com>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref csiph.com linux.kernel:1436850

Show key headers only | View raw


On 07/05/2016 10:46 AM, Alim Akhtar wrote:
> Hi Krzsztof,
> 
> On 07/05/2016 12:48 PM, Krzysztof Kozlowski wrote:
>> On 07/04/2016 01:03 PM, Alim Akhtar wrote:
>>> At the end of s3c_rtc_probe(), s3c_rtc_disable_clk() being called
>>> with rtc
>>> clock already disabled, which looks extra and unnecessary call.
>>> Lets clean it up.
>>
>> Does not look right. Till that place, the clocks are enabled. Then
>> s3c_rtc_setaie() is called which expects that clocks are disabled...
>> otherwise counters get mixed.
>>
> 
> The clock is always disabled when it reach s3c_rtc_setfreq() in probe(),
> because s3c_rtc_gettime() will always disable the clock.
> 
> As far as s3c_rtc_setaie() is concern, it enables clock while entering
> and disables it while leaving the function. And in
> s3c_rtc_{enable,disable}_clk() there is check info->clk_disabled flag
> which will make sure clock balancing.

Ah, you're right. Looks correct although the information that clock is
disabled because of s3c_rtc_gettime() would be useful in the commit message.

Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>

Best regards,
Krzysztof

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[RFC PATCH 1/2] rtc: s3c: Remove unnecessary call to disable already  disabled clock Alim Akhtar <alim.akhtar@samsung.com> - 2016-07-04 13:10 +0200
  Re: [RFC PATCH 1/2] rtc: s3c: Remove unnecessary call to disable  already disabled clock Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-07-05 09:20 +0200
    Re: [RFC PATCH 1/2] rtc: s3c: Remove unnecessary call to disable  already disabled clock Alim Akhtar <alim.akhtar@samsung.com> - 2016-07-05 10:50 +0200
      Re: [RFC PATCH 1/2] rtc: s3c: Remove unnecessary call to disable  already disabled clock Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2016-07-05 11:00 +0200

csiph-web