Hello,

I am writing a driver for a device which does not require a clock specified
in the device tree and always has the clock enabled for it. In this driver
I require the clock rate of a specific clock, let's say having the name
"foo", for a specific timing calculation.

Having this clock name, is it possible to get the clock rate?. With functions
like clk_get_rate it is mandatory to have the struct clk pointer to the specific
clock which I do not have. While it is definitely possible to specify a clock
explicitly in the DT specification and then have the clock allocation done in
the clock driver for the SoC, since the peripheral block does not require the
clock explicitly, I did like to avoid this.

Is this doable? Something like clk_lookup_by_name("foo") returning a struct clk
pointer.

Regards.


_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@kernelnewbies.org
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies

Reply via email to