From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Mark Brown <broonie@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>,
Oder Chiou <oder_chiou@realtek.com>,
alsa-devel@alsa-project.org, Heiko Stuebner <heiko@sntech.de>,
Pawel Moll <pawel.moll@arm.com>,
Ian Campbell <ijc+devicetree@hellion.org.uk>,
Takashi Iwai <tiwai@suse.com>,
linux-kernel@vger.kernel.org, Liam Girdwood <lgirdwood@gmail.com>,
Sugar Zhang <sugar.zhang@rock-chips.com>,
devicetree@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Kumar Gala <galak@codeaurora.org>,
Bard Liao <bardliao@realtek.com>
Subject: Re: [PATCH] ASoC: rt5640: add master clock handling for rt5640
Date: Fri, 26 Feb 2016 09:43:15 -0600 [thread overview]
Message-ID: <56D07293.902@linux.intel.com> (raw)
In-Reply-To: <20160226010818.GZ18327@sirena.org.uk>
On 2/25/16 7:08 PM, Mark Brown wrote:
> On Wed, Feb 24, 2016 at 10:10:05AM -0600, Pierre-Louis Bossart wrote:
>> On 2/23/16 9:32 PM, Mark Brown wrote:
>
>>> That said we really do need x86 to transition to use the clock API
>>> in order to integrate with external devices, where the machine driver
>>> does manage clocks we want that to move to being done using the clock
>>> API rather than custom APIs.
>
>> For Baytrail audio we have a single platform clock that can be turned
>> on/off and set to 19.2 MHz or 25 MHz. No other controls are available,
>> no multipliers or complicated dependencies on other clocks, parents or
>> children and no other users for this clock but the audio subsystem.
>> I looked at the clock framework and couldn't figure out how it would simply
>> map the hardware so for now the use of the MCLK is only enabled with an
>> on/off or set-rate(19.2|25) custom API. I am not an expert here so if this
>> clock framework becomes a requirement to upstream code I would appreciate
>> any pointers to do the right thing. I really couldn't find a simple example
>> with 'Put your code here' comments to use this framework.
>
> There's a lot of helpers like -fixed, -gate and so on - this sounds like
> you could probably use those helpers (there should be lots of examples
> in the kernel) or just implement a simple provider (see clk-provider.h)
> depending on how the control is mapped in. If it's that simple just
> open coding a provider ought to do the job. Then set up the client
> linkage with clkdev in some way that makes sense for your platform.
Yes there are documentation and helpers I looked into, but to the best
of my limited knowledge not for the gate + dual-rate case. Then you jump
to complicated configurations combining multiple base clocks that don't
really make sense here. After one frustrating day of trying to wrap 100
lines of code into the clock framework I gave up and kept the simple
custom driver. There is a single client for this clock so I don't quite
see the benefits/ROI of mapping a simple piece of hardware with a
complex model.
next prev parent reply other threads:[~2016-02-26 15:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-23 1:26 [PATCH] ASoC: rt5640: add master clock handling for rt5640 Sugar Zhang
2016-02-23 14:50 ` [alsa-devel] " Pierre-Louis Bossart
2016-02-23 23:08 ` Heiko Stuebner
2016-02-24 3:32 ` Mark Brown
[not found] ` <20160224033259.GL18327-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2016-02-24 16:10 ` [alsa-devel] " Pierre-Louis Bossart
2016-02-26 1:08 ` Mark Brown
2016-02-26 15:43 ` Pierre-Louis Bossart [this message]
2016-02-27 1:51 ` Mark Brown
2016-02-23 22:00 ` Rob Herring
[not found] ` <1456190782-18865-1-git-send-email-sugar.zhang-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-02-24 3:37 ` Mark Brown
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=56D07293.902@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=bardliao@realtek.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=heiko@sntech.de \
--cc=ijc+devicetree@hellion.org.uk \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=oder_chiou@realtek.com \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=sugar.zhang@rock-chips.com \
--cc=tiwai@suse.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).