Re: [PATCH 1/2] User access to internal clocks

From: Davide Rizzo
Date: Mon Feb 09 2009 - 12:44:53 EST


>> This driver is for user level programs to interact with system clocks.
>> It allows to read and modify rates and parents, using virtual files.
>> It requires the implementation of 2 additional functions in the clk interface:
>> clk_for_each() and clk_name().
>> Actually I implemented that functions only for Samsung S3C24xx platform.
>
> NAK.
>
>> + name = clk_get_name(clk);
>
> This implies that there is a 1:1 relationship between a 'name' and a
> struct clk. No such thing exists (and where it does, it's being
> eliminated in ARM because it's just plain and simple WRONG.)
>
Not exactly, clk_get() could work in both way: a struct clk can be
exactly identified by name and device id (like clk_get is acting now)
or by full name, in the format clkname.device
Why do you say that it's wrong ? This is the same syntax used for
devices, why couldn't it be used also for clocks ? This should not
break backward compatibility.
May be clk_get_name() should be renamed as clk_get_full_name() ? Or it
would be better to make a function (or 2 different functions) that
returns separated name and device id ?
Otherwise, what do you suggest to enumerate and distinguish all system clocks ?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/