From: Rob Herring <robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Shawn Guo <shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Mike Turquette
<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [PATCH 4/7] dt/clock: Add handling for fixed clocks and a clock node setup iterator
Date: Wed, 14 Mar 2012 08:26:17 -0500 [thread overview]
Message-ID: <4F609C79.2060307@gmail.com> (raw)
In-Reply-To: <20120314075930.GF21337-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
On 03/14/2012 02:59 AM, Shawn Guo wrote:
> On Tue, Mar 13, 2012 at 06:22:24PM -0500, Rob Herring wrote:
> ...
>> +/**
>> + * of_fixed_clk_setup() - Setup function for simple fixed rate clock
>> + */
>> +void __init of_fixed_clk_setup(struct device_node *node)
>> +{
>> + struct clk *clk;
>> + const char *clk_name = node->name;
>> + u32 rate;
>> +
>> + if (of_property_read_u32(node, "clock-frequency", &rate))
>> + return;
>> +
>> + of_property_read_string(node, "clock-output-names", &clk_name);
>> +
>> + clk = clk_register_fixed_rate(NULL, clk_name, NULL, CLK_IS_ROOT, rate);
>> + if (clk)
>> + of_clk_add_provider(node, of_fixed_clk_get, clk);
>> +}
>
> It seems my comment[1] did not get addressed in this post.
>
> Regards,
> Shawn
>
> [1] http://article.gmane.org/gmane.linux.drivers.devicetree/10589
I just took Grant's commit as is.
It also only works for root fixed clocks, but the common clock allows
for non-root fixed clocks. I don't think there's much use case for that
at least as a DT clock node.
Rob
next prev parent reply other threads:[~2012-03-14 13:26 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-13 23:22 [PATCH 0/7] Highbank clock support using DT Rob Herring
2012-03-13 23:22 ` [PATCH 1/7] clk: fix orphan list iterator to be safe Rob Herring
2012-03-14 2:10 ` Turquette, Mike
2012-03-13 23:22 ` [PATCH 2/7] of: add clock providers Rob Herring
[not found] ` <1331680947-29861-3-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-03-14 7:07 ` Thierry Reding
2012-03-14 7:55 ` Shawn Guo
2012-04-07 4:18 ` Grant Likely
2012-04-07 19:04 ` Rob Herring
2012-04-09 11:55 ` Shawn Guo
[not found] ` <20120409115549.GB18692-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-04-09 13:52 ` Rob Herring
[not found] ` <4F82E9A3.1030606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-04-09 14:13 ` Shawn Guo
[not found] ` <20120409141347.GC18692-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-04-09 14:34 ` Rob Herring
[not found] ` <4F82F386.7080303-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-04-09 23:42 ` Shawn Guo
2012-03-13 23:22 ` [PATCH 3/7] of: Add of_property_match_string() to find index into a string list Rob Herring
2012-04-07 4:22 ` Grant Likely
2012-03-13 23:22 ` [PATCH 4/7] dt/clock: Add handling for fixed clocks and a clock node setup iterator Rob Herring
2012-03-14 7:59 ` Shawn Guo
[not found] ` <20120314075930.GF21337-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-03-14 13:26 ` Rob Herring [this message]
[not found] ` <4F609C79.2060307-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-03-14 13:45 ` Shawn Guo
2012-04-08 14:48 ` Rob Herring
[not found] ` <4F81A53B.7020804-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-04-09 8:49 ` Shawn Guo
[not found] ` <20120409084930.GA18692-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-04-09 14:18 ` Rob Herring
[not found] ` <4F82EFB3.80402-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-04-09 23:27 ` Shawn Guo
[not found] ` <20120409232723.GD18692-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-04-15 3:04 ` Rob Herring
[not found] ` <4F8A3ABA.2080201-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-04-15 7:01 ` Shawn Guo
2012-03-13 23:22 ` [PATCH 5/7] dt/clock: add a simple provider get function Rob Herring
[not found] ` <1331680947-29861-6-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-04-07 4:26 ` Grant Likely
2012-03-13 23:22 ` [PATCH 6/7] dt/clock: add function to get parent clock name Rob Herring
2012-03-13 23:22 ` [PATCH 7/7] clk: add highbank clock support Rob Herring
[not found] ` <1331680947-29861-8-git-send-email-robherring2-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2012-04-10 2:06 ` Shawn Guo
[not found] ` <20120410020638.GG18692-rvtDTF3kK1ictlrPMvKcciBecyulp+rMXqFh9Ls21Oc@public.gmane.org>
2012-04-10 13:17 ` Rob Herring
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=4F609C79.2060307@gmail.com \
--to=robherring2-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
--cc=shawn.guo-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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).