From: "Jon Smirl" <jonsmirl@gmail.com>
To: "Matt Sealey" <matt@genesi-usa.com>,
"PowerPC dev list" <Linuxppc-dev@ozlabs.org>
Subject: Re: Revisited, audio codec device tree entries.
Date: Sun, 18 Nov 2007 19:22:13 -0500 [thread overview]
Message-ID: <9e4733910711181622q4b1c33dt87de6d73f7f75bc7@mail.gmail.com> (raw)
In-Reply-To: <20071119001209.GD20794@localhost.localdomain>
On 11/18/07, David Gibson <david@gibson.dropbear.id.au> wrote:
> On Sun, Nov 18, 2007 at 11:31:13PM +0000, Matt Sealey wrote:
> > Matt Sealey wrote:
> > > Jon Smirl wrote:
> > >
> > > If you require the codec to be subservient to some "fabric" then I
> > > suggest you make a "sound" node with a compatible entry which is
> > > defined as something specific to your board (digispeaker,audio) and
> > > let your driver pick that up and then switch on the model (rather like
> > > Apple's layout-id) of that device to pick out the specifics of that
> > > fabric. If it needs an audio codec (ac97 or i2s) and a control
> > > interface (i2c or spi) then it knows which ones it is looking for
> > > based on the model.
> >
> > Sigh, I suck, I forgot the example :D
> >
> > And I forgot the rant you guys usually get - for god's sake, why isn't
> > anyone using the "model" property? Do I have to whine about this some
> > more to get your attention, guys? name, device_type, compatible and
> > model are your tools for building device trees and detecting
> > things. That's FOUR unique properties.
> >
> > How come I only see device trees defined using "name", with the same
> > device_type, and "compatible"? This is braindead design.
>
> Gah! For the benefit of others on this list who may be misled.
>
> *Neither* of you correctly understands the device tree, what I've seen
> of *both* your suggested approaches is crap.
I'm awaiting guidance on how to do the device tree. I just want to
figure out some way of getting my drivers loaded. I make no claim to
having any expertise in device tree design.
There are two classes of codecs, ones where control/data is combined
and one where they are separate. Common examples - combined: ac97, hda
- separate i2s + i2c. Then there is this fabric stuff which glues a
generic codec driver into a specific board layout. While a generic
AC97 design may not need a fabric driver, most other designs need it.
If someone were to put an example into the Docmentation file, I'd follow it.
>
> The device tree describes the _hardware_. If you start reasoning
> about how to lay out the device tree based on your driver model,
> you're already wrong.
>
> Matt, the various properties you list do not mean what you think they
> mean.
>
> name - should be named according to the generic names convention.
> It's pretty much arbitrary, meant for human readability of the device
> tree. Drivers should not depend on it (some do, historically, but new
> drivers and trees should not).
>
> device_type - indicates the open firmware method interface for the
> device. Therefore, meaningless in flattened trees. No new driver
> should use this.
>
> compatible - *this* is the one for driver selection. It describes the
> hardware level interface(s) of the device.
>
> model - usually just for debugging / diagnosis / human-readable
> purposes, describes exact model / revision of the hardware. It can be
> used to enable driver quirks / workarounds for when various devices
> are supposed to be compatible (as encoded in 'compatible') but
> aren't, due to hardware bugs. However, you should never aim to use it
> this way in design.
>
> --
> 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
>
--
Jon Smirl
jonsmirl@gmail.com
next prev parent reply other threads:[~2007-11-19 0:22 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-18 18:10 Revisited, audio codec device tree entries Jon Smirl
2007-11-18 20:16 ` Segher Boessenkool
2007-11-18 21:49 ` Jon Smirl
2007-11-18 22:46 ` Matt Sealey
2007-11-18 23:31 ` Matt Sealey
2007-11-18 23:47 ` Jon Smirl
2007-11-19 0:12 ` David Gibson
2007-11-19 0:22 ` Jon Smirl [this message]
2007-11-19 12:48 ` Segher Boessenkool
2007-11-20 0:22 ` David Gibson
2007-11-19 16:31 ` Matt Sealey
2007-11-19 17:05 ` Scott Wood
2007-11-19 18:55 ` Grant Likely
2007-11-20 0:33 ` David Gibson
2007-11-19 12:07 ` Segher Boessenkool
2007-11-19 16:58 ` Matt Sealey
2007-11-20 1:42 ` David Gibson
2007-11-19 14:57 ` Timur Tabi
2007-11-19 15:33 ` Jon Smirl
2007-11-19 15:02 ` Timur Tabi
2007-11-19 15:15 ` Jon Loeliger
2007-11-19 15:33 ` Grant Likely
2007-11-19 16:00 ` Jon Smirl
2007-11-19 16:31 ` Grant Likely
2007-11-19 16:51 ` Jon Smirl
2007-11-19 17:33 ` Grant Likely
2007-11-19 19:20 ` Jon Smirl
2007-11-19 19:28 ` Grant Likely
2007-11-20 0:59 ` David Gibson
2007-11-26 15:51 ` Timur Tabi
2007-11-26 16:38 ` Jon Smirl
2007-11-26 16:40 ` Timur Tabi
2007-11-19 16:45 ` Timur Tabi
2007-11-19 22:37 ` Jon Smirl
2007-11-19 16:44 ` Timur Tabi
2007-11-19 16:53 ` Grant Likely
2007-11-19 16:55 ` Jon Smirl
2007-11-19 15:37 ` Jon Smirl
2007-11-19 15:42 ` Grant Likely
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=9e4733910711181622q4b1c33dt87de6d73f7f75bc7@mail.gmail.com \
--to=jonsmirl@gmail.com \
--cc=Linuxppc-dev@ozlabs.org \
--cc=matt@genesi-usa.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).