From: Stephen Boyd <sboyd@codeaurora.org>
To: Jun Nie <jun.nie@linaro.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
linux-clk@vger.kernel.org, Shawn Guo <shawn.guo@linaro.org>,
Jason Liu <jason.liu@linaro.org>
Subject: Re: [PATCH] clk: disable unused clk if enable_count == 0
Date: Wed, 13 Apr 2016 17:37:59 -0700 [thread overview]
Message-ID: <20160414003759.GI14441@codeaurora.org> (raw)
In-Reply-To: <CABymUCMLZ+UcH-Vo1i_Zj+N-r-uVeYPvnBLkJzyp1oZRRUVwjQ@mail.gmail.com>
On 04/08, Jun Nie wrote:
> 2016-04-08 8:14 GMT+08:00 Stephen Boyd <sboyd@codeaurora.org>:
> > On 04/07/2016 02:15 AM, Jun Nie wrote:
> >> If .is_enabled callback is not implemented, clk_core_is_enabled
> >> will take software enable_count as enable status. If enable_count
> >> is zero, .disable will not be called as software assume clock
> >> is not enabled though clock may be booted with free running state.
> >> Disable the clock in this situation.
> >>
> >> Signed-off-by: Jun Nie <jun.nie@linaro.org>
> >> ---
> >
> > Why not implement the is_enabled callback then?
>
> The is_enabled callback is not mandatory according to sanity check
> code, so there is risk that some clock is not gated even we have
> called clk_disable_unused_subtree. If is_enabled callback is mandatory
> when CLK_IGNORE_UNUSED is not set, Adding a sanity check will fill
> this gap.
The is_enabled op is technically mandatory if enable/disable ops
are implemented. We could add a sanity check, but I would guess
it will warn quite a bit because not everyone is following the
documentation.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
prev parent reply other threads:[~2016-04-14 0:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-07 9:15 [PATCH] clk: disable unused clk if enable_count == 0 Jun Nie
2016-04-08 0:14 ` Stephen Boyd
2016-04-08 0:46 ` Jun Nie
2016-04-14 0:37 ` Stephen Boyd [this message]
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=20160414003759.GI14441@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=jason.liu@linaro.org \
--cc=jun.nie@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=shawn.guo@linaro.org \
/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).