All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lars-Peter Clausen <lars@metafoo.de>
To: Daniel Mack <zonque@gmail.com>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	eric.y.miao@gmail.com, arnd@arndb.de, s.neumann@raumfeld.com,
	broonie@kernel.org, haojian.zhuang@linaro.org,
	rmk+kernel@arm.linux.org.uk,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 5/5] ASoC: pxa: add DT bindings for pxa2xx-pcm
Date: Mon, 12 Aug 2013 11:00:20 +0200	[thread overview]
Message-ID: <5208A424.70704@metafoo.de> (raw)
In-Reply-To: <1376296961-20564-6-git-send-email-zonque@gmail.com>

On 08/12/2013 10:42 AM, Daniel Mack wrote:
> The bindings do not carry any resources, as the module only registers
> the ASoC platform driver.
>
> Signed-off-by: Daniel Mack <zonque@gmail.com>

As this is just a virtual device (and Linux specific) it shouldn't be in the 
devicetree. Usually when using devicetree you'd register the PCM device from 
the CPU DAI driver. Take a look at how other platforms (e.g. tegra) do this.

- Lars

> ---
>   .../devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt         | 15 +++++++++++++++
>   sound/soc/pxa/pxa2xx-pcm.c                                | 13 +++++++++++--
>   2 files changed, 26 insertions(+), 2 deletions(-)
>   create mode 100644 Documentation/devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt
>
> diff --git a/Documentation/devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt b/Documentation/devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt
> new file mode 100644
> index 0000000..551fbb8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt
> @@ -0,0 +1,15 @@
> +DT bindings for ARM PXA2xx PCM platform driver
> +
> +This is just a dummy driver that registers the PXA ASoC platform driver.
> +It does not have any resources assigned.
> +
> +Required properties:
> +
> +	- compatible		'mrvl,pxa-pcm-audio'
> +
> +Example:
> +
> +	pxa_pcm_audio: snd_soc_pxa_audio {
> +		compatible = "mrvl,pxa-pcm-audio";
> +	};
> +
> diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
> index 0aa2d69..806da27 100644
> --- a/sound/soc/pxa/pxa2xx-pcm.c
> +++ b/sound/soc/pxa/pxa2xx-pcm.c
> @@ -13,6 +13,7 @@
>   #include <linux/dma-mapping.h>
>   #include <linux/module.h>
>   #include <linux/dmaengine.h>
> +#include <linux/of.h>
>
>   #include <sound/core.h>
>   #include <sound/soc.h>
> @@ -133,10 +134,18 @@ static int pxa2xx_soc_platform_remove(struct platform_device *pdev)
>   	return 0;
>   }
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id snd_soc_pxa_audio_match[] = {
> +	{ .compatible   = "mrvl,pxa-pcm-audio" },
> +	{ }
> +};
> +#endif
> +
>   static struct platform_driver pxa_pcm_driver = {
>   	.driver = {
> -			.name = "pxa-pcm-audio",
> -			.owner = THIS_MODULE,
> +		.name = "pxa-pcm-audio",
> +		.owner = THIS_MODULE,
> +		.of_match_table = of_match_ptr(snd_soc_pxa_audio_match),
>   	},
>
>   	.probe = pxa2xx_soc_platform_probe,
>

WARNING: multiple messages have this Message-ID (diff)
From: lars@metafoo.de (Lars-Peter Clausen)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH 5/5] ASoC: pxa: add DT bindings for pxa2xx-pcm
Date: Mon, 12 Aug 2013 11:00:20 +0200	[thread overview]
Message-ID: <5208A424.70704@metafoo.de> (raw)
In-Reply-To: <1376296961-20564-6-git-send-email-zonque@gmail.com>

On 08/12/2013 10:42 AM, Daniel Mack wrote:
> The bindings do not carry any resources, as the module only registers
> the ASoC platform driver.
>
> Signed-off-by: Daniel Mack <zonque@gmail.com>

As this is just a virtual device (and Linux specific) it shouldn't be in the 
devicetree. Usually when using devicetree you'd register the PCM device from 
the CPU DAI driver. Take a look at how other platforms (e.g. tegra) do this.

- Lars

> ---
>   .../devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt         | 15 +++++++++++++++
>   sound/soc/pxa/pxa2xx-pcm.c                                | 13 +++++++++++--
>   2 files changed, 26 insertions(+), 2 deletions(-)
>   create mode 100644 Documentation/devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt
>
> diff --git a/Documentation/devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt b/Documentation/devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt
> new file mode 100644
> index 0000000..551fbb8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/mrvl,pxa2xx-pcm.txt
> @@ -0,0 +1,15 @@
> +DT bindings for ARM PXA2xx PCM platform driver
> +
> +This is just a dummy driver that registers the PXA ASoC platform driver.
> +It does not have any resources assigned.
> +
> +Required properties:
> +
> +	- compatible		'mrvl,pxa-pcm-audio'
> +
> +Example:
> +
> +	pxa_pcm_audio: snd_soc_pxa_audio {
> +		compatible = "mrvl,pxa-pcm-audio";
> +	};
> +
> diff --git a/sound/soc/pxa/pxa2xx-pcm.c b/sound/soc/pxa/pxa2xx-pcm.c
> index 0aa2d69..806da27 100644
> --- a/sound/soc/pxa/pxa2xx-pcm.c
> +++ b/sound/soc/pxa/pxa2xx-pcm.c
> @@ -13,6 +13,7 @@
>   #include <linux/dma-mapping.h>
>   #include <linux/module.h>
>   #include <linux/dmaengine.h>
> +#include <linux/of.h>
>
>   #include <sound/core.h>
>   #include <sound/soc.h>
> @@ -133,10 +134,18 @@ static int pxa2xx_soc_platform_remove(struct platform_device *pdev)
>   	return 0;
>   }
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id snd_soc_pxa_audio_match[] = {
> +	{ .compatible   = "mrvl,pxa-pcm-audio" },
> +	{ }
> +};
> +#endif
> +
>   static struct platform_driver pxa_pcm_driver = {
>   	.driver = {
> -			.name = "pxa-pcm-audio",
> -			.owner = THIS_MODULE,
> +		.name = "pxa-pcm-audio",
> +		.owner = THIS_MODULE,
> +		.of_match_table = of_match_ptr(snd_soc_pxa_audio_match),
>   	},
>
>   	.probe = pxa2xx_soc_platform_probe,
>

  reply	other threads:[~2013-08-12  9:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-12  8:42 [PATCH 0/5] ASoC: pxa dmaengine preparation patches Daniel Mack
2013-08-12  8:42 ` Daniel Mack
2013-08-12  8:42 ` [PATCH 1/5] ALSA: move dmaengine implementation from ASoC to ALSA core Daniel Mack
2013-08-12  8:42   ` Daniel Mack
2013-08-12  8:55   ` Daniel Mack
2013-08-12  8:55     ` Daniel Mack
2013-08-15 10:18   ` Mark Brown
2013-08-15 10:18     ` Mark Brown
2013-08-12  8:42 ` [PATCH 2/5] ASoC: pxa: pxa-ssp: add DT bindings Daniel Mack
2013-08-12  8:42   ` Daniel Mack
2013-08-15 10:33   ` Mark Brown
2013-08-15 10:33     ` Mark Brown
2013-08-15 10:51     ` Daniel Mack
2013-08-15 10:51       ` Daniel Mack
2013-08-15 13:39       ` Mark Brown
2013-08-15 13:39         ` Mark Brown
2013-08-15 13:43         ` Daniel Mack
2013-08-15 13:43           ` Daniel Mack
2013-08-15 14:01           ` Mark Brown
2013-08-15 14:01             ` Mark Brown
2013-08-12  8:42 ` [PATCH 3/5] ASoC: pxa: use snd_dmaengine_dai_dma_data Daniel Mack
2013-08-12  8:42   ` Daniel Mack
2013-08-12  8:42 ` [PATCH 4/5] ASoC: pxa: pxa-ssp: set dma filter data from startup hook Daniel Mack
2013-08-12  8:42   ` Daniel Mack
2013-08-12  8:42 ` [PATCH 5/5] ASoC: pxa: add DT bindings for pxa2xx-pcm Daniel Mack
2013-08-12  8:42   ` Daniel Mack
2013-08-12  9:00   ` Lars-Peter Clausen [this message]
2013-08-12  9:00     ` [alsa-devel] " Lars-Peter Clausen
2013-08-12  9:17     ` Daniel Mack
2013-08-12  9:17       ` [alsa-devel] " Daniel Mack

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=5208A424.70704@metafoo.de \
    --to=lars@metafoo.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=arnd@arndb.de \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eric.y.miao@gmail.com \
    --cc=haojian.zhuang@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    --cc=s.neumann@raumfeld.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 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.