alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: Mark Brown <broonie@kernel.org>
Cc: Jean-Francois Moine <moinejf@free.fr>,
	alsa-devel@alsa-project.org, Takashi Iwai <tiwai@suse.de>,
	Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <rob.herring@calxeda.com>,
	linux-kernel@vger.kernel.org, devicetree-discuss@vger.kernel.org,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Subject: Re: [PATCH v3] ARM: kirkwood: extend the kirkwood i2s	driver for DT usage
Date: Tue, 23 Jul 2013 16:19:56 +0100	[thread overview]
Message-ID: <20130723151956.GX24642@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20130723150150.GH9858@sirena.org.uk>

On Tue, Jul 23, 2013 at 04:01:50PM +0100, Mark Brown wrote:
> On Tue, Jul 23, 2013 at 03:30:57PM +0200, Sebastian Hesselbarth wrote:
> > On 07/23/13 15:20, Mark Brown wrote:
> 
> > >Why would this be required?  The driver is already asking for multiple
> > >clocks...
> 
> > The driver is asking for multiple *DT based* clocks. Legacy
> > platform_data has never been updated to reflect that. Mainly because
> > multiple clocks are only supported on Dove, which has no active non-DT
> > board in mainline.
> 
> Why would platform data have anything to do with this?  To repeat again
> the way the clocks are mapped should be totally transparent to the
> driver requesting them, if it isn't then the driver is not using the API
> properly.

Total rubbish.  Of course the driver needs to know what the clocks are,
so that it can program its hardware accordingly.

What you have here is an audio block which has two clock inputs.  One
clock is the system clock, whose rate can be adjusted but has a massive
impact on the rest of the system.  The other clock input is via an
external pin.

Internally, in one of the audio blocks registers is a set of control bits
which select which clock is to be used to generate the internal timing
for the block, and a divisor on that input.

>From that description, anyone can see that it is absolutely required for
the driver to know which clock is which, so it can program the clock
input selection bit appropriately.

In this case, it has always been the rule with the clock API that it
shall be used as:

	clk_get(device, "internal");

to get the internal clock, and:

	clk_get(device, "external");

to get the external clock - or whatever names are appropriate to name the
clock _inputs_.

  reply	other threads:[~2013-07-23 15:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23  8:46 [PATCH v3] ARM: kirkwood: extend the kirkwood i2s driver for DT usage Jean-Francois Moine
2013-07-23  8:53 ` Russell King - ARM Linux
2013-07-23  9:03   ` Lars-Peter Clausen
2013-07-23  9:08   ` Sascha Hauer
2013-07-23  9:39     ` Russell King - ARM Linux
2013-07-23  9:48       ` [alsa-devel] " Sascha Hauer
2013-07-23 12:34 ` Mark Brown
2013-07-23 12:59   ` [alsa-devel] " Sebastian Hesselbarth
2013-07-23 13:20     ` Mark Brown
2013-07-23 13:30       ` Sebastian Hesselbarth
2013-07-23 13:50         ` Russell King - ARM Linux
2013-07-23 17:04           ` Mark Brown
2013-07-23 15:01         ` [alsa-devel] " Mark Brown
2013-07-23 15:19           ` Russell King - ARM Linux [this message]
2013-07-23 17:16             ` Mark Brown
2013-07-23 15:34         ` [alsa-devel] " Jean-Francois Moine

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=20130723151956.GX24642@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=alsa-devel@alsa-project.org \
    --cc=broonie@kernel.org \
    --cc=devicetree-discuss@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moinejf@free.fr \
    --cc=rob.herring@calxeda.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tiwai@suse.de \
    /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).