alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@opensource.wolfsonmicro.com>
To: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Cc: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>,
	alsa-devel@alsa-project.org, Lars-Peter Clausen <lars@metafoo.de>,
	Mike Frysinger <vapier@gentoo.org>,
	qi.wang@intel.com, Takashi Iwai <tiwai@suse.de>,
	linux-kernel@vger.kernel.org, yong.y.wang@intel.com,
	kok.howg.ewe@intel.com, Daniel Mack <zonque@gmail.com>,
	Liam Girdwood <lrg@ti.com>,
	joel.clark@intel.com
Subject: Re: [PATCH 2/3] sound/soc/lapis: add machine driver
Date: Mon, 21 Nov 2011 11:34:33 +0000	[thread overview]
Message-ID: <20111121113433.GD3784@opensource.wolfsonmicro.com> (raw)
In-Reply-To: <1321848532-8784-2-git-send-email-tomoya.rohm@gmail.com>

On Mon, Nov 21, 2011 at 01:08:51PM +0900, Tomoya MORINAGA wrote:
> Add machine driver for LAPIS Semiconductor ML7213 IOH.

This needs to come after you add the base platform support in the series
- clearly this won't work without the CPU side drivers it depends on.

As with the CODEC driver you really should be looking at the standards
for modern drivers and following them.

> @@ -60,6 +60,7 @@ source "sound/soc/s6000/Kconfig"
>  source "sound/soc/sh/Kconfig"
>  source "sound/soc/tegra/Kconfig"
>  source "sound/soc/txx9/Kconfig"
> +source "sound/soc/lapis/Kconfig"

Keep the Makefile and Kconfig entries sorted.

> +static struct snd_soc_dai_link ioh_i2s_dai = {
> +	.name = "I2S",
> +	.stream_name = "I2S HiFi",
> +	.cpu_dai_name = "ml7213ioh-i2s",
> +	.codec_dai_name = "ml7213ioh-hifi",

I'm very surprised this works...  If nothing else I'd expec the CODEC
DAI to have a different name to the CPU.

> +static int __init ioh_i2s_probe(struct platform_device *pdev)
> +{
> +	int ret;
> +
> +	soc_pdev = platform_device_alloc("soc-audio", -1);
> +	if (!soc_pdev)
> +		return -ENOMEM;

You should register the card as a standard platform device for new
drivers and use snd_soc_register_card().

> +static struct platform_driver ioh_i2s_driver = {
> +	.remove = ioh_i2s_remove,
> +	.driver = {
> +		.name = "ml7213ioh-machine",
> +		.owner = THIS_MODULE,
> +	},
> +};

You're already doing the platform device bit so it should be be a case
of changing the body of probe() and remove().

> +static int __init ioh_i2s_init(void)
> +{
> +	return platform_driver_probe(&ioh_i2s_driver,
> +				     ioh_i2s_probe);
> +}

Just make this a standard platform_driver_register().

  parent reply	other threads:[~2011-11-21 11:34 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1321848532-8784-1-git-send-email-tomoya.rohm@gmail.com>
2011-11-21 11:26 ` [PATCH 1/3] sound/soc/codecs: add LAPIS Semiconductor ML26124 Mark Brown
2011-11-22 10:47   ` Tomoya MORINAGA
2011-11-22 11:19     ` Mark Brown
2011-11-25  2:03       ` Tomoya MORINAGA
2011-11-25 11:02         ` Mark Brown
     [not found] ` <1321848532-8784-2-git-send-email-tomoya.rohm@gmail.com>
2011-11-21 11:34   ` Mark Brown [this message]
2011-12-02  5:33     ` [PATCH 2/3] sound/soc/lapis: add machine driver Tomoya MORINAGA
2011-12-02  6:14       ` Takashi Iwai
2011-12-02  6:18         ` Tomoya MORINAGA
2011-12-02  6:39           ` Takashi Iwai
2011-12-02  6:52             ` Tomoya MORINAGA
2011-12-02  7:01               ` Takashi Iwai
2011-12-02  7:13                 ` Tomoya MORINAGA
2011-12-02  7:16                   ` Takashi Iwai
2011-12-02 11:46       ` Mark Brown
2011-12-02 12:09         ` Tomoya MORINAGA
2011-12-02 12:22           ` Mark Brown
2011-12-02 12:35             ` Tomoya MORINAGA
2011-12-02 12:49               ` Mark Brown
     [not found] ` <1321848532-8784-3-git-send-email-tomoya.rohm@gmail.com>
2011-11-21 11:45   ` [PATCH 3/3] sound/soc/lapis: add platform driver Mark Brown
2011-12-12  8:28     ` Tomoya MORINAGA
2011-12-12 10:05       ` Mark Brown
2011-12-13  4:38         ` Tomoya MORINAGA
2011-12-13  4:59           ` 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=20111121113433.GD3784@opensource.wolfsonmicro.com \
    --to=broonie@opensource.wolfsonmicro.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=dp@opensource.wolfsonmicro.com \
    --cc=joel.clark@intel.com \
    --cc=kok.howg.ewe@intel.com \
    --cc=lars@metafoo.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lrg@ti.com \
    --cc=qi.wang@intel.com \
    --cc=tiwai@suse.de \
    --cc=tomoya.rohm@gmail.com \
    --cc=vapier@gentoo.org \
    --cc=yong.y.wang@intel.com \
    --cc=zonque@gmail.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).