From: Mark Brown <broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
To: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: "alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org"
<alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org>,
"linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: Tegra ASoC, multiple boards, platform data, and conditionals in machine driver
Date: Sat, 9 Apr 2011 11:30:59 +0900 [thread overview]
Message-ID: <20110409023057.GA3792@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <74CDBE0F657A3D45AFBB94109FB122FF0493EB3A50-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
On Fri, Apr 08, 2011 at 12:43:37PM -0700, Stephen Warren wrote:
> That said, I noticed that all(?) the other machine drivers simply use
> hard-coded GPIO numbers (sometimes defined locally, probably sometimes from
> machine header files), rather than having the values passed in through
> platform_data. This eliminates the need for platform_data structures etc.
> Is this simply a legacy because ASoC machine drivers weren't able to be
> first-class platform_devices, or is this still an acceptable style?
Partly due to the historical reasons, partly due to the fact that unless
you actually have multiple boards based off the same design with
different data there's no point in bouncing the data through platform
data as there's only one possible answer - the hard coding also includes
the connections between the devices, the clocking arrangements and so
on.
> Seaboard has a couple of derivatives which are very similar, but do have
> some differences in the audio path and elsewhere. In the ChromeOS kernel,
> we have a single ASoC machine driver covering Seaboard and two derivatives,
> with conditional code. I've placed an example at the end of this mail. Do
> you have a preference for having separate files for each machine without the
> conditional code v.s. a single machine driver with a lot of conditional code?
> If we go the conditional route, it might even be possible to merge the
> Harmony and Seaboard machine drivers into one.
If the machines are very similar merging the driver is good. Your code
looked like a good example of where merging is helpful.
next prev parent reply other threads:[~2011-04-09 2:30 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-08 19:43 Tegra ASoC, multiple boards, platform data, and conditionals in machine driver Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF0493EB3A50-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-04-09 2:30 ` Mark Brown [this message]
[not found] ` <20110409023057.GA3792-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>
2011-04-10 2:52 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF0493EB3B5B-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-04-10 18:18 ` Olof Johansson
[not found] ` <BANLkTikQhe1+ufvZWFKU1DT+XCS9=xE0Xw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-04-11 1:58 ` [alsa-devel] " Mark Brown
[not found] ` <20110411015809.GA23214-GFdadSzt00ze9xe1eoZjHA@public.gmane.org>
2011-04-11 15:27 ` Stephen Warren
[not found] ` <74CDBE0F657A3D45AFBB94109FB122FF0493EB3B8D-C7FfzLzN0UxDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2011-04-11 17:57 ` Olof Johansson
2011-04-11 20:30 ` 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=20110409023057.GA3792@opensource.wolfsonmicro.com \
--to=broonie-yzvpicuk2aatku/dhu1wvuem+bqzidxxqq4iyu8u01e@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.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