From: Mark Brown <broonie@kernel.org>
To: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: alsa-devel@alsa-project.org, Mark Brown <broonie@kernel.org>,
Simon <horms@verge.net.au>
Subject: Applied "ASoC: fsl: dma: replace platform to component" to the asoc tree
Date: Mon, 12 Feb 2018 12:29:50 +0000 [thread overview]
Message-ID: <E1elDF0-00039s-Py@debutante> (raw)
In-Reply-To: <87373bgaxq.wl%kuninori.morimoto.gx@renesas.com>
The patch
ASoC: fsl: dma: replace platform to component
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
>From 4cb1ea925e66a2a04bcaf880f62bce425ddb9f94 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Mon, 29 Jan 2018 02:46:22 +0000
Subject: [PATCH] ASoC: fsl: dma: replace platform to component
Now platform can be replaced to component, let's do it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
sound/soc/fsl/fsl_dma.c | 27 +++++++++++++++++----------
1 file changed, 17 insertions(+), 10 deletions(-)
diff --git a/sound/soc/fsl/fsl_dma.c b/sound/soc/fsl/fsl_dma.c
index 8c2981b70f64..fce2010d3c53 100644
--- a/sound/soc/fsl/fsl_dma.c
+++ b/sound/soc/fsl/fsl_dma.c
@@ -37,6 +37,8 @@
#include "fsl_dma.h"
#include "fsl_ssi.h" /* For the offset of stx0 and srx0 */
+#define DRV_NAME "fsl_dma"
+
/*
* The formats that the DMA controller supports, which is anything
* that is 8, 16, or 32 bits.
@@ -56,7 +58,7 @@
SNDRV_PCM_FMTBIT_U32_LE | \
SNDRV_PCM_FMTBIT_U32_BE)
struct dma_object {
- struct snd_soc_platform_driver dai;
+ struct snd_soc_component_driver dai;
dma_addr_t ssi_stx_phys;
dma_addr_t ssi_srx_phys;
unsigned int ssi_fifo_depth;
@@ -203,7 +205,8 @@ static irqreturn_t fsl_dma_isr(int irq, void *dev_id)
struct fsl_dma_private *dma_private = dev_id;
struct snd_pcm_substream *substream = dma_private->substream;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct device *dev = rtd->platform->dev;
+ struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+ struct device *dev = component->dev;
struct ccsr_dma_channel __iomem *dma_channel = dma_private->dma_channel;
irqreturn_t ret = IRQ_NONE;
u32 sr, sr2 = 0;
@@ -385,9 +388,10 @@ static int fsl_dma_open(struct snd_pcm_substream *substream)
{
struct snd_pcm_runtime *runtime = substream->runtime;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct device *dev = rtd->platform->dev;
+ struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+ struct device *dev = component->dev;
struct dma_object *dma =
- container_of(rtd->platform->driver, struct dma_object, dai);
+ container_of(component->driver, struct dma_object, dai);
struct fsl_dma_private *dma_private;
struct ccsr_dma_channel __iomem *dma_channel;
dma_addr_t ld_buf_phys;
@@ -539,7 +543,8 @@ static int fsl_dma_hw_params(struct snd_pcm_substream *substream,
struct snd_pcm_runtime *runtime = substream->runtime;
struct fsl_dma_private *dma_private = runtime->private_data;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct device *dev = rtd->platform->dev;
+ struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+ struct device *dev = component->dev;
/* Number of bits per sample */
unsigned int sample_bits =
@@ -702,7 +707,8 @@ static snd_pcm_uframes_t fsl_dma_pointer(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct fsl_dma_private *dma_private = runtime->private_data;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct device *dev = rtd->platform->dev;
+ struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+ struct device *dev = component->dev;
struct ccsr_dma_channel __iomem *dma_channel = dma_private->dma_channel;
dma_addr_t position;
snd_pcm_uframes_t frames;
@@ -799,9 +805,10 @@ static int fsl_dma_close(struct snd_pcm_substream *substream)
struct snd_pcm_runtime *runtime = substream->runtime;
struct fsl_dma_private *dma_private = runtime->private_data;
struct snd_soc_pcm_runtime *rtd = substream->private_data;
- struct device *dev = rtd->platform->dev;
+ struct snd_soc_component *component = snd_soc_rtdcom_lookup(rtd, DRV_NAME);
+ struct device *dev = component->dev;
struct dma_object *dma =
- container_of(rtd->platform->driver, struct dma_object, dai);
+ container_of(component->driver, struct dma_object, dai);
if (dma_private) {
if (dma_private->irq)
@@ -908,6 +915,7 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
return -ENOMEM;
}
+ dma->dai.name = DRV_NAME;
dma->dai.ops = &fsl_dma_ops;
dma->dai.pcm_new = fsl_dma_new;
dma->dai.pcm_free = fsl_dma_free_dma_buffers;
@@ -925,7 +933,7 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
of_node_put(ssi_np);
- ret = snd_soc_register_platform(&pdev->dev, &dma->dai);
+ ret = devm_snd_soc_register_component(&pdev->dev, &dma->dai, NULL, 0);
if (ret) {
dev_err(&pdev->dev, "could not register platform\n");
kfree(dma);
@@ -944,7 +952,6 @@ static int fsl_soc_dma_remove(struct platform_device *pdev)
{
struct dma_object *dma = dev_get_drvdata(&pdev->dev);
- snd_soc_unregister_platform(&pdev->dev);
iounmap(dma->channel);
irq_dispose_mapping(dma->irq);
kfree(dma);
--
2.16.1
next prev parent reply other threads:[~2018-02-12 12:29 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-12 0:41 [PATCH 00/38] ASoC: replace platform to component Kuninori Morimoto
2018-01-12 0:42 ` [PATCH 01/38] ASoC: remove rtd->platform checck Kuninori Morimoto
2018-01-12 0:42 ` [PATCH 02/38] ASoC: soc-utils: replace platform to component Kuninori Morimoto
2018-01-12 0:43 ` [PATCH 03/38] ASoC: soc-generic-dmaengine-pcm: " Kuninori Morimoto
2018-02-12 12:32 ` Applied "ASoC: soc-generic-dmaengine-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:43 ` [PATCH 04/38] ASoC: intel: atom: replace platform to component Kuninori Morimoto
2018-01-12 0:43 ` [PATCH 05/38] ASoC: intel: skylake: " Kuninori Morimoto
2018-02-12 12:32 ` Applied "ASoC: intel: skylake: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:44 ` [PATCH 06/38] ASoC: intel: baytrail: replace platform to component Kuninori Morimoto
2018-02-12 12:32 ` Applied "ASoC: intel: baytrail: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:44 ` [PATCH 07/38] ASoC: intel: haswell: replace platform to component Kuninori Morimoto
2018-02-12 12:32 ` Applied "ASoC: intel: haswell: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:44 ` [PATCH 08/38] ASoC: bcm: cygnus: replace platform to component Kuninori Morimoto
2018-01-12 0:45 ` [PATCH 09/38] ASoC: sh: rsnd: " Kuninori Morimoto
2018-02-12 12:31 ` Applied "ASoC: sh: rsnd: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:45 ` [PATCH 10/38] ASoC: sh: dma-sh7760: replace platform to component Kuninori Morimoto
2018-02-12 12:31 ` Applied "ASoC: sh: dma-sh7760: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:45 ` [PATCH 11/38] ASoC: sh: fsi: replace platform to component Kuninori Morimoto
2018-01-12 0:46 ` [PATCH 12/38] ASoC: sh: siu: " Kuninori Morimoto
2018-01-12 0:46 ` [PATCH 13/38] ASoC: atmel: " Kuninori Morimoto
2018-02-12 12:30 ` Applied "ASoC: atmel: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:46 ` [PATCH 14/38] ASoC: amd: replace platform to component Kuninori Morimoto
2018-01-24 0:46 ` Kuninori Morimoto
2018-01-24 9:15 ` Mukunda,Vijendar
2018-02-12 12:30 ` Applied "ASoC: amd: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:47 ` [PATCH 15/38] ASoC: cs47l24: replace platform to component Kuninori Morimoto
2018-01-24 14:23 ` Charles Keepax
2018-02-12 12:30 ` Applied "ASoC: cs47l24: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:47 ` [PATCH 16/38] ASoC: rt5514-spi: replace platform to component Kuninori Morimoto
2018-02-12 12:30 ` Applied "ASoC: rt5514-spi: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:47 ` [PATCH 17/38] ASoC: wm5110: replace platform to component Kuninori Morimoto
2018-01-24 14:24 ` Charles Keepax
2018-02-12 12:30 ` Applied "ASoC: wm5110: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:48 ` [PATCH 18/38] ASoC: wm5102: replace platform to component Kuninori Morimoto
2018-01-24 14:25 ` Charles Keepax
2018-02-12 12:29 ` Applied "ASoC: wm5102: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:48 ` [PATCH 19/38] ASoC: davinci-i2s: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: davinci-i2s: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:48 ` [PATCH 20/38] ASoC: fsl: dma: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Mark Brown [this message]
2018-01-12 0:50 ` [PATCH 21/38] ASoC: fsl: asrc: " Kuninori Morimoto
2018-01-16 0:55 ` Nicolin Chen
2018-02-12 12:29 ` Applied "ASoC: fsl: asrc: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:50 ` [PATCH 22/38] ASoC: fsl: imx: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: fsl: imx: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:50 ` [PATCH 23/38] ASoC: fsl: mpc5200: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: fsl: mpc5200: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:51 ` [PATCH 24/38] ASoC: dwc-pcm: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: dwc-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:51 ` [PATCH 25/38] ASoC: kirkwood: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: kirkwood: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:51 ` [PATCH 26/38] ASoC: pxa: mmp: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: pxa: mmp: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:52 ` [PATCH 27/38] ASoC: pxa: pxa2xx: replace platform to component Kuninori Morimoto
2018-02-12 12:29 ` Applied "ASoC: pxa: pxa2xx: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:52 ` [PATCH 28/38] ASoC: qcom: lpass-platform: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: qcom: lpass-platform: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:52 ` [PATCH 29/38] ASoC: samsung: idma: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: samsung: idma: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:53 ` [PATCH 30/38] ASoC: xtfpga-i2s: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: xtfpga-i2s: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:53 ` [PATCH 31/38] ASoC: blackfin: bf5xx-ac97-pcm: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: blackfin: bf5xx-ac97-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:53 ` [PATCH 32/38] ASoC: blackfin: bf5xx-i2s-pcm: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: blackfin: bf5xx-i2s-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:54 ` [PATCH 33/38] ASoC: omap-pcm: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: omap-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:54 ` [PATCH 34/38] ASoC: au1x: dbdma2: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: au1x: dbdma2: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:54 ` [PATCH 35/38] ASoC: au1x: dma: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: au1x: dma: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:54 ` [PATCH 36/38] ASoC: nuc900-pcm: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: nuc900-pcm: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:55 ` [PATCH 37/38] ASoC: txx9aclc: replace platform to component Kuninori Morimoto
2018-02-12 12:28 ` Applied "ASoC: txx9aclc: replace platform to component" to the asoc tree Mark Brown
2018-01-12 0:55 ` [PATCH 38/38] ASoC: mt2701/mt8173: replace platform to component Kuninori Morimoto
2018-01-12 9:46 ` [PATCH 00/38] ASoC: " Liam Girdwood
2018-01-12 11:28 ` Mark Brown
2018-01-14 23:51 ` Kuninori Morimoto
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=E1elDF0-00039s-Py@debutante \
--to=broonie@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@renesas.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).