From: "Grant Likely" <grant.likely@secretlab.ca>
To: "Timur Tabi" <timur@freescale.com>
Cc: PowerPC dev list <Linuxppc-dev@ozlabs.org>
Subject: Re: Revisited, audio codec device tree entries.
Date: Mon, 19 Nov 2007 09:53:58 -0700 [thread overview]
Message-ID: <fa686aa40711190853y3ea1fd6cl883caaddbc1530cc@mail.gmail.com> (raw)
In-Reply-To: <4741BD5D.2090502@freescale.com>
On 11/19/07, Timur Tabi <timur@freescale.com> wrote:
> Grant Likely wrote:
>
> > You probably mean "don't use the of_platform bus to load the fabric
> > driver".
>
> Yes, that is what I meant.
>
> > He still needs to use the data in the device tree to decide
> > what fabric drivers to use.
>
> I'm not sure about that. The fabric driver is tied to the platform itself,
> mostly because the fabric driver isn't really a device driver. It's a
> platform driver, in that its job is to initialize the other device drivers, or
> make sure the kernel initializes them. It's also responsible for telling ALSA
> which driver does what and how they're connected.
>
Even it it's just based on the board "model" property; that's still
deciding what the ALSA fabric is based on data in the device tree.
:-)
> > Another option is to explicitly call of_platform_device_create in the
> > platform code on the fabric node (which should be a child of the root
> > node) so that you can have an of_platform_bus fabric driver.
>
> I don't fully understand platform drivers. Do we really need a full-blown OF
> platform driver for this?
Both the platform bus and the of_platform bus do exactly the same
thing in a simple manner. They allow devices to be matched with
drivers. It is a low overhead mechanism.
In both cases, devices carry with them some metadata to describe the
devices. For platform devices, that meta data is a resource structure
and a device specific pdata structure. For of_platform devices, the
metadata is a pointer to a device tree node.
That's it. Using either mechanism allows the platform code to say
"these devices are present" without having to explicitly call routines
into the driver. In other words; it can provide late binding of
drivers to devices.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
grant.likely@secretlab.ca
(403) 399-0195
next prev parent reply other threads:[~2007-11-19 16:53 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
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 [this message]
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=fa686aa40711190853y3ea1fd6cl883caaddbc1530cc@mail.gmail.com \
--to=grant.likely@secretlab.ca \
--cc=Linuxppc-dev@ozlabs.org \
--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).