From: Jerome Brunet <jbrunet@baylibre.com>
To: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@codeaurora.org>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
linux-clk@vger.kernel.org, Kevin Hilman <khilman@baylibre.com>,
Neil Armstrong <narmstrong@baylibre.com>
Subject: [RFC 2/2] clk: use enable_count to check if clk is busy
Date: Thu, 2 Mar 2017 18:38:35 +0100 [thread overview]
Message-ID: <20170302173835.18313-3-jbrunet@baylibre.com> (raw)
In-Reply-To: <20170302173835.18313-1-jbrunet@baylibre.com>
When CLK_SET_RATE_GATE is set, we use the prepare_count to determine if a
clock is busy. A consumer could have just prepared his clock and not be
able to set it, eventhough the clock is still disabled (gated).
Might be the expected behavior, but the wording seems a bit misleading
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
drivers/clk/clk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index 6fe2ea81a9af..602f369bd1eb 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -174,7 +174,7 @@ static bool clk_core_is_enabled(struct clk_core *core)
static bool clk_core_rate_can_change(struct clk_core *core)
{
- if ((core->flags & CLK_SET_RATE_GATE) && core->prepare_count)
+ if ((core->flags & CLK_SET_RATE_GATE) && core->enable_count)
return false;
return true;
--
2.9.3
next prev parent reply other threads:[~2017-03-02 17:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-02 17:38 [RFC 0/2] CLK_SET_RATE_GATE and protection against changes Jerome Brunet
2017-03-02 17:38 ` [RFC 1/2] clk: fix CLK_SET_RATE_GATE on parent clocks Jerome Brunet
2017-03-02 17:38 ` Jerome Brunet [this message]
2017-03-07 14:38 ` [RFC 0/2] CLK_SET_RATE_GATE and protection against changes Stephen Boyd
2017-03-07 16:00 ` Jerome Brunet
2017-03-09 22:23 ` Michael Turquette
2017-03-11 18:18 ` Jerome Brunet
2017-03-13 16:57 ` Michael Turquette
2017-03-14 1:19 ` Stephen Boyd
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=20170302173835.18313-3-jbrunet@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=khilman@baylibre.com \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=narmstrong@baylibre.com \
--cc=sboyd@codeaurora.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).