mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RFC 0/2] clk: dt: generic DT preset clock frequency bindings
@ 2013-12-20 22:08 James Hogan
  2013-12-20 22:08 ` [RFC 1/2] dt: binding: add clock-N-frequency to common clock bindings James Hogan
  2013-12-20 22:08 ` [RFC 2/2] clk: implement generic DT preset clock frequency James Hogan
  0 siblings, 2 replies; 3+ messages in thread
From: James Hogan @ 2013-12-20 22:08 UTC (permalink / raw)
  To: Mike Turquette, Russell King, linux-arm-kernel, devicetree
  Cc: linux-kernel, James Hogan

These patches add a property "clock-N-frequency" to the clock consumer
bindings to specify the frequency that a clock should be configured to
when it is made use of. N is the index of a clock specifier in the
clocks property, starting at 0.

It's RFC since there are plenty of ways it could be handled, I've pretty
much just tried the simplest, but I'd like to get some thoughts from
others:
 - Adding such properties to individual device drivers / bindings. The
   bindings could be standardised and handled generically like in this
   patch, although it's not very nicely extensible to more complex
   settings (e.g. setting a particular clock's parent up the hierarchy a
   bit).
 - Adding named phandles like pinctrl clients do for pin configuration
   but to describe clock configuration, the "default" of which is set up
   automatically when a device is probed. This is more extensible, and
   certainly more complex. I suspect it may be overkill.

The point is to avoid the need to add clock-frequency properties to
individual device bindings or modify drivers to set the frequency of
clocks to that requested in device tree. Instead the driver can just
read the rate of the clock as if it was fixed without needing to know
how it has been configured.

This is aimed at devices where it's difficult for drivers to determine
what a clock should be set to, and either there is a recommended
frequency for the particular system or a chosen frequency for the
particular application of the system (which makes it essentially
configuration data).

James Hogan (2):
  dt: binding: add clock-N-frequency to common clock bindings
  clk: implement generic DT preset clock frequency

 .../devicetree/bindings/clock/clock-bindings.txt   |  3 ++
 drivers/clk/clk.c                                  | 34 ++++++++++++++++++++++
 drivers/clk/clkdev.c                               |  3 ++
 include/linux/clk.h                                |  5 ++++
 4 files changed, 45 insertions(+)

-- 
1.8.3.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-12-20 22:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-20 22:08 [RFC 0/2] clk: dt: generic DT preset clock frequency bindings James Hogan
2013-12-20 22:08 ` [RFC 1/2] dt: binding: add clock-N-frequency to common clock bindings James Hogan
2013-12-20 22:08 ` [RFC 2/2] clk: implement generic DT preset clock frequency James Hogan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®