// snip
> This would give us:
>
> #define CLK_NAME_LEN 16
>
> struct clk {
> const struct clk_ops *ops;
> unsigned int enable_count;
> struct mutex mutex;
> const char name[CLK_NAME_LEN];
> };
>
> #define INIT_CLK(name, o) {
> \
> .ops = &o,
> \
> .enable_count = 0,
> \
> .lock.mutex = __MUTEX_INITIALIZER(name.lock.mutex), \
> .name = #name,
> \
> }
>
> I think that allocating a dentry per clk_lookup is quite heavyweight; we could
> just expose one debugfs file, with the whole set of clocks available through
> this file, one clock per line. The seq_file interface makes this fairly
> straightforward to do.
>
Just a few cents, wouldn't it be good as well to add the clk attribute
to each device
where clock is associated? It's a bit tricky though as a device could
have multiple
clocks in theory.
As to the name, I agree with Jeremy that we should have a name field.
_______________________________________________
linaro-dev mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/linaro-dev