Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: robh@kernel.org (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 4/7] rtc: sun6i: Expose the 32kHz oscillator
Date: Mon, 23 Jan 2017 15:00:52 -0600	[thread overview]
Message-ID: <20170123210052.rek7fma5gjukq2ld@rob-hp-laptop> (raw)
In-Reply-To: <f244737aa43965e5510e8173b5653deb484a94f0.1485168100.git-series.maxime.ripard@free-electrons.com>

On Mon, Jan 23, 2017 at 11:41:49AM +0100, Maxime Ripard wrote:
> The RTC controls the input source of the main 32kHz oscillator in the
> system, feeding it to the clock unit too.
> 
> By default, this is using an internal, very inaccurate (+/- 30%)
> oscillator with a divider to make it roughly around 32kHz. This is however
> quite impractical for the RTC, since our time will not be tracked properly.
> 
> Since this oscillator is an input of the main clock unit, and since that
> clock unit will be probed using CLK_OF_DECLARE, we have to use it as well,
> leading to a two stage probe: one to enable the clock, the other one to
> enable the RTC.
> 
> There is also a slight change in the binding that is required (and should
> have been from the beginning), since we'll need a phandle to the external
> oscillator used on that board. We support the old binding by not allowing
> to switch to the external oscillator and only using the internal one (which
> was the previous behaviour) in the case where we're missing that phandle.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  Documentation/devicetree/bindings/rtc/sun6i-rtc.txt |  10 +-

Acked-by: Rob Herring <robh@kernel.org>

>  drivers/rtc/rtc-sun6i.c                             | 146 +++++++++++--
>  2 files changed, 143 insertions(+), 13 deletions(-)

  reply	other threads:[~2017-01-23 21:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-23 10:41 [PATCH v2 0/7] rtc: sun6i: Fix the RTC accuracy Maxime Ripard
2017-01-23 10:41 ` [PATCH v2 1/7] rtc: sun6i: Disable the build as a module Maxime Ripard
2017-01-23 10:41 ` [PATCH v2 2/7] rtc: sun6i: Add some locking Maxime Ripard
2017-01-23 10:41 ` [PATCH v2 3/7] rtc: sun6i: Switch to the external oscillator Maxime Ripard
2017-01-23 10:41 ` [PATCH v2 4/7] rtc: sun6i: Expose the 32kHz oscillator Maxime Ripard
2017-01-23 21:00   ` Rob Herring [this message]
2017-01-23 10:41 ` [PATCH v2 5/7] rtc: sun6i: Switch to devm_rtc_device_register Maxime Ripard
2017-01-23 10:41 ` [PATCH v2 6/7] ARM: sun8i: a23/a33: Enable the real LOSC and use it Maxime Ripard
2017-01-23 10:41 ` [PATCH v2 7/7] ARM: sun8i: a23/a33: Add the oscillators accuracy Maxime Ripard
2017-01-24 17:49 ` [PATCH v2 0/7] rtc: sun6i: Fix the RTC accuracy Alexandre Belloni
2017-01-25 15:36   ` Maxime Ripard

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=20170123210052.rek7fma5gjukq2ld@rob-hp-laptop \
    --to=robh@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.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