From: Markus Pargmann <mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
To: Lars-Peter Clausen <lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
Cc: Fabio Estevam
<fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org>,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org,
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
Mark Brown
<broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org>,
Timur Tabi <timur-N01EOCouUvQ@public.gmane.org>,
Liam Girdwood <lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
Sascha Hauer <kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: Re: [alsa-devel] [PATCH v4 02/10] ASoC: imx-pcm-dma: DT support
Date: Thu, 18 Apr 2013 17:35:12 +0200 [thread overview]
Message-ID: <20130418153512.GA4307@pengutronix.de> (raw)
In-Reply-To: <5170069F.4030200-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
On Thu, Apr 18, 2013 at 04:43:43PM +0200, Lars-Peter Clausen wrote:
> On 04/18/2013 02:33 PM, Markus Pargmann wrote:
> > This patch adds the possibility to pass a of_node as platform_data which
> > is used by generic-pcm-dma to request a DMA slave channel.
> >
> > Signed-off-by: Markus Pargmann <mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
> > ---
> > sound/soc/fsl/imx-pcm-dma.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c
> > index c246fb5..8945d22 100644
> > --- a/sound/soc/fsl/imx-pcm-dma.c
> > +++ b/sound/soc/fsl/imx-pcm-dma.c
> > @@ -62,9 +62,11 @@ static const struct snd_dmaengine_pcm_config imx_dmaengine_pcm_config = {
> >
> > int imx_pcm_dma_init(struct platform_device *pdev)
> > {
> > + if (pdev->dev.platform_data)
> > + pdev->dev.of_node = pdev->dev.platform_data;
>
> In my opinion it's better to use pdev->dev.parent->of_node here. In the ssi
> driver you use platform_device_register_data, which will create a copy of
> the of_node you pass in as platform data. I'm not quite sure how well this
> will work. If you want to continue to use platform_data you should at least
> change the code in the ssi driver to not make a copy of the of_node.
Thanks, I did not think about using the parent, that is much easier. I
changed it for the next version.
Regards,
Markus
>
> - Lars
>
> > +
> > return snd_dmaengine_pcm_register(&pdev->dev, &imx_dmaengine_pcm_config,
> > SND_DMAENGINE_PCM_FLAG_NO_RESIDUE |
> > - SND_DMAENGINE_PCM_FLAG_NO_DT |
> > SND_DMAENGINE_PCM_FLAG_COMPAT);
> > }
> >
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
WARNING: multiple messages have this Message-ID (diff)
From: mpa@pengutronix.de (Markus Pargmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [alsa-devel] [PATCH v4 02/10] ASoC: imx-pcm-dma: DT support
Date: Thu, 18 Apr 2013 17:35:12 +0200 [thread overview]
Message-ID: <20130418153512.GA4307@pengutronix.de> (raw)
In-Reply-To: <5170069F.4030200@metafoo.de>
On Thu, Apr 18, 2013 at 04:43:43PM +0200, Lars-Peter Clausen wrote:
> On 04/18/2013 02:33 PM, Markus Pargmann wrote:
> > This patch adds the possibility to pass a of_node as platform_data which
> > is used by generic-pcm-dma to request a DMA slave channel.
> >
> > Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
> > ---
> > sound/soc/fsl/imx-pcm-dma.c | 4 +++-
> > 1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/sound/soc/fsl/imx-pcm-dma.c b/sound/soc/fsl/imx-pcm-dma.c
> > index c246fb5..8945d22 100644
> > --- a/sound/soc/fsl/imx-pcm-dma.c
> > +++ b/sound/soc/fsl/imx-pcm-dma.c
> > @@ -62,9 +62,11 @@ static const struct snd_dmaengine_pcm_config imx_dmaengine_pcm_config = {
> >
> > int imx_pcm_dma_init(struct platform_device *pdev)
> > {
> > + if (pdev->dev.platform_data)
> > + pdev->dev.of_node = pdev->dev.platform_data;
>
> In my opinion it's better to use pdev->dev.parent->of_node here. In the ssi
> driver you use platform_device_register_data, which will create a copy of
> the of_node you pass in as platform data. I'm not quite sure how well this
> will work. If you want to continue to use platform_data you should at least
> change the code in the ssi driver to not make a copy of the of_node.
Thanks, I did not think about using the parent, that is much easier. I
changed it for the next version.
Regards,
Markus
>
> - Lars
>
> > +
> > return snd_dmaengine_pcm_register(&pdev->dev, &imx_dmaengine_pcm_config,
> > SND_DMAENGINE_PCM_FLAG_NO_RESIDUE |
> > - SND_DMAENGINE_PCM_FLAG_NO_DT |
> > SND_DMAENGINE_PCM_FLAG_COMPAT);
> > }
> >
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2013-04-18 15:35 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-18 12:33 [PATCH v4 00/10] ASoC: fsl-ssi: ac97-slave support Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
2013-04-18 12:33 ` [PATCH v4 05/10] ASoC: fsl-ssi: Use generic DMA bindings if possible Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
[not found] ` <1366288424-7660-1-git-send-email-mpa-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2013-04-18 12:33 ` [PATCH v4 01/10] ASoC: phycore-ac97: Add DT support Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
2013-04-18 12:33 ` [PATCH v4 02/10] ASoC: imx-pcm-dma: " Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
2013-04-18 14:43 ` Lars-Peter Clausen
2013-04-18 14:43 ` [alsa-devel] " Lars-Peter Clausen
2013-04-18 14:56 ` Mark Brown
2013-04-18 14:56 ` [alsa-devel] " Mark Brown
[not found] ` <5170069F.4030200-Qo5EllUWu/uELgA04lAiVw@public.gmane.org>
2013-04-18 15:35 ` Markus Pargmann [this message]
2013-04-18 15:35 ` Markus Pargmann
2013-04-18 12:33 ` [PATCH v4 03/10] ASoC: imx-pcm-fiq: Introduce pcm-fiq-params Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
2013-04-18 12:33 ` [PATCH v4 04/10] ASoC: fsl-ssi: Add support for imx-pcm-fiq Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
2013-04-18 12:33 ` [PATCH v4 06/10] ARM: imx: Export ac97 reset functions Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
2013-04-18 12:33 ` [PATCH v4 07/10] ASoC: fsl-ssi: imx ac97 support Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
2013-04-18 12:33 ` [PATCH v4 08/10] ASoC: fsl: Kconfig: Use fsl-ssi for phycore-ac97 Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
2013-04-18 12:33 ` [PATCH v4 09/10] ASoC: fsl: Move fsl-ssi binding doc to sound/ Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
2013-04-18 12:33 ` [PATCH v4 10/10] ASoC: fsl: Update fsl-ssi binding doc Markus Pargmann
2013-04-18 12:33 ` Markus Pargmann
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=20130418153512.GA4307@pengutronix.de \
--to=mpa-bicnvbalz9megne8c9+irq@public.gmane.org \
--cc=alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw@public.gmane.org \
--cc=broonie-yzvPICuk2AATkU/dhu1WVueM+bqZidxxQQ4Iyu8u01E@public.gmane.org \
--cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
--cc=fabio.estevam-KZfg59tc24xl57MIdRCFDg@public.gmane.org \
--cc=kernel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org \
--cc=lars-Qo5EllUWu/uELgA04lAiVw@public.gmane.org \
--cc=lgirdwood-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=timur-N01EOCouUvQ@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 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.