lkml.org 
[lkml]   [2013]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/3] x86, pci sta2x11-fixup: add function to access sta2x11 instance id
On Fri, Mar 08, 2013 at 04:13:34PM +0000, Arnd Bergmann wrote:
> On Friday 08 March 2013, Davide Ciminaghi wrote:
> >
> > The sta2x11 instance id will be included in clock names to make them
> > unique in case of multiple sta2x11's living on the same machine.
> >
> > Signed-off-by: Davide Ciminaghi <ciminaghi@gnudd.com>
>
> I might be missing something, but this seems counterintuitive. Shouldn't
> the clock names really be constant and independent of the instance?
>
> The instance should be identified already by the dev_name, right?
>
Hi,

sorry for the delay.
Well, I actually wrote this some months ago, so I might also be missing
something (yes, I know I shouldn't :-).
If I understand well, I should call clk_register_* with dev pointing to
the struct device corresponding to the sta2x11 instance to which the clock
belongs and a constant name (while currently I set dev to NULL and use a
different name for each instance of the same clock, by postfixing the name
with an instance id).
You're probably right, even if looking at the code in drivers/clk/clk.c,
there's something I'm not sure about (and I cannot do any tests right now):

_clk_register() takes hw->init->name as clock name, where hw->init->name
should come from the second arg of clk_register_*, if I'm not wrong.
Then __clk_init does:

if (__clk_lookup(clk->name)) {
pr_debug("%s: clk %s already initialized\n", __func__, clk->name);
ret = -EEXIST;
goto out;
}

Is it actually possible registering multiple clocks with the same name ?
Sorry maybe I missed your point ...


Thanks and regards
Davide


\
 
 \ /
  Last update: 2013-03-12 02:21    [W:0.041 / U:0.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site