mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [RFC 1/2] clk: pass the 'flags' parameter to clk_fixed()
Date: Thu,  6 Dec 2012 12:25:35 +0400	[thread overview]
Message-ID: <1354782336-16239-2-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1354782336-16239-1-git-send-email-antonynpavlov@gmail.com>

The 'flags' parameter make possible creation
of a 'CLK_ALWAYS_ENABLED' clock without code overhead.

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 drivers/clk/clk-fixed.c |    3 ++-
 include/linux/clk.h     |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/clk-fixed.c b/drivers/clk/clk-fixed.c
index fa89cb2..5ac5663 100644
--- a/drivers/clk/clk-fixed.c
+++ b/drivers/clk/clk-fixed.c
@@ -36,7 +36,7 @@ struct clk_ops clk_fixed_ops = {
 	.recalc_rate = clk_fixed_recalc_rate,
 };
 
-struct clk *clk_fixed(const char *name, int rate)
+struct clk *clk_fixed(const char *name, int rate, unsigned long flags)
 {
 	struct clk_fixed *fix = xzalloc(sizeof *fix);
 	int ret;
@@ -44,6 +44,7 @@ struct clk *clk_fixed(const char *name, int rate)
 	fix->rate = rate;
 	fix->clk.ops = &clk_fixed_ops;
 	fix->clk.name = name;
+	fix->clk.flags = flags;
 
 	ret = clk_register(&fix->clk);
 	if (ret) {
diff --git a/include/linux/clk.h b/include/linux/clk.h
index 1030b50..9d89a21 100644
--- a/include/linux/clk.h
+++ b/include/linux/clk.h
@@ -184,7 +184,7 @@ struct clk {
 
 #define CLK_ALWAYS_ENABLED	(1 << 0)
 
-struct clk *clk_fixed(const char *name, int rate);
+struct clk *clk_fixed(const char *name, int rate, unsigned long flags);
 struct clk *clk_divider(const char *name, const char *parent,
 		void __iomem *reg, u8 shift, u8 width);
 struct clk *clk_fixed_factor(const char *name,
-- 
1.7.10.4


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

  reply	other threads:[~2012-12-06  8:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-06  8:25 [RFC 0/2] " Antony Pavlov
2012-12-06  8:25 ` Antony Pavlov [this message]
2012-12-06  8:25 ` [RFC 2/2] ARM: pass the 'flags'=0 " Antony Pavlov
2012-12-06 13:44 ` [RFC 0/2] clk: pass the 'flags' " Sascha Hauer

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=1354782336-16239-2-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --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