* [PATCH v3 4/4] ASoC: kirkwood: change kirkwood-i2s to mvebu-pcm-audio and DT doc
@ 2013-07-31 6:18 Jean-Francois Moine
2013-08-03 13:48 ` Russell King - ARM Linux
0 siblings, 1 reply; 4+ messages in thread
From: Jean-Francois Moine @ 2013-07-31 6:18 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Rob Herring, Russell King, alsa-devel, linux-kernel, devicetree
As the kirkwood audio system may be used in other Marvell machines
(mvebu), this patch changes the name of the audio driver to
'mvebu-pcm-audio' and also contains the associated DT documentation.
Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
---
.../devicetree/bindings/sound/mvebu-pcm-audio.txt | 29 ++++++++++++++++++++++
sound/soc/kirkwood/kirkwood-dma.c | 2 +-
sound/soc/kirkwood/kirkwood-i2s.c | 6 +++---
sound/soc/kirkwood/kirkwood-openrd.c | 4 ++--
sound/soc/kirkwood/kirkwood-t5325.c | 4 ++--
5 files changed, 37 insertions(+), 8 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/mvebu-pcm-audio.txt b/Documentation/devicetree/bindings/sound/mvebu-pcm-audio.txt
new file mode 100644
index 0000000..0995ebc
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/mvebu-pcm-audio.txt
@@ -0,0 +1,29 @@
+* mvebu (Kirkwood, Dove, Armada 370) i2s controller
+
+Required properties:
+
+- compatible: "marvell,mvebu-pcm-audio"
+
+- reg: physical base address of the controller and length of memory mapped
+ region.
+
+- interrupts: list of two irq numbers.
+ The first irq is used for data flow and the second one is used for errors.
+
+- clocks: one or two phandles.
+ The first one is mandatory and defines the internal clock.
+ The second one is optional and defines an external clock.
+
+- clock-names: names associated to the clocks:
+ "internal" for the internal clock
+ "extclk" for the external clock
+
+Example:
+
+i2s1: audio-controller@b4000 {
+ compatible = "marvell,mvebu-pcm-audio";
+ reg = <0xb4000 0x2210>;
+ interrupts = <21>, <22>;
+ clocks = <&gate_clk 13>;
+ clock-names = "internal";
+};
diff --git a/sound/soc/kirkwood/kirkwood-dma.c b/sound/soc/kirkwood/kirkwood-dma.c
index f735501..e9802f1 100644
--- a/sound/soc/kirkwood/kirkwood-dma.c
+++ b/sound/soc/kirkwood/kirkwood-dma.c
@@ -165,7 +165,7 @@ static int kirkwood_dma_open(struct snd_pcm_substream *substream)
prdata->data = priv;
err = request_irq(priv->irq, kirkwood_dma_irq, IRQF_SHARED,
- "kirkwood-i2s", prdata);
+ "mvebu-pcm-audio", prdata);
if (err) {
kfree(prdata);
return -EBUSY;
diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
index 9844010..4f817a2 100644
--- a/sound/soc/kirkwood/kirkwood-i2s.c
+++ b/sound/soc/kirkwood/kirkwood-i2s.c
@@ -25,7 +25,7 @@
#include "kirkwood.h"
-#define DRV_NAME "kirkwood-i2s"
+#define DRV_NAME "mvebu-pcm-audio"
#define KIRKWOOD_I2S_FORMATS \
(SNDRV_PCM_FMTBIT_S16_LE | \
@@ -555,7 +555,7 @@ fail:
#ifdef CONFIG_OF
static struct of_device_id kirkwood_i2s_of_match[] = {
- { .compatible = "marvell,kirkwood-i2s" },
+ { .compatible = "marvell,mvebu-pcm-audio" },
{ }
};
MODULE_DEVICE_TABLE(of, kirkwood_i2s_of_match);
@@ -577,4 +577,4 @@ module_platform_driver(kirkwood_i2s_driver);
MODULE_AUTHOR("Arnaud Patard, <arnaud.patard@rtp-net.org>");
MODULE_DESCRIPTION("Kirkwood I2S SoC Interface");
MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:kirkwood-i2s");
+MODULE_ALIAS("platform:mvebu-pcm-audio");
diff --git a/sound/soc/kirkwood/kirkwood-openrd.c b/sound/soc/kirkwood/kirkwood-openrd.c
index df565d2..532843a 100644
--- a/sound/soc/kirkwood/kirkwood-openrd.c
+++ b/sound/soc/kirkwood/kirkwood-openrd.c
@@ -52,8 +52,8 @@ static struct snd_soc_dai_link openrd_client_dai[] = {
{
.name = "CS42L51",
.stream_name = "CS42L51 HiFi",
- .cpu_dai_name = "kirkwood-i2s",
- .platform_name = "kirkwood-i2s",
+ .cpu_dai_name = "mvebu-pcm-audio",
+ .platform_name = "mvebu-pcm-audio",
.codec_dai_name = "cs42l51-hifi",
.codec_name = "cs42l51-codec.0-004a",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
diff --git a/sound/soc/kirkwood/kirkwood-t5325.c b/sound/soc/kirkwood/kirkwood-t5325.c
index b4647ba..d31a0f1 100644
--- a/sound/soc/kirkwood/kirkwood-t5325.c
+++ b/sound/soc/kirkwood/kirkwood-t5325.c
@@ -68,8 +68,8 @@ static struct snd_soc_dai_link t5325_dai[] = {
{
.name = "ALC5621",
.stream_name = "ALC5621 HiFi",
- .cpu_dai_name = "kirkwood-i2s",
- .platform_name = "kirkwood-i2s",
+ .cpu_dai_name = "mvebu-pcm-audio",
+ .platform_name = "mvebu-pcm-audio",
.codec_dai_name = "alc5621-hifi",
.codec_name = "alc562x-codec.0-001a",
.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v3 4/4] ASoC: kirkwood: change kirkwood-i2s to mvebu-pcm-audio and DT doc
2013-07-31 6:18 [PATCH v3 4/4] ASoC: kirkwood: change kirkwood-i2s to mvebu-pcm-audio and DT doc Jean-Francois Moine
@ 2013-08-03 13:48 ` Russell King - ARM Linux
2013-08-03 16:26 ` Jean-Francois Moine
0 siblings, 1 reply; 4+ messages in thread
From: Russell King - ARM Linux @ 2013-08-03 13:48 UTC (permalink / raw)
To: Jean-Francois Moine
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Rob Herring, alsa-devel, linux-kernel, devicetree
On Wed, Jul 31, 2013 at 08:18:58AM +0200, Jean-Francois Moine wrote:
> diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
> index 9844010..4f817a2 100644
> --- a/sound/soc/kirkwood/kirkwood-i2s.c
> +++ b/sound/soc/kirkwood/kirkwood-i2s.c
> @@ -25,7 +25,7 @@
>
> #include "kirkwood.h"
>
> -#define DRV_NAME "kirkwood-i2s"
> +#define DRV_NAME "mvebu-pcm-audio"
This breaks non-DT users of this driver. The device in arch/arm/mach-kirkwood
is left as "kirkwood-i2s" but the platform device is now called something
different.
> static struct of_device_id kirkwood_i2s_of_match[] = {
> - { .compatible = "marvell,kirkwood-i2s" },
> + { .compatible = "marvell,mvebu-pcm-audio" },
You've only just introduced "marvell,kirkwood-i2s" in the previous patch.
Why introduce something and then immediately change its name? This makes
no sense what so ever.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 4/4] ASoC: kirkwood: change kirkwood-i2s to mvebu-pcm-audio and DT doc
2013-08-03 13:48 ` Russell King - ARM Linux
@ 2013-08-03 16:26 ` Jean-Francois Moine
2013-08-04 19:40 ` Mark Brown
0 siblings, 1 reply; 4+ messages in thread
From: Jean-Francois Moine @ 2013-08-03 16:26 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Rob Herring, alsa-devel, linux-kernel, devicetree
On Sat, 3 Aug 2013 14:48:55 +0100
Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> On Wed, Jul 31, 2013 at 08:18:58AM +0200, Jean-Francois Moine wrote:
> > diff --git a/sound/soc/kirkwood/kirkwood-i2s.c b/sound/soc/kirkwood/kirkwood-i2s.c
> > index 9844010..4f817a2 100644
> > --- a/sound/soc/kirkwood/kirkwood-i2s.c
> > +++ b/sound/soc/kirkwood/kirkwood-i2s.c
> > @@ -25,7 +25,7 @@
> >
> > #include "kirkwood.h"
> >
> > -#define DRV_NAME "kirkwood-i2s"
> > +#define DRV_NAME "mvebu-pcm-audio"
>
> This breaks non-DT users of this driver. The device in arch/arm/mach-kirkwood
> is left as "kirkwood-i2s" but the platform device is now called something
> different.
Oops, sorry, the patch to arch/arm/mach-kirkwood/common.c went away
when I pulled the last kernel.
> > static struct of_device_id kirkwood_i2s_of_match[] = {
> > - { .compatible = "marvell,kirkwood-i2s" },
> > + { .compatible = "marvell,mvebu-pcm-audio" },
>
> You've only just introduced "marvell,kirkwood-i2s" in the previous patch.
> Why introduce something and then immediately change its name? This makes
> no sense what so ever.
2 patches for 2 different purposes. The first one just adds the DT
support. It is enough for DT based kernels. But some people wanted the
device name to be changed to 'mvebu'. So, the second patch.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v3 4/4] ASoC: kirkwood: change kirkwood-i2s to mvebu-pcm-audio and DT doc
2013-08-03 16:26 ` Jean-Francois Moine
@ 2013-08-04 19:40 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2013-08-04 19:40 UTC (permalink / raw)
To: Jean-Francois Moine
Cc: Russell King - ARM Linux, Liam Girdwood, Jaroslav Kysela,
Takashi Iwai, Rob Herring, alsa-devel, linux-kernel, devicetree
[-- Attachment #1: Type: text/plain, Size: 835 bytes --]
On Sat, Aug 03, 2013 at 06:26:36PM +0200, Jean-Francois Moine wrote:
> Russell King - ARM Linux <linux@arm.linux.org.uk> wrote:
> > > static struct of_device_id kirkwood_i2s_of_match[] = {
> > > - { .compatible = "marvell,kirkwood-i2s" },
> > > + { .compatible = "marvell,mvebu-pcm-audio" },
> > You've only just introduced "marvell,kirkwood-i2s" in the previous patch.
> > Why introduce something and then immediately change its name? This makes
> > no sense what so ever.
> 2 patches for 2 different purposes. The first one just adds the DT
> support. It is enough for DT based kernels. But some people wanted the
> device name to be changed to 'mvebu'. So, the second patch.
There is no need for the DT name to be connected to the Linux internal
platform device name, just use the final name to start with.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-04 19:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 6:18 [PATCH v3 4/4] ASoC: kirkwood: change kirkwood-i2s to mvebu-pcm-audio and DT doc Jean-Francois Moine
2013-08-03 13:48 ` Russell King - ARM Linux
2013-08-03 16:26 ` Jean-Francois Moine
2013-08-04 19:40 ` Mark Brown
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).