public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Nikula <jarkko.nikula@nokia.com>
To: ext Tony Lindgren <tony@atomide.com>
Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org
Subject: Re: [RFC/PATCH 1/1] ASoC: Add drivers for the Texas Instruments OMAP processors
Date: Tue, 22 Apr 2008 09:48:45 +0300	[thread overview]
Message-ID: <20080422094845.722a949c.jarkko.nikula@nokia.com> (raw)
In-Reply-To: <20080421181614.GZ12099@atomide.com>

On Mon, 21 Apr 2008 11:16:14 -0700
"ext Tony Lindgren" <tony@atomide.com> wrote:

> > +static struct platform_device *n810_snd_device;
> > +
> > +static int __init n810_soc_init(void)
> > +{
> > +	int err;
> > +	struct device *dev;
> > +
> > +	if (!machine_is_nokia_n810())
> > +		return -ENODEV;
> > +
> > +	n810_snd_device = platform_device_alloc("soc-audio", -1);
> > +	if (!n810_snd_device)
> > +		return -ENOMEM;
> > +
> 
> The platform_device_register() should be done in board-*.c files.
> 
> This way you will know which board has this snd_device when
> compiling in support for multiple boards into the same kernel,
> and you don't need to use machine_is_some_arm() in drivers.
> 
This is a valid point. I think it should be possible to have also in
ASoC v1 e.g n810_mcbsp_aic33 driver whose probe function would be more
or less like n810_soc_init now. At least sound/soc/fsl/mpc8610_hpcd.c is
doing similar thing.

Mark, any thoughts?

> You probably also will want to pass the struct clk * in the
> platform_data so the driver can then do clk_enable/disable as needed.
> 
Makes sense since only sys_clkout2 is used here and other two
sys_clkout2_src and func96m_clk are used to setup it to correct rate.


Jarkko

  reply	other threads:[~2008-04-22  6:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-04  9:22 [RFC/PATCH 0/1] ALSA SoC support for OMAP Jarkko Nikula
2008-04-04  9:22 ` [RFC/PATCH 1/1] ASoC: Add drivers for the Texas Instruments OMAP processors Jarkko Nikula
2008-04-21 18:16   ` Tony Lindgren
2008-04-22  6:48     ` Jarkko Nikula [this message]
2008-04-22  8:49       ` Mark Brown
2008-04-23 23:59         ` [alsa-devel] " Tony Lindgren
2008-04-04 12:42 ` [RFC/PATCH 0/1] ALSA SoC support for OMAP Mark Brown
2008-04-04 13:31   ` Jarkko Nikula

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=20080422094845.722a949c.jarkko.nikula@nokia.com \
    --to=jarkko.nikula@nokia.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=tony@atomide.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