From: Jason Cooper <jason@lakedaemon.net>
To: Boris BREZILLON <b.brezillon@overkiz.com>
Cc: Rob Landley <rob@landley.net>,
Rob Herring <rob.herring@calxeda.com>,
Pawel Moll <pawel.moll@arm.com>,
Mark Rutland <mark.rutland@arm.com>,
Stephen Warren <swarren@wwwdotorg.org>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Mike Turquette <mturquette@linaro.org>,
Russell King <linux@arm.linux.org.uk>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
devicetree@vger.kernel.org, linux-doc@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/2] clk: add accuracy support for fixed clock
Date: Wed, 27 Nov 2013 09:56:20 -0500 [thread overview]
Message-ID: <20131127145620.GR2879@titan.lakedaemon.net> (raw)
In-Reply-To: <1385556285-19180-3-git-send-email-b.brezillon@overkiz.com>
Boris,
Thanks for posting this series. Bear with me as I'm attempting to give
MikeT a hand. Don't be afraid to tell me a question is stupid :-)
On Wed, Nov 27, 2013 at 01:44:45PM +0100, Boris BREZILLON wrote:
> This patch adds support for accuracy retrieval on fixed clocks.
> It also adds a new dt property called 'clock-accuracy' to define the clock
> accuracy.
>
> This can be usefull for oscillator (RC, crystal, ...) definitions which are
> always given an accuracy characteristic.
I think we need to be more explicit in the binding and the API,
especially when providing a method to recalculate the accuracy. I
presume this recalculated value would be relative against the root
clock?
There really needs to be two attributes here: the rated accuracy from
the manufacturer, and the calculated accuracy wrt another clock in the
system. We only need a binding for the manufacturer rating since the
calculated accuracy is determined at runtime.
I would also prefer to see an unknown accuracy be -1. There are already
clocks on the market (PPS reference clocks) with accuracies of
0.1ppb/day [1]. Obviously, these aren't system clocks. So the limit on
accuracy may be a non-issue. However, it may be worth changing the
binding property to express the units.
> Signed-off-by: Boris BREZILLON <b.brezillon@overkiz.com>
> ---
> .../devicetree/bindings/clock/fixed-clock.txt | 3 ++
> drivers/clk/clk-fixed-rate.c | 43 +++++++++++++++++---
> include/linux/clk-provider.h | 4 ++
> 3 files changed, 44 insertions(+), 6 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/clock/fixed-clock.txt b/Documentation/devicetree/bindings/clock/fixed-clock.txt
> index 0b1fe78..48ea0ad 100644
> --- a/Documentation/devicetree/bindings/clock/fixed-clock.txt
> +++ b/Documentation/devicetree/bindings/clock/fixed-clock.txt
> @@ -10,6 +10,8 @@ Required properties:
> - clock-frequency : frequency of clock in Hz. Should be a single cell.
>
> Optional properties:
> +- clock-accuracy : accuracy of clock in ppb (parts per billion).
> + Should be a single cell.
I would prefer to call this property 'clock-rated-ppb'.
> - gpios : From common gpio binding; gpio connection to clock enable pin.
> - clock-output-names : From common clock binding.
>
> @@ -18,4 +20,5 @@ Example:
> compatible = "fixed-clock";
> #clock-cells = <0>;
> clock-frequency = <1000000000>;
> + clock-accuracy = <100>;
> };
thx,
Jason.
[1] http://www.vectron.com/products/modules/md-010.htm
next prev parent reply other threads:[~2013-11-27 14:56 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-27 12:44 [PATCH v2 0/2] clk: add clk accuracy support Boris BREZILLON
2013-11-27 12:44 ` [PATCH v2 1/2] clk: add clk accuracy retrieval support Boris BREZILLON
2013-12-02 7:50 ` Uwe Kleine-König
2013-12-02 12:17 ` boris brezillon
2013-11-27 12:44 ` [PATCH v2 2/2] clk: add accuracy support for fixed clock Boris BREZILLON
2013-11-27 14:56 ` Jason Cooper [this message]
2013-11-27 17:19 ` boris brezillon
2013-11-27 18:10 ` Mike Turquette
2013-11-28 8:02 ` boris brezillon
2013-12-02 3:15 ` Jason Cooper
2013-12-04 19:14 ` Mike Turquette
2013-12-02 3:02 ` Jason Cooper
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=20131127145620.GR2879@titan.lakedaemon.net \
--to=jason@lakedaemon.net \
--cc=b.brezillon@overkiz.com \
--cc=devicetree@vger.kernel.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=mark.rutland@arm.com \
--cc=mturquette@linaro.org \
--cc=nicolas.ferre@atmel.com \
--cc=pawel.moll@arm.com \
--cc=rob.herring@calxeda.com \
--cc=rob@landley.net \
--cc=swarren@wwwdotorg.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®