linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: alsa-devel@alsa-project.org, kumar.gala@freescale.com,
	linuxppc-dev@ozlabs.org, Timur Tabi <timur@freescale.com>,
	Liam Girdwood <lrg@slimlogic.co.uk>
Subject: Re: [alsa-devel] [PATCH 1/2] powerpc: add platform registration for ALSA SoC drivers
Date: Wed, 28 Apr 2010 13:07:19 +0100	[thread overview]
Message-ID: <20100428120719.GE31400@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1272427811.24542.59.camel@pasglop>

On Wed, Apr 28, 2010 at 02:10:11PM +1000, Benjamin Herrenschmidt wrote:
> On Tue, 2010-04-27 at 23:29 +0100, Mark Brown wrote:

> > On the other hand from a pragmatic point of view it's just much less
> > hassle to just only provide the mechanism for instantiating a machine
> > with custom code and use that for everything.

> Right, that's the balance to find. A too descriptive device-tree becomes
> a mess, and attempting to deal with any kind of representation in SW is
> horrible.

Sadly this often seems to be what the device tree folks are pushing
for.  I really want whatever you guys come up with to explicitly say
that it's OK to just write standard code like we have at the minute and
not faff around defining device tree representations for everything so
that we can just point people at that when the discussion gets too
bogged down.

> For example, one could imagine a /sound node with simply a "compatible"
> property that matches what we call in AOA terminology a "fabric" driver.
> IE. The one thing specific to the board that puts bits and pieces
> together.

This is the current ASoC design (someone probably ought to look at
merging AOA into ASoC, it's approximately the same hardware and at least
the CPU driver ought to be useful for other systems).

> Now, the device-tree is still obviously useful to provide things like
> the actual i2c IDs of codecs, GPIOs used for various actions, link to
> from various components to their clock source devices, etc.. All these
> things simplify the code, avoids horrid board specific code in the
> actual drivers (codecs, busses, etc...) and overall help keeping the
> code more maintainable. 

You're preaching to the choir here.  With ASoC all this system specific
code ends up in the machine driver (which you guys are calling the
fabric driver).  All the design stuff you're talking about here is
already dealt with as-is, it's just that the parameterisation is done
with C code and data structures in the kernel (which can deal with
multiple boards if it chooses to) rather than with device tree stuff.
The chip specific drivers do not have any board specific code so there
is no meaningful change that's being proposed to them.

The problems with the device tree have been that people have been
hostile to the idea of there being any board specific code at all in the
kernel (or a board specific device tree node for the audio), and that
people keep wanting to define some OF stuff that is supposed to cover a
wide range of boards but makes unrealistic simplifying assumptions about
what general hardware looks like.

> The device-tree helps keep the platform .c file simple and devoid of too
> horrible hacks, it allows to easily pass various configuration data to
> leaf drivers such as i2c thingies, PHY devices etc... without gross
> hooks between these and the platform, but the platform code still has
> the upper hand for doing ad-hoc bits and pieces (or overwriting the
> device-tree based behaviour) if necessary.

Once again, if you can get the device tree guys to buy into this and
stick with it that sounds good but my experience has been that this
isn't where any of these discussions end up.

  reply	other threads:[~2010-04-28 12:07 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-26 20:49 [PATCH 1/2] powerpc: add platform registration for ALSA SoC drivers Timur Tabi
2010-04-27  6:36 ` Benjamin Herrenschmidt
2010-04-27  8:07   ` [alsa-devel] " Liam Girdwood
2010-04-27 14:52     ` Timur Tabi
2010-04-27 15:20       ` Liam Girdwood
2010-04-27 15:28         ` Timur Tabi
2010-04-27 15:56           ` Timur Tabi
2010-04-27 16:41           ` Liam Girdwood
2010-04-27 18:32             ` Timur Tabi
2010-04-27 19:15               ` Grant Likely
2010-04-27 20:04                 ` Timur Tabi
2010-04-27 20:38                   ` Mark Brown
2010-04-28  4:19                   ` Benjamin Herrenschmidt
2010-04-28  4:18                 ` Benjamin Herrenschmidt
2010-04-30 21:46         ` Timur Tabi
2010-04-30 22:04           ` Timur Tabi
2010-04-27 20:24     ` Grant Likely
2010-04-27 20:46       ` Timur Tabi
2010-04-27 20:59         ` Mark Brown
2010-04-27 21:03           ` Timur Tabi
2010-04-27 21:11             ` Mark Brown
2010-04-28  4:25           ` Benjamin Herrenschmidt
2010-04-28 13:00             ` Mark Brown
2010-04-29  0:42               ` Benjamin Herrenschmidt
2010-04-28  5:37         ` Grant Likely
2010-04-28 13:35           ` Timur Tabi
2010-04-28 13:57             ` Grant Likely
2010-04-28 16:20               ` Timur Tabi
2010-04-28 16:47                 ` Grant Likely
2010-04-28 17:27                   ` Timur Tabi
2010-04-27 22:29       ` Mark Brown
2010-04-28  2:31         ` Grant Likely
2010-04-28  9:16           ` Mark Brown
2010-04-28  4:10         ` Benjamin Herrenschmidt
2010-04-28 12:07           ` Mark Brown [this message]
2010-04-29  0:36             ` Benjamin Herrenschmidt
2010-04-29  3:43               ` Grant Likely
2010-04-28 13:19         ` Timur Tabi
2010-04-28 13:39           ` Mark Brown
2010-04-27  9:54   ` Mark Brown
2010-04-27 10:09     ` Benjamin Herrenschmidt
2010-04-27 10:41       ` Mark Brown
2010-04-27 20:27       ` Grant Likely
2010-04-27 20:50         ` Mark Brown
2010-04-27 20:53           ` Timur Tabi
2010-04-28 12:49         ` [alsa-devel] " Liam Girdwood
2010-04-28 20:35       ` Timur Tabi
2010-04-28 21:58         ` Grant Likely
2010-04-28 22:13           ` Timur Tabi
2010-04-28 22:23             ` Grant Likely
2010-04-29  0:52             ` Benjamin Herrenschmidt
2010-04-29  3:44               ` Grant Likely
2010-04-29  0:50         ` Benjamin Herrenschmidt
2010-04-27 19:21 ` Grant Likely
2010-04-27 20:05   ` Timur Tabi

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=20100428120719.GE31400@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=benh@kernel.crashing.org \
    --cc=kumar.gala@freescale.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=lrg@slimlogic.co.uk \
    --cc=timur@freescale.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).