All of lore.kernel.org
 help / color / mirror / Atom feed
* How to get clk rate using clk name?
@ 2015-06-26 15:32 victorascroft at gmail.com
  0 siblings, 0 replies; only message in thread
From: victorascroft at gmail.com @ 2015-06-26 15:32 UTC (permalink / raw)
  To: kernelnewbies

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.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-06-26 15:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-26 15:32 How to get clk rate using clk name? victorascroft at gmail.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.