From: David Gibson <david@gibson.dropbear.id.au>
To: Jon Smirl <jonsmirl@gmail.com>
Cc: PowerPC dev list <Linuxppc-dev@ozlabs.org>,
Timur Tabi <timur@freescale.com>
Subject: Re: Audio codec device tree entries
Date: Thu, 25 Oct 2007 10:38:49 +1000 [thread overview]
Message-ID: <20071025003849.GB24382@localhost.localdomain> (raw)
In-Reply-To: <9e4733910710241717i3c436e76l48f6c273d7114b94@mail.gmail.com>
On Wed, Oct 24, 2007 at 08:17:57PM -0400, Jon Smirl wrote:
> On 10/24/07, David Gibson <david@gibson.dropbear.id.au> wrote:
> > I'm afraid I still don't understand quite what information this
> > "fabric" driver is conveying. Is it really inherently platform
> > specific, or is it something that can be encoded directly in a
> > sensible way. If the latter we could have a general "device tree"
> > fabric driver that will handle all systems with the layout correctly
> > encoded in the device tree.
>
> Codecs are like GPIOs, all of their pins are programmable. So the same
> codec can be wired into various boards quite differently and then
> software programmed to work the same. The fabric driver contains the
> mapping information.
>
> People were making a codec driver for each board, but this resulted in
> lots of similar codec drivers for the same chips. I believe a common
> Wolfson chip had eight drivers in the kernel. In the new model the
> codec drivers are generic and the fabric driver describes the mapping.
Ok, but the fabric driver is about the wiring of a specific codec
chip, yes? If a board was foolishly designed to have two identical
codec chips, but each wired differently, it would need two instances
of the same codec driver, plus one instance each of two different
fabric drivers?
If this is so, then the fabric information *must* be per-codec, and
should therefore go with the codec node.
> A side effect of this is that we need to load the fabric driver which
> doesn't have a device associated with it.
Well, it does have a device associated with it, it's just a question
of how to represent it. There's not reason a single device node can't
cause instantiation of multiple driver instances. Depending on the
complexity of typical fabric arrangements, one of the following
options might make sense:
- the device node's compatible has enough information to
specify both fabric and codec driver. The fabric driver is
instantiated from this node, and instantiates the codec driver itself
(since I gather fabric drivers are frequently codec specific in any
case).
- both fabric and codec drivers are instantiated from the same
device node, and co-ordinate with each other.
- The codec is represented as:
codec-fabric@... {
compatible = "...";
<properties describing the fabric>
codec {
compatible = "...";
<properties describing the codec>
}
}
This is different from a "pseudo" node, because the codec-fabric node
represents a real piece of hardware: specifically the cluster of
wires between the sound bus and the codec.
Remember: the device tree describes the hardware, how the chooses to
structure its driver model to meet the demands of that hardware is up
to it. Don't put the cart before the horse.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
next prev parent reply other threads:[~2007-10-25 0:38 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-23 1:59 Audio codec device tree entries Jon Smirl
2007-10-23 2:57 ` David Gibson
2007-10-23 3:57 ` Grant Likely
2007-10-23 8:06 ` Segher Boessenkool
2007-10-23 15:27 ` Timur Tabi
2007-10-23 16:56 ` Segher Boessenkool
2007-10-23 22:29 ` Jon Smirl
2007-10-24 14:13 ` Timur Tabi
2007-10-24 15:00 ` Jon Smirl
2007-10-24 15:07 ` Timur Tabi
2007-10-24 15:28 ` Grant Likely
2007-10-24 23:52 ` David Gibson
2007-10-24 15:16 ` Grant Likely
2007-10-24 15:20 ` Grant Likely
2007-10-24 15:28 ` Jon Smirl
2007-10-24 15:43 ` Grant Likely
2007-10-24 15:54 ` Jon Smirl
2007-10-24 16:01 ` Timur Tabi
2007-10-24 16:39 ` Grant Likely
2007-10-24 16:41 ` Timur Tabi
2007-10-24 16:47 ` Grant Likely
2007-10-24 16:38 ` Grant Likely
2007-10-24 16:41 ` Timur Tabi
2007-10-24 16:52 ` Grant Likely
2007-10-24 17:01 ` Jon Smirl
2007-10-24 17:13 ` Grant Likely
2007-10-24 17:13 ` Timur Tabi
2007-10-24 19:31 ` Jon Smirl
2007-10-24 19:41 ` Timur Tabi
2007-10-24 19:56 ` Jon Smirl
2007-10-25 0:04 ` David Gibson
2007-10-25 0:17 ` Jon Smirl
2007-10-25 0:38 ` David Gibson [this message]
2007-10-25 3:11 ` Jon Smirl
2007-10-25 16:14 ` Timur Tabi
2007-10-24 23:55 ` David Gibson
2007-10-24 15:23 ` Jon Smirl
2007-10-24 15:40 ` Timur Tabi
2007-10-24 15:54 ` Grant Likely
2007-10-24 15:08 ` Grant Likely
2007-10-24 15:19 ` Jon Smirl
2007-10-25 0:01 ` David Gibson
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=20071025003849.GB24382@localhost.localdomain \
--to=david@gibson.dropbear.id.au \
--cc=Linuxppc-dev@ozlabs.org \
--cc=jonsmirl@gmail.com \
--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).