public inbox for linux-tegra@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Mark Brown
	<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
Cc: Liam Girdwood <lrg-l0cyMroinI0@public.gmane.org>,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 14/17] ASoC: tegra: add tegra30-ahub driver
Date: Mon, 02 Apr 2012 11:27:52 -0600	[thread overview]
Message-ID: <4F79E198.1080606@wwwdotorg.org> (raw)
In-Reply-To: <20120401103117.GD3153-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>

On 04/01/2012 04:31 AM, Mark Brown wrote:
> On Sat, Mar 31, 2012 at 08:04:58PM -0600, Stephen Warren wrote:
>> On 03/31/2012 02:14 PM, Mark Brown wrote:
> 
>>> This looks like a fairly clear sign that this should be a CODEC driver,
> 
>> My aim here was to get something basic in place before I looked into all
>> the "SoC DSP" and separate FE/BE stuuf, and how to express the AHUB and
>> DAS as codecs.
> 
> The DAS might be more suited to the soc-pcm model given that there's
> more of a tight coupling between what goes in and what comes out (from
> what I remember).
> 
>>> or possibly the DMA driver - if nothing else even if you didn't change
>>> anything else about the implementation it'd ensure that you didn't need
>>> to open code this probe checking.
> 
>> Maybe just because I haven't looked into this at all, but I'm not sure
>> how this would solve the probing issue; I can see that the machine
>> driver wouldn't (ASoC rather than pdev) probe until the AHUB driver had
>> (pdev) probed, but how would that affect the dependent device probes? I
>> suppose it'd work out if the dependent devices didn't touch HW until
>> their ASoC probes?
> 
> Yes, exactly - allocate the resources in the platform driver probes,
> register with ASoC and then only touch the hardware when ASoC tells you
> the whole card is ready.

Thinking about this more, I guess the AHUB driver should be a bus
driver; in HW, it implements a register bus and the I2S, SPDIF, and DAM
devices' registers are accessed through that bus. That would solve the
probing order issues in a way that's much more directly modeled on the
hardware. Relying on the separate pdev and ASoC probes for the child
devices seems a little bit like relying on an implementation detail.

Does this sound like a good idea to you?

I imagine doing this through device-tree upstream is fairly easy (just
like I2C for example), but haven't looked in detail yet.

The thing that makes me shy away from this is when our downstream
kernels want to pick up v3.5, and perhaps don't want to use DT
exclusively yet, how would they do the same bus/child thing with
platform devices in board files? Perhaps they don't need to, and can
just register the AHUB pdev first, and child devices later, and ignore
the bus' existence.

Now, whether to represent the AHUB as a codec or not, and whether the
machine driver's DT binding needs an AHUB node is an orthogonal issue, I
think.

  parent reply	other threads:[~2012-04-02 17:27 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-30 23:07 [PATCH 00/17] ASoC: tegra: Add Tegra30 support Stephen Warren
2012-03-30 23:07 ` [PATCH 01/17] ASoC: tegra: remove open-coded clk reference counting Stephen Warren
     [not found] ` <1333148852-17806-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-30 23:07   ` [PATCH 02/17] ASoC: tegra: ensure clocks are enabled when touching registers Stephen Warren
     [not found]     ` <1333148852-17806-3-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-31 19:14       ` Mark Brown
2012-03-30 23:07   ` [PATCH 03/17] ASoC: tegra: remove unnecessary includes Stephen Warren
     [not found]     ` <1333148852-17806-4-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-31 19:44       ` Mark Brown
2012-03-30 23:07   ` [PATCH 04/17] ASoC: tegra: add description to a couple Kconfig options Stephen Warren
2012-03-31 19:48     ` Mark Brown
     [not found]       ` <20120331194848.GG5012-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-04-02 16:32         ` Stephen Warren
     [not found]           ` <4F79D49F.9000000-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-02 16:37             ` Mark Brown
2012-03-30 23:07   ` [PATCH 05/17] ASoC: tegra: fix Kconfig SND_SOC_TEGRA_ALC5632 indentation Stephen Warren
2012-03-31 19:49     ` Mark Brown
2012-03-30 23:07   ` [PATCH 06/17] ASoC: tegra: fix some checkpatch warnings Stephen Warren
     [not found]     ` <1333148852-17806-7-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-31 19:49       ` Mark Brown
2012-03-30 23:07   ` [PATCH 07/17] ASoC: tegra: introduce separate Kconfig variable for DAS driver Stephen Warren
     [not found]     ` <1333148852-17806-8-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-31 19:49       ` Mark Brown
2012-03-30 23:07   ` [PATCH 08/17] ASoC: tegra: make Tegra20 drivers depend on Tegra20 support Stephen Warren
2012-03-30 23:07   ` [PATCH 09/17] ASoC: tegra: sort Makefile into common and per-SoC files Stephen Warren
     [not found]     ` <1333148852-17806-10-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-31 19:50       ` Mark Brown
2012-03-30 23:07   ` [PATCH 11/17] ASoC: tegra: complete Tegra->Tegra20 renaming Stephen Warren
2012-03-30 23:07   ` [PATCH 12/17] ASoC: tegra: utils: add support for Tegra30 devices Stephen Warren
     [not found]     ` <1333148852-17806-13-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-31 20:20       ` Mark Brown
     [not found]         ` <20120331202015.GN5012-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-04-01  1:57           ` Stephen Warren
     [not found]             ` <4F77B5F8.8080205-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-01 10:28               ` Mark Brown
     [not found]                 ` <20120401102814.GC3153-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-04-02 17:44                   ` Stephen Warren
     [not found]                     ` <4F79E584.7080904-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-02 21:30                       ` Mark Brown
2012-03-30 23:07   ` [PATCH 13/17] ASoC: tegra: set a sensible initial clock rate Stephen Warren
     [not found]     ` <1333148852-17806-14-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-31 20:17       ` Mark Brown
     [not found]         ` <20120331201754.GM5012-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-04-01  2:07           ` Stephen Warren
2012-04-01 10:36             ` Mark Brown
2012-03-30 23:07   ` [PATCH 14/17] ASoC: tegra: add tegra30-ahub driver Stephen Warren
     [not found]     ` <1333148852-17806-15-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-31 20:14       ` Mark Brown
     [not found]         ` <20120331201433.GL5012-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-04-01  2:04           ` Stephen Warren
     [not found]             ` <4F77B7CA.3020803-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-01 10:31               ` Mark Brown
     [not found]                 ` <20120401103117.GD3153-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-04-02 17:27                   ` Stephen Warren [this message]
     [not found]                     ` <4F79E198.1080606-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-02 22:04                       ` Mark Brown
2012-03-30 23:07   ` [PATCH 15/17] ASoC: tegra: add tegra30-i2s driver Stephen Warren
     [not found]     ` <1333148852-17806-16-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-03-31 21:34       ` Mark Brown
2012-04-01  2:17         ` Stephen Warren
     [not found]           ` <4F77BAA6.7060304-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-01 10:25             ` Mark Brown
2012-03-30 23:07   ` [PATCH 16/17] ASoC: tegra: add Kconfig and Makefile support for Tegra30 Stephen Warren
2012-03-30 23:07   ` [PATCH 17/17] ASoC: tegra+wm8903 machine: support Tegra30 Stephen Warren
2012-03-31 19:44   ` [PATCH 00/17] ASoC: tegra: Add Tegra30 support Mark Brown
     [not found]     ` <20120331194429.GE5012-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2012-04-02 16:03       ` Stephen Warren
     [not found]         ` <4F79CDE6.6030501-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-04-02 16:06           ` 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=4F79E198.1080606@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
    --cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=lrg-l0cyMroinI0@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