From: sebastian.hesselbarth@gmail.com (Sebastian Hesselbarth)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: add si5351 i2c common clock driver
Date: Mon, 11 Feb 2013 10:52:10 +0100 [thread overview]
Message-ID: <5118BF4A.1060608@gmail.com> (raw)
In-Reply-To: <20130211054632.11471.24295@quantum>
On 02/11/2013 06:46 AM, Mike Turquette wrote:
> Quoting Sebastian Hesselbarth (2013-02-09 04:59:32)
>> This patch adds a common clock driver for Silicon Labs Si5351a/b/c
>> i2c programmable clock generators. Currently, the driver supports
>> DT kernels only and VXCO feature of si5351b is not implemented. DT
>> bindings selectively allow to overwrite stored Si5351 configuration
>> which is very helpful for clock generators with empty eeprom
>> configuration. Corresponding device tree binding documentation is
>> also added.
>>
>> Signed-off-by: Sebastian Hesselbarth<sebastian.hesselbarth@gmail.com>
>> ---
>> Notes:
>> - During development I used a debugfs clock consumer that I can also
>> post if there is interest in it.
>
> Please do. I have a set of patches that implement a fake clock subtree
> for testing the core framework. I've been thinking of pushing this to
> the list once it is more presentable and your work might fit into that
> nicely.
Mike,
then I will clean the debugfs driver and post it together with this
patch for 3.9-rc1 as an individual patch.
>> - With current (3.8-rc6) common clock framework there is two (minor)
>> issues:
>> * although clocks are registered with devm_clk_register they are not
>> removed from the clock tree on unloading. That makes reloading of
>> clk-si5351 as module impossible.
>
> This is a known issue. clk_unregister is a NOP and defining it has
> always been deferred until the day that someone needed it. Care to
> take a crack at it?
Ok. I can have a look at it and propose a patch but that will take a
while as other stuff came in between. But IMHO, preparing/enabling
clocks by clock consumers should increase reference count so referenced
modules cannot be unloaded.. but that I have never had a look at, yet ;)
>> * potentially there could be more than one different external si5351
>> generators but clocks are registered with names that do not refer
>> to e.g. the device name. Maybe common clock framework should
>> prepend the device name for each registered clock, i.e. 0-0060.clk0.
>> That would also avoid name collisions with same clock names from
>> different drivers (clk0 is likely to be used by others ;))
>
> More unfinished work, just like clk_unregister above. I'm sure you are
> aware that clk_register takes struct device *dev as input, but does
> nothing with it. It wouldn't take much to concatenate the device name
> and clock name if dev is present. However a complication here is that
> the registration code takes a parent string name to match parents up for
> discrete subtrees; how could statically defined data know about the
> device name ahead of time?
I see. Wrt the above comment about spare time, would prepending DT
clocks be sufficient? Or/And use a fallback mechanism that first tries
a full match, full match with own device name, and relaxed match for
clock name as it is now?
> The above design decision took place before the big DT push we have
> today and was short-sighted. It would be better to change the framework
> to rely less on string name lookups and DT is one way out of that.
>
> 3.8-rc7 is already out and I don't plan to take anything that hasn't
> already been submitted for 3.9 now. Can you resubmit this after 3.9-rc1
> comes out?
Sure, but I'll be not available next 2 weeks or so. If 3.8 falls
within that time, I will re-post it later. It is ok for me, if it has
to go in after 3.9 also.
Sebastian
next prev parent reply other threads:[~2013-02-11 9:52 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-09 12:59 [PATCH] clk: add si5351 i2c common clock driver Sebastian Hesselbarth
2013-02-11 5:46 ` Mike Turquette
2013-02-11 9:52 ` Sebastian Hesselbarth [this message]
2013-02-18 10:19 ` Daniel Mack
2013-02-19 19:15 ` Daniel Mack
2013-02-27 10:01 ` Sebastian Hesselbarth
2013-03-01 15:01 ` Daniel Mack
2013-03-16 13:10 ` [PATCH v2] " Sebastian Hesselbarth
2013-03-16 15:10 ` Daniel Mack
2013-03-18 10:43 ` [PATCH v3] " Sebastian Hesselbarth
2013-03-18 11:37 ` Daniel Mack
2013-03-20 0:26 ` Mike Turquette
2013-03-20 8:20 ` Sebastian Hesselbarth
2013-03-21 18:09 ` Lars-Peter Clausen
2013-03-21 21:32 ` Sebastian Hesselbarth
2013-03-23 10:07 ` Lars-Peter Clausen
2013-03-23 14:46 ` [PATCH v4] " Sebastian Hesselbarth
2013-04-02 23:46 ` Mike Turquette
2013-04-03 11:10 ` Sebastian Hesselbarth
2013-04-05 5:23 ` [PATCH v5] " Sebastian Hesselbarth
2013-04-07 22:50 ` [v5] " Guenter Roeck
2013-04-07 23:49 ` Sebastian Hesselbarth
2013-04-08 0:17 ` Guenter Roeck
2013-04-08 6:11 ` Sebastian Hesselbarth
2013-04-08 14:54 ` Guenter Roeck
2013-04-08 15:38 ` Sebastian Hesselbarth
2013-04-08 17:36 ` Mike Turquette
2013-04-08 18:32 ` Sebastian Hesselbarth
2013-04-08 16:46 ` [PATCH v6] " Sebastian Hesselbarth
2013-04-08 17:46 ` Guenter Roeck
2013-04-08 18:24 ` Sebastian Hesselbarth
2013-04-10 9:40 ` [PATCH v7] " Sebastian Hesselbarth
2013-04-10 10:17 ` Daniel Mack
2013-04-10 14:48 ` Michal Bachraty
2013-04-10 17:27 ` Sebastian Hesselbarth
2013-04-11 7:44 ` Michal Bachraty
2013-04-11 8:22 ` Sebastian Hesselbarth
2013-04-10 19:34 ` Guenter Roeck
2013-04-11 19:42 ` [PATCH v8] " Sebastian Hesselbarth
2013-04-12 11:43 ` Michal Bachraty
2013-04-12 18:19 ` Mike Turquette
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=5118BF4A.1060608@gmail.com \
--to=sebastian.hesselbarth@gmail.com \
--cc=linux-arm-kernel@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;
as well as URLs for NNTP newsgroup(s).