From: Krzysztof Kozlowski <krzk@kernel.org>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-rtc@vger.kernel.org,
"linux-samsung-soc@vger.kernel.org"
<linux-samsung-soc@vger.kernel.org>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Alessandro Zummo <a.zummo@towertech.it>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH v2] rtc: s3c: Rewrite clock handling
Date: Mon, 21 Jan 2019 16:33:59 +0100 [thread overview]
Message-ID: <CAJKOXPc46a1geNMizYFLjE+TZMtmPVNG-1eki_FPVCxhgKoXkQ@mail.gmail.com> (raw)
In-Reply-To: <20190121110930.8290-1-m.szyprowski@samsung.com>
On Mon, 21 Jan 2019 at 12:09, Marek Szyprowski <m.szyprowski@samsung.com> wrote:
>
> s3c_rtc_enable/disable_clk() functions were designed to be called multiple
> times without reference counting, because they were initially only used in
> alarm setting/clearing functions, which can be called both when alarm is
> already set or not. Later however, calls to those functions have been added to
> other places in the driver - like time and /proc reading callbacks, what
> results in broken alarm if any of such events happens after the alarm has
> been set. Fix this by simplifying s3c_rtc_enable/disable_clk() functions
> to rely on proper reference counting in clock core and move alarm enable
> counter to s3c_rtc_setaie() function.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> v2:
> - simplified code as suggested by Krzysztof
> ---
> drivers/rtc/rtc-s3c.c | 74 ++++++++++++++++++-------------------------
> 1 file changed, 31 insertions(+), 43 deletions(-)
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Best regards,
Krzysztof
next prev parent reply other threads:[~2019-01-21 15:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20190121110938eucas1p2e008ce6dabb0e5c62fdac19dc1491463@eucas1p2.samsung.com>
2019-01-21 11:09 ` [PATCH v2] rtc: s3c: Rewrite clock handling Marek Szyprowski
2019-01-21 15:33 ` Krzysztof Kozlowski [this message]
2019-01-22 17:35 ` Alexandre Belloni
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAJKOXPc46a1geNMizYFLjE+TZMtmPVNG-1eki_FPVCxhgKoXkQ@mail.gmail.com \
--to=krzk@kernel.org \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=b.zolnierkie@samsung.com \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=m.szyprowski@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).