mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Alexander Shiyan <shc_work@mail.ru>
To: barebox@lists.infradead.org
Subject: [RFC 2/3] clk: Using the "is_enabled" to determine the clock state
Date: Fri, 15 Mar 2013 10:35:39 +0400	[thread overview]
Message-ID: <1363329340-13126-2-git-send-email-shc_work@mail.ru> (raw)
In-Reply-To: <1363329340-13126-1-git-send-email-shc_work@mail.ru>


Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
 drivers/clk/clk.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index cb94755..d5dbbd9 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -213,6 +213,8 @@ int clk_register(struct clk *clk)
 
 	if (clk->flags & CLK_ALWAYS_ENABLED) {
 		clk->enable_count = 1;
+	} else if (clk->ops->is_enabled) {
+		clk->enable_count = clk->ops->is_enabled(clk);
 	}
 
 	return 0;
-- 
1.7.3.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-03-15  6:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-15  6:35 [RFC 1/3] clk: Remove unneded private "parent" fields Alexander Shiyan
2013-03-15  6:35 ` Alexander Shiyan [this message]
2013-03-15  8:52   ` [RFC 2/3] clk: Using the "is_enabled" to determine the clock state Sascha Hauer
2013-03-15  6:35 ` [RFC 3/3] clk: Add "is_enabled" callback for gated clocks Alexander Shiyan
2013-03-15  8:29 ` [RFC 1/3] clk: Remove unneded private "parent" fields Sascha Hauer
2013-03-15  8:48   ` Re[2]: " Alexander Shiyan

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=1363329340-13126-2-git-send-email-shc_work@mail.ru \
    --to=shc_work@mail.ru \
    --cc=barebox@lists.infradead.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