From: Alexander Shiyan <shc_work@mail.ru>
To: barebox@lists.infradead.org
Subject: [PATCH] clk-fixed-factor: Using parent flags
Date: Fri, 15 Feb 2013 14:09:35 +0400 [thread overview]
Message-ID: <1360922975-15256-1-git-send-email-shc_work@mail.ru> (raw)
This patch allow using parent flags for newly created clocks, so if
parent clock, for example, have flag CLK_ALWAYS_ENABLED, we will use it.
Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
---
drivers/clk/clk-fixed-factor.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/clk/clk-fixed-factor.c b/drivers/clk/clk-fixed-factor.c
index 52e7c16..56aa63e 100644
--- a/drivers/clk/clk-fixed-factor.c
+++ b/drivers/clk/clk-fixed-factor.c
@@ -43,6 +43,7 @@ struct clk *clk_fixed_factor(const char *name,
const char *parent, unsigned int mult, unsigned int div)
{
struct clk_fixed_factor *f = xzalloc(sizeof(*f));
+ struct clk *parent_clk;
int ret;
f->mult = mult;
@@ -53,6 +54,10 @@ struct clk *clk_fixed_factor(const char *name,
f->clk.parent_names = &f->parent;
f->clk.num_parents = 1;
+ parent_clk = clk_lookup(parent);
+ if (!IS_ERR(parent_clk))
+ f->clk.flags = parent_clk->flags;
+
ret = clk_register(&f->clk);
if (ret) {
free(f);
--
1.7.3.4
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next reply other threads:[~2013-02-15 10:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-15 10:09 Alexander Shiyan [this message]
2013-02-15 12:28 ` 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=1360922975-15256-1-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