From: Wolfram Sang <wsa@the-dreams.de>
To: Peter Korsgaard <peter@korsgaard.com>
Cc: Max Filippov <jcmvbkbc@gmail.com>,
Peter Korsgaard <jacmet@sunsite.dk>,
linux-i2c@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] i2c-ocores: add common clock support
Date: Thu, 22 Jan 2015 19:57:12 +0100 [thread overview]
Message-ID: <20150122185711.GA14880@katana> (raw)
In-Reply-To: <87wq4e7jqy.fsf@dell.be.48ers.dk>
[-- Attachment #1: Type: text/plain, Size: 1926 bytes --]
On Thu, Jan 22, 2015 at 07:28:21PM +0100, Peter Korsgaard wrote:
> >>>>> "Wolfram" == Wolfram Sang <wsa@the-dreams.de> writes:
>
> >> The clock here is not the i2c bus clock, but the clock input of the
>
> > Yes, what I would expect from a clk-property :)
>
> >> controller. The function ocores_init initializes the prescaler register of
> >> the controller so that the bus clock equals 100kHz (internal clock
> >> runs at 500kHz):
>
> > 'clock-frequency' usually describes the I2C bus speed. So, for ocores,
> > it describes speed of the clock for the controller? That would be
> > ouch...
>
> Indeed :/
Oh well, then let's fix this...
> Looking back in the history, the device tree patch originally used a
> custom "clock_khz" property until some guy told him to use
> clock-frequency ;)
I have sympathy for that guy. Very uncommon to specify IP core clocks
specifically in a dts ;)
My suggestion is:
1) if there is a clk node:
- we get the clock rate via clock framework
- "clock-frequency" is describing the bus speed as usual (Note
that parsing here can be as simple as checking for 100kHz only.
Although a seperate patch could probably easily add support for
other bus speeds to)
2?) a new binding is present to specify the IP clock speed:
- is this needed? is somebody using the driver without CCF?
- if so, the new binding is parsed and evaluated
- I couldn't find an existing binding to specify a clock speed.
Please have a look, too. Otherwise we need to introduce sth
like "opencores,ip-clock-khz" probably.
- "clock-frequency" is describing the bus speed as usual
3) only "clock-frequency" is present:
- we keep the current behaviour to be backwards compatible.
- driver should emit a warning to convert to new style
- must be marked deprecated everywhere
The documentation should be updated accordingly.
Thoughts?
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2015-01-22 18:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-14 10:21 [PATCH] i2c-ocores: add common clock support Max Filippov
[not found] ` <1421230899-7843-1-git-send-email-jcmvbkbc-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-01-16 22:36 ` Peter Korsgaard
2015-01-22 14:45 ` Wolfram Sang
2015-01-22 15:01 ` Max Filippov
[not found] ` <CAMo8Bf+XJY_bY+OB2i_SZQmAavwERG39BR8FVj202V-E3UidPg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-22 15:07 ` Wolfram Sang
2015-01-22 18:28 ` Peter Korsgaard
2015-01-22 18:57 ` Wolfram Sang [this message]
2015-01-22 19:15 ` Max Filippov
[not found] ` <CAMo8BfJdmB-=i4bJypHzGvegxgBPafpiT_hyQXLhvzBUmE+u_g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-22 19:26 ` Wolfram Sang
2015-01-22 20:53 ` Max Filippov
[not found] ` <CAMo8BfJqS1O=ZiVs89wsuNuQ_Qt=2BJtcens=09POucM_OjXrQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-01-22 23:21 ` Wolfram Sang
2015-01-22 20:36 ` Max Filippov
2015-01-22 20:41 ` Wolfram Sang
2015-01-22 15:21 ` Peter Korsgaard
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=20150122185711.GA14880@katana \
--to=wsa@the-dreams.de \
--cc=jacmet@sunsite.dk \
--cc=jcmvbkbc@gmail.com \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peter@korsgaard.com \
/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).