From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] ASoC: omap: convert per-board modules to platform drivers
Date: Thu, 8 Sep 2011 23:37:20 +0100 [thread overview]
Message-ID: <20110908223720.GA21469@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1315520956.4126.3.camel@finisterre.wolfsonmicro.main>
On Thu, Sep 08, 2011 at 03:29:11PM -0700, Mark Brown wrote:
> On Thu, 2011-09-08 at 22:28 +0200, Arnd Bergmann wrote:
> > On Thursday 08 September 2011 20:05:48 Mans Rullgard wrote:
>
> > > I had the same thought, but I couldn't find a suitable string anywhere.
> > > Are you suggesting an if(machine_is_foo()) cascade in omap_init_audio()?
>
> > > I'll be the first to agree this patch is not particularly pretty.
>
> > My general feeling is that practically every time someone writes
> > machine_is_*(), they are doing it wrong. There are of course exceptions,
> > but I would strongly recommend to have the initialization calling up
> > from the board file into more general functions instead of having all
> > boards calling the same function which then goes to board specific
> > code again.
>
> I have to agree, that seems tasteless. I'd expect something like
> triggering registration of devices based off walking down a table of
> machine IDs or something. One other issue to consider here is that we
> don't want to discourage people from sharing machine drivers while we
> can so it can't be completely automatic, it
This problem has been solved (before DT) for _ages_ through the use
of platform devices in the platform support files, registered by the
.init_machine callback.
Where it went wrong is when ASOC and PCMCIA became rather complicated
that you could no longer just pass a platform data structure, but
instead needed some complex platform specific code - which started the
demand to have mini platform specific chunks of code in drivers/pcmcia/
and sound/.
With DT of course, all devices get instantiated from the device tree,
so there should not be any more platform specific chunks of code in
these locations (ha, it couldn't be solved with platform data so I
suspect it will continue to persist, forever unsolved.)
next prev parent reply other threads:[~2011-09-08 22:37 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-08 17:34 [PATCH v2] ASoC: omap: convert per-board modules to platform drivers Mans Rullgard
2011-09-08 18:17 ` Jassi Brar
2011-09-08 18:18 ` Mark Brown
2011-09-08 18:35 ` Jassi Brar
2011-09-08 19:08 ` Mans Rullgard
2011-09-08 19:05 ` Mans Rullgard
2011-09-08 19:17 ` Jassi Brar
2011-09-08 19:26 ` Mans Rullgard
2011-09-08 20:28 ` Arnd Bergmann
2011-09-08 22:29 ` Mark Brown
2011-09-08 22:37 ` Russell King - ARM Linux [this message]
2011-09-08 22:47 ` Mark Brown
2011-09-08 23:01 ` Russell King - ARM Linux
2011-09-08 23:59 ` Mark Brown
2011-09-09 8:48 ` Jassi Brar
2011-09-09 9:41 ` Russell King - ARM Linux
2011-09-09 16:11 ` Mark Brown
2011-09-09 19:01 ` Russell King - ARM Linux
2011-09-09 19:30 ` Mark Brown
2011-09-09 20:56 ` Russell King - ARM Linux
2011-09-10 20:37 ` Arnd Bergmann
2011-09-10 21:43 ` 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=20110908223720.GA21469@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).