From: Geert Uytterhoeven <geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org>
To: Chris Brandt <Chris.Brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
Cc: Alessandro Zummo
<a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org>,
Alexandre Belloni
<alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Simon Horman
<horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org>,
RTCLINUX <rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>,
"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
Linux-Renesas
<linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH 3/5] ARM: dts: r7s72100: add rtc clock to device tree
Date: Fri, 17 Mar 2017 14:57:21 +0100 [thread overview]
Message-ID: <CAMuHMdX776kW12d4Sr7s_f4om5rwLTpF=gCTWZdN49ANLi-Q=Q@mail.gmail.com> (raw)
In-Reply-To: <SG2PR06MB116586A6CF6082C2CF0341AD8A390-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
Hi Chris,
On Fri, Mar 17, 2017 at 2:48 PM, Chris Brandt <Chris.Brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org> wrote:
> On Friday, March 17, 2017, Geert Uytterhoeven wrote:
>> So in the absence of an "rtc0" clock in the device node (you don't have
>> "clock-names" properties in the rtc devvice node yet), it will fall back
>> to clk_get_sys(), and will find the global "rtc0" clock. Unless you call
>> it "rtc"...
>>
>> Most drivers using a single clock just pass NULL instead of a name, so it
>> will match the first clock found.
>>
>> I think the simplest solution is to check if your device is instantiated
>> from DT (pdev->dev.of_node != NULL), and pass NULL (or "fck", when you add
>> multiple clocks to the DT bindings) to devm_clk_get() if that's the case.
>
> OK, so leave current SuperH code the way it is, but add the case for
> (pdev->dev.of_node != NULL) and do things the 'new way' so I can have
> an RTC clock name of "rtc".
Indeed.
> Question: Is your idea to add all the clocks (X1, X3, EXTAL), but put the
> first one as the peripheral clock (the one that runs the register interface 'p0')?
Which one is the peripheral clock doesn't matter if you use clock-names.
The convention is to use "fck" for the functional clock of the device.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
You received this message because you are subscribed to "rtc-linux".
Membership options at http://groups.google.com/group/rtc-linux .
Please read http://groups.google.com/group/rtc-linux/web/checklist
before submitting a driver.
---
You received this message because you are subscribed to the Google Groups "rtc-linux" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rtc-linux+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2017-03-17 13:57 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 17:51 [PATCH 0/5] rtc: Reuse rtc-sh driver to support RZ/A1 Chris Brandt
[not found] ` <20170316175112.27913-1-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-03-16 17:51 ` [PATCH 1/5] rtc: rtc-sh: add support for rza series Chris Brandt
[not found] ` <20170316175112.27913-2-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-03-17 8:22 ` Geert Uytterhoeven
[not found] ` <CAMuHMdXXRiUTJJRsrpyFNEwjvjPO2s5Rthn2r+UipaQgVHHMcQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-17 13:17 ` Chris Brandt
2017-03-17 15:11 ` Alexandre Belloni
2017-03-16 17:51 ` [PATCH 2/5] rtc: Add rtc-sh Chris Brandt
[not found] ` <20170316175112.27913-3-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-03-17 8:17 ` Geert Uytterhoeven
[not found] ` <CAMuHMdVu0dQjptyW0F5YS+V6sixXTM3P6VWq2=8BQ5njUOXf-Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-17 13:16 ` Chris Brandt
[not found] ` <SG2PR06MB1165A9931C930DF9BCD5C0A98A390-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-03-17 13:21 ` Geert Uytterhoeven
[not found] ` <CAMuHMdW0nHiZkE_RxVLX3G0MuwQLPHVFyNq5C1tx0yAqDQefaA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-17 13:41 ` Chris Brandt
[not found] ` <SG2PR06MB11653BB788CADBEE78FE4CF58A390-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-03-17 13:55 ` Geert Uytterhoeven
[not found] ` <CAMuHMdWs3NtKLiBnKCmxGYNBW3zzWYydj=JGKr+mH7ao97L2_Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-17 15:05 ` Alexandre Belloni
[not found] ` <20170317150524.oijto6gtjxycdnwn-m++hUPXGwpdeoWH0uzbU5w@public.gmane.org>
2017-03-20 15:05 ` Chris Brandt
[not found] ` <SG2PR06MB1165819F41CF40562F44F08B8A3A0-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-03-20 16:03 ` Geert Uytterhoeven
[not found] ` <CAMuHMdWxs4Xwc0T5AHL73ZtF6r8pN9v6g-GEzozdLvTc4j4aSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-20 16:26 ` Chris Brandt
[not found] ` <SG2PR06MB11650F098CFD2BCCB74C823B8A3A0-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-03-20 22:45 ` Alexandre Belloni
2017-03-16 17:51 ` [PATCH 3/5] ARM: dts: r7s72100: add rtc clock to device tree Chris Brandt
[not found] ` <20170316175112.27913-4-chris.brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>
2017-03-17 8:27 ` Geert Uytterhoeven
[not found] ` <CAMuHMdXAvMoLu5azcBfX5pH_KYApcYSipBktpbfLybvnCG+bwg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-17 13:20 ` Chris Brandt
[not found] ` <SG2PR06MB1165ECF439A79E31978ACF228A390-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-03-17 13:33 ` Geert Uytterhoeven
[not found] ` <CAMuHMdWm=4My_H-i-fNpXY9knSLpN+-zNarC5Xdq08kgvauM_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-03-17 13:48 ` Chris Brandt
[not found] ` <SG2PR06MB116586A6CF6082C2CF0341AD8A390-ESzmfEwOt/xoAsOJh7vwSm0DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-03-17 13:57 ` Geert Uytterhoeven [this message]
2017-03-17 15:16 ` Alexandre Belloni
2017-03-16 17:51 ` [PATCH 5/5] ARM: dts: rskrza1: add rtc DT support Chris Brandt
2017-03-28 13:38 ` [PATCH 0/5] rtc: Reuse rtc-sh driver to support RZ/A1 bobethtarsi3-Re5JQEeQqe8AvxtiuMwx3w
2017-03-16 17:51 ` [PATCH 4/5] ARM: dts: r7s72100: add rtc to device tree Chris Brandt
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='CAMuHMdX776kW12d4Sr7s_f4om5rwLTpF=gCTWZdN49ANLi-Q=Q@mail.gmail.com' \
--to=geert-td1emuhucqxl1znqvxdv9g@public.gmane.org \
--cc=Chris.Brandt-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
--cc=a.zummo-BfzFCNDTiLLj+vYz1yj4TQ@public.gmane.org \
--cc=alexandre.belloni-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=horms+renesas-/R6kz+dDXgpPR4JQBCEnsQ@public.gmane.org \
--cc=linux-renesas-soc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=rtc-linux-/JYPxA39Uh5TLH3MbocFFw@public.gmane.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;
as well as URLs for NNTP newsgroup(s).