From: Tony Lindgren <tony@atomide.com>
To: Mark Brown <broonie@opensource.wolfsonmicro.com>,
Anuj Aggarwal <anuj.aggarwal@ti.com>
Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org
Subject: Re: [PATCH] ASoC: Added OMAP3 EVM support in ASoC.
Date: Thu, 14 May 2009 08:39:27 -0700 [thread overview]
Message-ID: <20090514153927.GI5593@atomide.com> (raw)
In-Reply-To: <1242289759-6577-1-git-send-email-anuj.aggarwal@ti.com>
Hi Mark,
One question below.
* Anuj Aggarwal <anuj.aggarwal@ti.com> [090514 01:30]:
> Resending the patch after fixing the minor issues.
>
> Signed-off-by: Anuj Aggarwal <anuj.aggarwal@ti.com>
> ---
> sound/soc/omap/Kconfig | 8 +++
> sound/soc/omap/Makefile | 2 +
> sound/soc/omap/omap3evm.c | 147 +++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 157 insertions(+), 0 deletions(-)
> create mode 100644 sound/soc/omap/omap3evm.c
<snip snip>
> --- /dev/null
> +++ b/sound/soc/omap/omap3evm.c
<snip snip>
> +static int __init omap3evm_soc_init(void)
> +{
> + int ret;
> +
> + if (!machine_is_omap3evm()) {
> + pr_err("Not OMAP3 EVM!\n");
> + return -ENODEV;
> + }
> + pr_info("OMAP3 EVM SoC init\n");
> +
> + omap3evm_snd_device = platform_device_alloc("soc-audio", -1);
> + if (!omap3evm_snd_device) {
> + printk(KERN_ERR "Platform device allocation failed\n");
> + return -ENOMEM;
> + }
> +
> + platform_set_drvdata(omap3evm_snd_device, &omap3evm_snd_devdata);
> + omap3evm_snd_devdata.dev = &omap3evm_snd_device->dev;
> + *(unsigned int *)omap3evm_dai.cpu_dai->private_data = 1;
> +
> + ret = platform_device_add(omap3evm_snd_device);
> + if (ret)
> + goto err1;
> +
> + return 0;
> +
> +err1:
> + printk(KERN_ERR "Unable to add platform device\n");
> + platform_device_put(omap3evm_snd_device);
> +
> + return ret;
> +}
> +
> +static void __exit omap3evm_soc_exit(void)
> +{
> + platform_device_unregister(omap3evm_snd_device);
> +}
Are there still some problems from ASoC point of view to
convert ASoC to do the platform_device_alloc() from
board init files?
So for omaps, the platform_device_add() sould be called from
the arch/arm/*omap*/board-*.c files.
To recap, there should not be any need to do the machine_is_xxx()
calls in the drivers. Currently if multiple boards are called,
all the xxx_soc_init() calls get unnecessarily called.
Regards,
Tony
next prev parent reply other threads:[~2009-05-14 15:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 8:29 [PATCH] ASoC: Added OMAP3 EVM support in ASoC Anuj Aggarwal
2009-05-14 11:54 ` Mark Brown
2009-05-14 15:39 ` Tony Lindgren [this message]
2009-05-14 16:07 ` 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=20090514153927.GI5593@atomide.com \
--to=tony@atomide.com \
--cc=alsa-devel@alsa-project.org \
--cc=anuj.aggarwal@ti.com \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=linux-omap@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.