From: James Hogan <james.hogan@imgtec.com>
To: Mike Turquette <mturquette@linaro.org>,
Russell King <linux@arm.linux.org.uk>,
linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, James Hogan <james.hogan@imgtec.com>
Subject: [RFC 0/2] clk: dt: generic DT preset clock frequency bindings
Date: Fri, 20 Dec 2013 22:08:45 +0000 [thread overview]
Message-ID: <1387577327-5007-1-git-send-email-james.hogan@imgtec.com> (raw)
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
next reply other threads:[~2013-12-20 22:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-20 22:08 James Hogan [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1387577327-5007-1-git-send-email-james.hogan@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mturquette@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®