All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/6] ASoC/ARM: move Marvell Armada 370 DB to simple-audio-card
@ 2014-10-28 16:08 ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, alsa-devel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement
  Cc: Lior Amsalem, Thomas Petazzoni, Tawfik Bayouk, Nadav Haklai,
	Ezequiel Garcia, linux-arm-kernel

Hello,

This set of patches moves the Marvell Armada 370 DB audio complex
description from a custom audio machine driver to the
simple-audio-card DT binding.

The first three patches are meant to go through the ASoC tree, the
last three patches are meant to go through the mvebu maintainers tree.

Quick description of the patches:

 - First patch fixes a small issue in the cs42l51 driver following its
   split in two parts.

 - Second patch makes the cs42l51 user-selectable by adding a prompt
   to its Kconfig option.

 - Third patch gets rid of the machine driver.

 - Fourth patch removes some now incorrect pin-muxing selection in the
   Armada 370 DB platform.

 - Fifth patch actually switches to use the simple-audio-card DT
   binding on Armada 370 DB.

 - Sixth patch updates mvebu_v7_defconfig to select the relevant
   options to get audio to work.

Note: obviously, after PATCH 3 is applied, the audio will no longer
work until PATCH 5 is applied. But since those patches will anyway go
through different trees, it is a bit inevitable. And it is not
dramatically important, since audio support on Armada 370 DB is
already broken since the split of the CS42L51 driver.

Thanks,

Thomas

Thomas Petazzoni (6):
  ASoC: cs42l51: re-add of_match_table pointer
  ASoC: cs42l51: make driver user-selectable
  ASoC: kirkwood: get rid of armada-370-db driver
  ARM: mvebu: remove conflicting muxing on Armada 370 DB
  ARM: mvebu: use simple-card DT binding for audio on Armada 370 DB
  ARM: mvebu: update mvebu_v7_defconfig for Armada 370 audio

 arch/arm/boot/dts/armada-370-db.dts |  80 +++++++++++--------
 arch/arm/boot/dts/armada-370.dtsi   |   1 +
 arch/arm/configs/mvebu_v7_defconfig |   4 +-
 sound/soc/codecs/Kconfig            |   2 +-
 sound/soc/codecs/cs42l51-i2c.c      |   7 ++
 sound/soc/codecs/cs42l51.c          |   5 --
 sound/soc/kirkwood/Kconfig          |  13 +---
 sound/soc/kirkwood/Makefile         |   4 -
 sound/soc/kirkwood/armada-370-db.c  | 148 ------------------------------------
 9 files changed, 63 insertions(+), 201 deletions(-)
 delete mode 100644 sound/soc/kirkwood/armada-370-db.c

-- 
2.0.0

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 0/6] ASoC/ARM: move Marvell Armada 370 DB to simple-audio-card
@ 2014-10-28 16:08 ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

This set of patches moves the Marvell Armada 370 DB audio complex
description from a custom audio machine driver to the
simple-audio-card DT binding.

The first three patches are meant to go through the ASoC tree, the
last three patches are meant to go through the mvebu maintainers tree.

Quick description of the patches:

 - First patch fixes a small issue in the cs42l51 driver following its
   split in two parts.

 - Second patch makes the cs42l51 user-selectable by adding a prompt
   to its Kconfig option.

 - Third patch gets rid of the machine driver.

 - Fourth patch removes some now incorrect pin-muxing selection in the
   Armada 370 DB platform.

 - Fifth patch actually switches to use the simple-audio-card DT
   binding on Armada 370 DB.

 - Sixth patch updates mvebu_v7_defconfig to select the relevant
   options to get audio to work.

Note: obviously, after PATCH 3 is applied, the audio will no longer
work until PATCH 5 is applied. But since those patches will anyway go
through different trees, it is a bit inevitable. And it is not
dramatically important, since audio support on Armada 370 DB is
already broken since the split of the CS42L51 driver.

Thanks,

Thomas

Thomas Petazzoni (6):
  ASoC: cs42l51: re-add of_match_table pointer
  ASoC: cs42l51: make driver user-selectable
  ASoC: kirkwood: get rid of armada-370-db driver
  ARM: mvebu: remove conflicting muxing on Armada 370 DB
  ARM: mvebu: use simple-card DT binding for audio on Armada 370 DB
  ARM: mvebu: update mvebu_v7_defconfig for Armada 370 audio

 arch/arm/boot/dts/armada-370-db.dts |  80 +++++++++++--------
 arch/arm/boot/dts/armada-370.dtsi   |   1 +
 arch/arm/configs/mvebu_v7_defconfig |   4 +-
 sound/soc/codecs/Kconfig            |   2 +-
 sound/soc/codecs/cs42l51-i2c.c      |   7 ++
 sound/soc/codecs/cs42l51.c          |   5 --
 sound/soc/kirkwood/Kconfig          |  13 +---
 sound/soc/kirkwood/Makefile         |   4 -
 sound/soc/kirkwood/armada-370-db.c  | 148 ------------------------------------
 9 files changed, 63 insertions(+), 201 deletions(-)
 delete mode 100644 sound/soc/kirkwood/armada-370-db.c

-- 
2.0.0

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 1/6] ASoC: cs42l51: re-add of_match_table pointer
  2014-10-28 16:08 ` Thomas Petazzoni
@ 2014-10-28 16:08   ` Thomas Petazzoni
  -1 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, alsa-devel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement
  Cc: linux-arm-kernel, Ezequiel Garcia, Tawfik Bayouk, Nadav Haklai,
	Lior Amsalem, Thomas Petazzoni, stable, Arnaud Patard (Rtp),
	Brian Austin

In commit a1253ef6d3fa ("ASoC: cs42l51: split i2c from codec driver"),
the I2C part of the CS42L51 was moved to a separate file, but the
definition of the of_device_id array was left in the driver file
itself, no longer connected to the platform_driver structure using the
.of_match_table pointer.

This commit therefore moves the of_device_id array into the
cs42l51-i2c.c file, and restore the proper .of_match_table pointer.

Fixes: a1253ef6d3fa ("ASoC: cs42l51: split i2c from codec driver")
Cc: <stable@vger.kernel.org> # v3.16+
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Cc: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 sound/soc/codecs/cs42l51-i2c.c | 7 +++++++
 sound/soc/codecs/cs42l51.c     | 5 -----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs42l51-i2c.c b/sound/soc/codecs/cs42l51-i2c.c
index cee51ae..216a610 100644
--- a/sound/soc/codecs/cs42l51-i2c.c
+++ b/sound/soc/codecs/cs42l51-i2c.c
@@ -17,6 +17,12 @@
 
 #include "cs42l51.h"
 
+static const struct of_device_id cs42l51_of_match[] = {
+	{ .compatible = "cirrus,cs42l51", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, cs42l51_of_match);
+
 static struct i2c_device_id cs42l51_i2c_id[] = {
 	{"cs42l51", 0},
 	{}
@@ -46,6 +52,7 @@ static struct i2c_driver cs42l51_i2c_driver = {
 	.driver = {
 		.name = "cs42l51",
 		.owner = THIS_MODULE,
+		.of_match_table = cs42l51_of_match,
 	},
 	.probe = cs42l51_i2c_probe,
 	.remove = cs42l51_i2c_remove,
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 09488d9..56ecc1e 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -558,11 +558,6 @@ error:
 }
 EXPORT_SYMBOL_GPL(cs42l51_probe);
 
-static const struct of_device_id cs42l51_of_match[] = {
-	{ .compatible = "cirrus,cs42l51", },
-	{ }
-};
-MODULE_DEVICE_TABLE(of, cs42l51_of_match);
 MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
 MODULE_DESCRIPTION("Cirrus Logic CS42L51 ALSA SoC Codec Driver");
 MODULE_LICENSE("GPL");
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 1/6] ASoC: cs42l51: re-add of_match_table pointer
@ 2014-10-28 16:08   ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

In commit a1253ef6d3fa ("ASoC: cs42l51: split i2c from codec driver"),
the I2C part of the CS42L51 was moved to a separate file, but the
definition of the of_device_id array was left in the driver file
itself, no longer connected to the platform_driver structure using the
.of_match_table pointer.

This commit therefore moves the of_device_id array into the
cs42l51-i2c.c file, and restore the proper .of_match_table pointer.

Fixes: a1253ef6d3fa ("ASoC: cs42l51: split i2c from codec driver")
Cc: <stable@vger.kernel.org> # v3.16+
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Cc: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 sound/soc/codecs/cs42l51-i2c.c | 7 +++++++
 sound/soc/codecs/cs42l51.c     | 5 -----
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/sound/soc/codecs/cs42l51-i2c.c b/sound/soc/codecs/cs42l51-i2c.c
index cee51ae..216a610 100644
--- a/sound/soc/codecs/cs42l51-i2c.c
+++ b/sound/soc/codecs/cs42l51-i2c.c
@@ -17,6 +17,12 @@
 
 #include "cs42l51.h"
 
+static const struct of_device_id cs42l51_of_match[] = {
+	{ .compatible = "cirrus,cs42l51", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, cs42l51_of_match);
+
 static struct i2c_device_id cs42l51_i2c_id[] = {
 	{"cs42l51", 0},
 	{}
@@ -46,6 +52,7 @@ static struct i2c_driver cs42l51_i2c_driver = {
 	.driver = {
 		.name = "cs42l51",
 		.owner = THIS_MODULE,
+		.of_match_table = cs42l51_of_match,
 	},
 	.probe = cs42l51_i2c_probe,
 	.remove = cs42l51_i2c_remove,
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 09488d9..56ecc1e 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -558,11 +558,6 @@ error:
 }
 EXPORT_SYMBOL_GPL(cs42l51_probe);
 
-static const struct of_device_id cs42l51_of_match[] = {
-	{ .compatible = "cirrus,cs42l51", },
-	{ }
-};
-MODULE_DEVICE_TABLE(of, cs42l51_of_match);
 MODULE_AUTHOR("Arnaud Patard <arnaud.patard@rtp-net.org>");
 MODULE_DESCRIPTION("Cirrus Logic CS42L51 ALSA SoC Codec Driver");
 MODULE_LICENSE("GPL");
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 2/6] ASoC: cs42l51: make driver user-selectable
  2014-10-28 16:08 ` Thomas Petazzoni
@ 2014-10-28 16:08   ` Thomas Petazzoni
  -1 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, alsa-devel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement
  Cc: Lior Amsalem, Thomas Petazzoni, Brian Austin, Tawfik Bayouk,
	Nadav Haklai, Arnaud Patard (Rtp),
	Ezequiel Garcia, linux-arm-kernel

Since we are removing the Armada 370 DB audio machine driver to use
the 'simple-card' Device Tree binding, we can no longer select the
CS42L51 codec driver using a Kconfig 'select', and we instead need it
to be user-selectable. Therefore, this commit adds a prompt to make
the CS42L51 I2C codec driver user-selectable.

Cc: Brian Austin <brian.austin@cirrus.com>
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 sound/soc/codecs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index a68d173..f4fb12f 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -336,7 +336,7 @@ config SND_SOC_CS42L51
 	tristate
 
 config SND_SOC_CS42L51_I2C
-	tristate
+	tristate "Cirrus Logic CS42L51 CODEC (I2C)"
 	select SND_SOC_CS42L51
 
 config SND_SOC_CS42L52
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 2/6] ASoC: cs42l51: make driver user-selectable
@ 2014-10-28 16:08   ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

Since we are removing the Armada 370 DB audio machine driver to use
the 'simple-card' Device Tree binding, we can no longer select the
CS42L51 codec driver using a Kconfig 'select', and we instead need it
to be user-selectable. Therefore, this commit adds a prompt to make
the CS42L51 I2C codec driver user-selectable.

Cc: Brian Austin <brian.austin@cirrus.com>
Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 sound/soc/codecs/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index a68d173..f4fb12f 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -336,7 +336,7 @@ config SND_SOC_CS42L51
 	tristate
 
 config SND_SOC_CS42L51_I2C
-	tristate
+	tristate "Cirrus Logic CS42L51 CODEC (I2C)"
 	select SND_SOC_CS42L51
 
 config SND_SOC_CS42L52
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
  2014-10-28 16:08 ` Thomas Petazzoni
@ 2014-10-28 16:08   ` Thomas Petazzoni
  -1 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, alsa-devel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement
  Cc: Lior Amsalem, Thomas Petazzoni, Tawfik Bayouk, Nadav Haklai,
	Ezequiel Garcia, linux-arm-kernel

Now that the Armada 370 DB audio complex is fully described in the
Device Tree using the simple-card DT binding, the armada-370-db audio
machine driver can be removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 sound/soc/kirkwood/Kconfig         |  13 +---
 sound/soc/kirkwood/Makefile        |   4 -
 sound/soc/kirkwood/armada-370-db.c | 148 -------------------------------------
 3 files changed, 1 insertion(+), 164 deletions(-)
 delete mode 100644 sound/soc/kirkwood/armada-370-db.c

diff --git a/sound/soc/kirkwood/Kconfig b/sound/soc/kirkwood/Kconfig
index 132bb83..c1b9822 100644
--- a/sound/soc/kirkwood/Kconfig
+++ b/sound/soc/kirkwood/Kconfig
@@ -3,15 +3,4 @@ config SND_KIRKWOOD_SOC
 	depends on ARCH_DOVE || ARCH_MVEBU || COMPILE_TEST
 	help
 	  Say Y or M if you want to add support for codecs attached to
-	  the Kirkwood I2S interface. You will also need to select the
-	  audio interfaces to support below.
-
-config SND_KIRKWOOD_SOC_ARMADA370_DB
-	tristate "SoC Audio support for Armada 370 DB"
-	depends on SND_KIRKWOOD_SOC && (ARCH_MVEBU || COMPILE_TEST) && I2C
-	select SND_SOC_CS42L51
-	select SND_SOC_SPDIF
-	help
-	  Say Y if you want to add support for SoC audio on
-	  the Armada 370 Development Board.
-
+	  the Kirkwood I2S interface.
diff --git a/sound/soc/kirkwood/Makefile b/sound/soc/kirkwood/Makefile
index c36b03d..8cff64e 100644
--- a/sound/soc/kirkwood/Makefile
+++ b/sound/soc/kirkwood/Makefile
@@ -1,7 +1,3 @@
 snd-soc-kirkwood-objs := kirkwood-dma.o kirkwood-i2s.o
 
 obj-$(CONFIG_SND_KIRKWOOD_SOC) += snd-soc-kirkwood.o
-
-snd-soc-armada-370-db-objs := armada-370-db.o
-
-obj-$(CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB) += snd-soc-armada-370-db.o
diff --git a/sound/soc/kirkwood/armada-370-db.c b/sound/soc/kirkwood/armada-370-db.c
deleted file mode 100644
index c443338..0000000
--- a/sound/soc/kirkwood/armada-370-db.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2014 Marvell
- *
- * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- */
-
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/interrupt.h>
-#include <linux/platform_device.h>
-#include <linux/slab.h>
-#include <sound/soc.h>
-#include <linux/of.h>
-#include <linux/platform_data/asoc-kirkwood.h>
-#include "../codecs/cs42l51.h"
-
-static int a370db_hw_params(struct snd_pcm_substream *substream,
-			    struct snd_pcm_hw_params *params)
-{
-	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
-	unsigned int freq;
-
-	switch (params_rate(params)) {
-	default:
-	case 44100:
-		freq = 11289600;
-		break;
-	case 48000:
-		freq = 12288000;
-		break;
-	case 96000:
-		freq = 24576000;
-		break;
-	}
-
-	return snd_soc_dai_set_sysclk(codec_dai, 0, freq, SND_SOC_CLOCK_IN);
-}
-
-static struct snd_soc_ops a370db_ops = {
-	.hw_params = a370db_hw_params,
-};
-
-static const struct snd_soc_dapm_widget a370db_dapm_widgets[] = {
-	SND_SOC_DAPM_HP("Out Jack", NULL),
-	SND_SOC_DAPM_LINE("In Jack", NULL),
-};
-
-static const struct snd_soc_dapm_route a370db_route[] = {
-	{ "Out Jack",	NULL,	"HPL" },
-	{ "Out Jack",	NULL,	"HPR" },
-	{ "AIN1L",	NULL,	"In Jack" },
-	{ "AIN1L",	NULL,	"In Jack" },
-};
-
-static struct snd_soc_dai_link a370db_dai[] = {
-{
-	.name = "CS42L51",
-	.stream_name = "analog",
-	.cpu_dai_name = "i2s",
-	.codec_dai_name = "cs42l51-hifi",
-	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
-	.ops = &a370db_ops,
-},
-{
-	.name = "S/PDIF out",
-	.stream_name = "spdif-out",
-	.cpu_dai_name = "spdif",
-	.codec_dai_name = "dit-hifi",
-	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
-},
-{
-	.name = "S/PDIF in",
-	.stream_name = "spdif-in",
-	.cpu_dai_name = "spdif",
-	.codec_dai_name = "dir-hifi",
-	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
-},
-};
-
-static struct snd_soc_card a370db = {
-	.name = "a370db",
-	.owner = THIS_MODULE,
-	.dai_link = a370db_dai,
-	.num_links = ARRAY_SIZE(a370db_dai),
-	.dapm_widgets = a370db_dapm_widgets,
-	.num_dapm_widgets = ARRAY_SIZE(a370db_dapm_widgets),
-	.dapm_routes = a370db_route,
-	.num_dapm_routes = ARRAY_SIZE(a370db_route),
-};
-
-static int a370db_probe(struct platform_device *pdev)
-{
-	struct snd_soc_card *card = &a370db;
-
-	card->dev = &pdev->dev;
-
-	a370db_dai[0].cpu_of_node =
-		of_parse_phandle(pdev->dev.of_node,
-				 "marvell,audio-controller", 0);
-	a370db_dai[0].platform_of_node = a370db_dai[0].cpu_of_node;
-
-	a370db_dai[0].codec_of_node =
-		of_parse_phandle(pdev->dev.of_node,
-				 "marvell,audio-codec", 0);
-
-	a370db_dai[1].cpu_of_node = a370db_dai[0].cpu_of_node;
-	a370db_dai[1].platform_of_node = a370db_dai[0].cpu_of_node;
-
-	a370db_dai[1].codec_of_node =
-		of_parse_phandle(pdev->dev.of_node,
-				 "marvell,audio-codec", 1);
-
-	a370db_dai[2].cpu_of_node = a370db_dai[0].cpu_of_node;
-	a370db_dai[2].platform_of_node = a370db_dai[0].cpu_of_node;
-
-	a370db_dai[2].codec_of_node =
-		of_parse_phandle(pdev->dev.of_node,
-				 "marvell,audio-codec", 2);
-
-	return devm_snd_soc_register_card(card->dev, card);
-}
-
-static const struct of_device_id a370db_dt_ids[] = {
-	{ .compatible = "marvell,a370db-audio" },
-	{ },
-};
-
-static struct platform_driver a370db_driver = {
-	.driver		= {
-		.name	= "a370db-audio",
-		.owner	= THIS_MODULE,
-		.of_match_table = of_match_ptr(a370db_dt_ids),
-	},
-	.probe		= a370db_probe,
-};
-
-module_platform_driver(a370db_driver);
-
-MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
-MODULE_DESCRIPTION("ALSA SoC a370db audio client");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:a370db-audio");
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
@ 2014-10-28 16:08   ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

Now that the Armada 370 DB audio complex is fully described in the
Device Tree using the simple-card DT binding, the armada-370-db audio
machine driver can be removed.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 sound/soc/kirkwood/Kconfig         |  13 +---
 sound/soc/kirkwood/Makefile        |   4 -
 sound/soc/kirkwood/armada-370-db.c | 148 -------------------------------------
 3 files changed, 1 insertion(+), 164 deletions(-)
 delete mode 100644 sound/soc/kirkwood/armada-370-db.c

diff --git a/sound/soc/kirkwood/Kconfig b/sound/soc/kirkwood/Kconfig
index 132bb83..c1b9822 100644
--- a/sound/soc/kirkwood/Kconfig
+++ b/sound/soc/kirkwood/Kconfig
@@ -3,15 +3,4 @@ config SND_KIRKWOOD_SOC
 	depends on ARCH_DOVE || ARCH_MVEBU || COMPILE_TEST
 	help
 	  Say Y or M if you want to add support for codecs attached to
-	  the Kirkwood I2S interface. You will also need to select the
-	  audio interfaces to support below.
-
-config SND_KIRKWOOD_SOC_ARMADA370_DB
-	tristate "SoC Audio support for Armada 370 DB"
-	depends on SND_KIRKWOOD_SOC && (ARCH_MVEBU || COMPILE_TEST) && I2C
-	select SND_SOC_CS42L51
-	select SND_SOC_SPDIF
-	help
-	  Say Y if you want to add support for SoC audio on
-	  the Armada 370 Development Board.
-
+	  the Kirkwood I2S interface.
diff --git a/sound/soc/kirkwood/Makefile b/sound/soc/kirkwood/Makefile
index c36b03d..8cff64e 100644
--- a/sound/soc/kirkwood/Makefile
+++ b/sound/soc/kirkwood/Makefile
@@ -1,7 +1,3 @@
 snd-soc-kirkwood-objs := kirkwood-dma.o kirkwood-i2s.o
 
 obj-$(CONFIG_SND_KIRKWOOD_SOC) += snd-soc-kirkwood.o
-
-snd-soc-armada-370-db-objs := armada-370-db.o
-
-obj-$(CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB) += snd-soc-armada-370-db.o
diff --git a/sound/soc/kirkwood/armada-370-db.c b/sound/soc/kirkwood/armada-370-db.c
deleted file mode 100644
index c443338..0000000
--- a/sound/soc/kirkwood/armada-370-db.c
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
- * Copyright (C) 2014 Marvell
- *
- * Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of the
- * License, or (at your option) any later version.
- */
-
-#include <linux/module.h>
-#include <linux/moduleparam.h>
-#include <linux/interrupt.h>
-#include <linux/platform_device.h>
-#include <linux/slab.h>
-#include <sound/soc.h>
-#include <linux/of.h>
-#include <linux/platform_data/asoc-kirkwood.h>
-#include "../codecs/cs42l51.h"
-
-static int a370db_hw_params(struct snd_pcm_substream *substream,
-			    struct snd_pcm_hw_params *params)
-{
-	struct snd_soc_pcm_runtime *rtd = substream->private_data;
-	struct snd_soc_dai *codec_dai = rtd->codec_dai;
-	unsigned int freq;
-
-	switch (params_rate(params)) {
-	default:
-	case 44100:
-		freq = 11289600;
-		break;
-	case 48000:
-		freq = 12288000;
-		break;
-	case 96000:
-		freq = 24576000;
-		break;
-	}
-
-	return snd_soc_dai_set_sysclk(codec_dai, 0, freq, SND_SOC_CLOCK_IN);
-}
-
-static struct snd_soc_ops a370db_ops = {
-	.hw_params = a370db_hw_params,
-};
-
-static const struct snd_soc_dapm_widget a370db_dapm_widgets[] = {
-	SND_SOC_DAPM_HP("Out Jack", NULL),
-	SND_SOC_DAPM_LINE("In Jack", NULL),
-};
-
-static const struct snd_soc_dapm_route a370db_route[] = {
-	{ "Out Jack",	NULL,	"HPL" },
-	{ "Out Jack",	NULL,	"HPR" },
-	{ "AIN1L",	NULL,	"In Jack" },
-	{ "AIN1L",	NULL,	"In Jack" },
-};
-
-static struct snd_soc_dai_link a370db_dai[] = {
-{
-	.name = "CS42L51",
-	.stream_name = "analog",
-	.cpu_dai_name = "i2s",
-	.codec_dai_name = "cs42l51-hifi",
-	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
-	.ops = &a370db_ops,
-},
-{
-	.name = "S/PDIF out",
-	.stream_name = "spdif-out",
-	.cpu_dai_name = "spdif",
-	.codec_dai_name = "dit-hifi",
-	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
-},
-{
-	.name = "S/PDIF in",
-	.stream_name = "spdif-in",
-	.cpu_dai_name = "spdif",
-	.codec_dai_name = "dir-hifi",
-	.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBS_CFS,
-},
-};
-
-static struct snd_soc_card a370db = {
-	.name = "a370db",
-	.owner = THIS_MODULE,
-	.dai_link = a370db_dai,
-	.num_links = ARRAY_SIZE(a370db_dai),
-	.dapm_widgets = a370db_dapm_widgets,
-	.num_dapm_widgets = ARRAY_SIZE(a370db_dapm_widgets),
-	.dapm_routes = a370db_route,
-	.num_dapm_routes = ARRAY_SIZE(a370db_route),
-};
-
-static int a370db_probe(struct platform_device *pdev)
-{
-	struct snd_soc_card *card = &a370db;
-
-	card->dev = &pdev->dev;
-
-	a370db_dai[0].cpu_of_node =
-		of_parse_phandle(pdev->dev.of_node,
-				 "marvell,audio-controller", 0);
-	a370db_dai[0].platform_of_node = a370db_dai[0].cpu_of_node;
-
-	a370db_dai[0].codec_of_node =
-		of_parse_phandle(pdev->dev.of_node,
-				 "marvell,audio-codec", 0);
-
-	a370db_dai[1].cpu_of_node = a370db_dai[0].cpu_of_node;
-	a370db_dai[1].platform_of_node = a370db_dai[0].cpu_of_node;
-
-	a370db_dai[1].codec_of_node =
-		of_parse_phandle(pdev->dev.of_node,
-				 "marvell,audio-codec", 1);
-
-	a370db_dai[2].cpu_of_node = a370db_dai[0].cpu_of_node;
-	a370db_dai[2].platform_of_node = a370db_dai[0].cpu_of_node;
-
-	a370db_dai[2].codec_of_node =
-		of_parse_phandle(pdev->dev.of_node,
-				 "marvell,audio-codec", 2);
-
-	return devm_snd_soc_register_card(card->dev, card);
-}
-
-static const struct of_device_id a370db_dt_ids[] = {
-	{ .compatible = "marvell,a370db-audio" },
-	{ },
-};
-
-static struct platform_driver a370db_driver = {
-	.driver		= {
-		.name	= "a370db-audio",
-		.owner	= THIS_MODULE,
-		.of_match_table = of_match_ptr(a370db_dt_ids),
-	},
-	.probe		= a370db_probe,
-};
-
-module_platform_driver(a370db_driver);
-
-MODULE_AUTHOR("Thomas Petazzoni <thomas.petazzoni@free-electrons.com>");
-MODULE_DESCRIPTION("ALSA SoC a370db audio client");
-MODULE_LICENSE("GPL");
-MODULE_ALIAS("platform:a370db-audio");
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 4/6] ARM: mvebu: remove conflicting muxing on Armada 370 DB
  2014-10-28 16:08 ` Thomas Petazzoni
@ 2014-10-28 16:08   ` Thomas Petazzoni
  -1 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, alsa-devel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement
  Cc: Lior Amsalem, Thomas Petazzoni, Tawfik Bayouk, Nadav Haklai,
	Ezequiel Garcia, linux-arm-kernel

Back when audio was enabled, the muxing of some MPP pins was causing
problems. However, since commit fea038ed55ae ("ARM: mvebu: Add proper
pin muxing on the Armada 370 DB board"), those problematic MPP pins
have been assigned a proper muxing for the Ethernet interfaces. This
proper muxing is now conflicting with the hog pins muxing that had
been added as part of 249f3822509b ("ARM: mvebu: add audio support to
Armada 370 DB").

Therefore, this commit simply removes the hog pins muxing, which
solves a warning a boot time due to the conflicting muxing
requirements.

Fixes: fea038ed55ae ("ARM: mvebu: Add proper pin muxing on the Armada 370 DB board")
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/boot/dts/armada-370-db.dts | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index a495e58..d505135 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -102,30 +102,6 @@
 				broken-cd;
 			};
 
-			pinctrl {
-				/*
-				 * These pins might be muxed as I2S by
-				 * the bootloader, but it conflicts
-				 * with the real I2S pins that are
-				 * muxed using i2s_pins. We must mux
-				 * those pins to a function other than
-				 * I2S.
-				 */
-				pinctrl-0 = <&hog_pins1 &hog_pins2>;
-				pinctrl-names = "default";
-
-				hog_pins1: hog-pins1 {
-					marvell,pins = "mpp6",  "mpp8", "mpp10",
-						       "mpp12", "mpp13";
-					marvell,function = "gpio";
-				};
-
-				hog_pins2: hog-pins2 {
-					marvell,pins = "mpp5", "mpp7", "mpp9";
-					marvell,function = "gpo";
-				};
-			};
-
 			usb@50000 {
 				status = "okay";
 			};
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 4/6] ARM: mvebu: remove conflicting muxing on Armada 370 DB
@ 2014-10-28 16:08   ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

Back when audio was enabled, the muxing of some MPP pins was causing
problems. However, since commit fea038ed55ae ("ARM: mvebu: Add proper
pin muxing on the Armada 370 DB board"), those problematic MPP pins
have been assigned a proper muxing for the Ethernet interfaces. This
proper muxing is now conflicting with the hog pins muxing that had
been added as part of 249f3822509b ("ARM: mvebu: add audio support to
Armada 370 DB").

Therefore, this commit simply removes the hog pins muxing, which
solves a warning a boot time due to the conflicting muxing
requirements.

Fixes: fea038ed55ae ("ARM: mvebu: Add proper pin muxing on the Armada 370 DB board")
Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/boot/dts/armada-370-db.dts | 24 ------------------------
 1 file changed, 24 deletions(-)

diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index a495e58..d505135 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -102,30 +102,6 @@
 				broken-cd;
 			};
 
-			pinctrl {
-				/*
-				 * These pins might be muxed as I2S by
-				 * the bootloader, but it conflicts
-				 * with the real I2S pins that are
-				 * muxed using i2s_pins. We must mux
-				 * those pins to a function other than
-				 * I2S.
-				 */
-				pinctrl-0 = <&hog_pins1 &hog_pins2>;
-				pinctrl-names = "default";
-
-				hog_pins1: hog-pins1 {
-					marvell,pins = "mpp6",  "mpp8", "mpp10",
-						       "mpp12", "mpp13";
-					marvell,function = "gpio";
-				};
-
-				hog_pins2: hog-pins2 {
-					marvell,pins = "mpp5", "mpp7", "mpp9";
-					marvell,function = "gpo";
-				};
-			};
-
 			usb at 50000 {
 				status = "okay";
 			};
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 5/6] ARM: mvebu: use simple-card DT binding for audio on Armada 370 DB
  2014-10-28 16:08 ` Thomas Petazzoni
@ 2014-10-28 16:08   ` Thomas Petazzoni
  -1 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, alsa-devel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement
  Cc: Lior Amsalem, Thomas Petazzoni, Tawfik Bayouk, Nadav Haklai,
	Ezequiel Garcia, linux-arm-kernel

This commit modifies the Armada 370 and Armada 370 DB Device Tree
descriptions to use the simple-card DT binding to describe the audio
complex of the Armada 370 DB instead of a custom audio machine driver.

To do so, it:

 - Adds the sound-dai-cells properties to the CS42L51 node, the audio
   controller node and the SPDIF in/out nodes.

 - Completely changes the description of the sound complex to use the
   "simple-audio-card" DT binding instead of the
   "marvell,a370db-audio" DT binding.

 - Fixes the indentation to properly use tabs instead of spaces.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/boot/dts/armada-370-db.dts | 56 +++++++++++++++++++++++++++++++++----
 arch/arm/boot/dts/armada-370.dtsi   |  1 +
 2 files changed, 51 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index d505135..0b7bf5e 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -75,6 +75,7 @@
 				clock-frequency = <100000>;
 				status = "okay";
 				audio_codec: audio-codec@4a {
+					#sound-dai-cells = <0>;
 					compatible = "cirrus,cs42l51";
 					reg = <0x4a>;
 				};
@@ -143,17 +144,60 @@
 	};
 
 	sound {
-	      compatible = "marvell,a370db-audio";
-	      marvell,audio-controller = <&audio_controller>;
-	      marvell,audio-codec = <&audio_codec &spdif_out &spdif_in>;
-	      status = "okay";
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "Armada 370 DB Audio";
+		simple-audio-card,mclk-fs = <256>;
+		simple-audio-card,widgets =
+			"Headphone", "Out Jack",
+			"Line", "In Jack";
+		simple-audio-card,routing =
+			"Out Jack", "HPL",
+			"Out Jack", "HPR",
+			"AIN1L", "In Jack",
+			"AIN1L", "In Jack";
+		status = "okay";
+
+		simple-audio-card,dai-link@0 {
+			format = "i2s";
+			cpu {
+				sound-dai = <&audio_controller 0>;
+			};
+
+			codec {
+				sound-dai = <&audio_codec>;
+			};
+		};
+
+		simple-audio-card,dai-link@1 {
+			format = "i2s";
+			cpu {
+				sound-dai = <&audio_controller 1>;
+			};
+
+			codec {
+				sound-dai = <&spdif_out>;
+			};
+		};
+
+		simple-audio-card,dai-link@2 {
+			format = "i2s";
+			cpu {
+				sound-dai = <&audio_controller 1>;
+			};
+
+			codec {
+				sound-dai = <&spdif_in>;
+			};
+		};
 	};
 
 	spdif_out: spdif-out {
-	      compatible = "linux,spdif-dit";
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dit";
 	};
 
 	spdif_in: spdif-in {
-	      compatible = "linux,spdif-dir";
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dir";
 	};
 };
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
index 6b3c23b..8d0c451 100644
--- a/arch/arm/boot/dts/armada-370.dtsi
+++ b/arch/arm/boot/dts/armada-370.dtsi
@@ -249,6 +249,7 @@
 			};
 
 			audio_controller: audio-controller@30000 {
+				#sound-dai-cells = <1>;
 				compatible = "marvell,armada370-audio";
 				reg = <0x30000 0x4000>;
 				interrupts = <93>;
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 5/6] ARM: mvebu: use simple-card DT binding for audio on Armada 370 DB
@ 2014-10-28 16:08   ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

This commit modifies the Armada 370 and Armada 370 DB Device Tree
descriptions to use the simple-card DT binding to describe the audio
complex of the Armada 370 DB instead of a custom audio machine driver.

To do so, it:

 - Adds the sound-dai-cells properties to the CS42L51 node, the audio
   controller node and the SPDIF in/out nodes.

 - Completely changes the description of the sound complex to use the
   "simple-audio-card" DT binding instead of the
   "marvell,a370db-audio" DT binding.

 - Fixes the indentation to properly use tabs instead of spaces.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/boot/dts/armada-370-db.dts | 56 +++++++++++++++++++++++++++++++++----
 arch/arm/boot/dts/armada-370.dtsi   |  1 +
 2 files changed, 51 insertions(+), 6 deletions(-)

diff --git a/arch/arm/boot/dts/armada-370-db.dts b/arch/arm/boot/dts/armada-370-db.dts
index d505135..0b7bf5e 100644
--- a/arch/arm/boot/dts/armada-370-db.dts
+++ b/arch/arm/boot/dts/armada-370-db.dts
@@ -75,6 +75,7 @@
 				clock-frequency = <100000>;
 				status = "okay";
 				audio_codec: audio-codec at 4a {
+					#sound-dai-cells = <0>;
 					compatible = "cirrus,cs42l51";
 					reg = <0x4a>;
 				};
@@ -143,17 +144,60 @@
 	};
 
 	sound {
-	      compatible = "marvell,a370db-audio";
-	      marvell,audio-controller = <&audio_controller>;
-	      marvell,audio-codec = <&audio_codec &spdif_out &spdif_in>;
-	      status = "okay";
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "Armada 370 DB Audio";
+		simple-audio-card,mclk-fs = <256>;
+		simple-audio-card,widgets =
+			"Headphone", "Out Jack",
+			"Line", "In Jack";
+		simple-audio-card,routing =
+			"Out Jack", "HPL",
+			"Out Jack", "HPR",
+			"AIN1L", "In Jack",
+			"AIN1L", "In Jack";
+		status = "okay";
+
+		simple-audio-card,dai-link at 0 {
+			format = "i2s";
+			cpu {
+				sound-dai = <&audio_controller 0>;
+			};
+
+			codec {
+				sound-dai = <&audio_codec>;
+			};
+		};
+
+		simple-audio-card,dai-link at 1 {
+			format = "i2s";
+			cpu {
+				sound-dai = <&audio_controller 1>;
+			};
+
+			codec {
+				sound-dai = <&spdif_out>;
+			};
+		};
+
+		simple-audio-card,dai-link at 2 {
+			format = "i2s";
+			cpu {
+				sound-dai = <&audio_controller 1>;
+			};
+
+			codec {
+				sound-dai = <&spdif_in>;
+			};
+		};
 	};
 
 	spdif_out: spdif-out {
-	      compatible = "linux,spdif-dit";
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dit";
 	};
 
 	spdif_in: spdif-in {
-	      compatible = "linux,spdif-dir";
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dir";
 	};
 };
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
index 6b3c23b..8d0c451 100644
--- a/arch/arm/boot/dts/armada-370.dtsi
+++ b/arch/arm/boot/dts/armada-370.dtsi
@@ -249,6 +249,7 @@
 			};
 
 			audio_controller: audio-controller at 30000 {
+				#sound-dai-cells = <1>;
 				compatible = "marvell,armada370-audio";
 				reg = <0x30000 0x4000>;
 				interrupts = <93>;
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 6/6] ARM: mvebu: update mvebu_v7_defconfig for Armada 370 audio
  2014-10-28 16:08 ` Thomas Petazzoni
@ 2014-10-28 16:08   ` Thomas Petazzoni
  -1 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: Mark Brown, Liam Girdwood, alsa-devel, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Gregory Clement
  Cc: Lior Amsalem, Thomas Petazzoni, Tawfik Bayouk, Nadav Haklai,
	Ezequiel Garcia, linux-arm-kernel

Now that the Armada 370 DB audio complex is represented fully in
Device Tree using the simple-card DT binding, this commit updates
mvebu_v7_defconfig to no longer select the Armada 370 DB audio machine
driver, and instead select the appropriate audio controller and codec
drivers.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/configs/mvebu_v7_defconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig
index ed0a0d1..ba43804 100644
--- a/arch/arm/configs/mvebu_v7_defconfig
+++ b/arch/arm/configs/mvebu_v7_defconfig
@@ -85,7 +85,9 @@ CONFIG_SOUND=y
 CONFIG_SND=y
 CONFIG_SND_SOC=y
 CONFIG_SND_KIRKWOOD_SOC=y
-CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB=y
+CONFIG_SND_SOC_CS42L51_I2C=y
+CONFIG_SND_SOC_SPDIF=y
+CONFIG_SND_SIMPLE_CARD=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_MVEBU=y
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* [PATCH 6/6] ARM: mvebu: update mvebu_v7_defconfig for Armada 370 audio
@ 2014-10-28 16:08   ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 16:08 UTC (permalink / raw)
  To: linux-arm-kernel

Now that the Armada 370 DB audio complex is represented fully in
Device Tree using the simple-card DT binding, this commit updates
mvebu_v7_defconfig to no longer select the Armada 370 DB audio machine
driver, and instead select the appropriate audio controller and codec
drivers.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 arch/arm/configs/mvebu_v7_defconfig | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/configs/mvebu_v7_defconfig b/arch/arm/configs/mvebu_v7_defconfig
index ed0a0d1..ba43804 100644
--- a/arch/arm/configs/mvebu_v7_defconfig
+++ b/arch/arm/configs/mvebu_v7_defconfig
@@ -85,7 +85,9 @@ CONFIG_SOUND=y
 CONFIG_SND=y
 CONFIG_SND_SOC=y
 CONFIG_SND_KIRKWOOD_SOC=y
-CONFIG_SND_KIRKWOOD_SOC_ARMADA370_DB=y
+CONFIG_SND_SOC_CS42L51_I2C=y
+CONFIG_SND_SOC_SPDIF=y
+CONFIG_SND_SIMPLE_CARD=y
 CONFIG_USB=y
 CONFIG_USB_XHCI_HCD=y
 CONFIG_USB_XHCI_MVEBU=y
-- 
2.0.0

^ permalink raw reply related	[flat|nested] 38+ messages in thread

* Re: [PATCH 0/6] ASoC/ARM: move Marvell Armada 370 DB to simple-audio-card
  2014-10-28 16:08 ` Thomas Petazzoni
@ 2014-10-28 16:23   ` Andrew Lunn
  -1 siblings, 0 replies; 38+ messages in thread
From: Andrew Lunn @ 2014-10-28 16:23 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Jason Cooper,
	Tawfik Bayouk, Liam Girdwood, Nadav Haklai, Mark Brown,
	Ezequiel Garcia, Gregory Clement, linux-arm-kernel,
	Sebastian Hesselbarth

On Tue, Oct 28, 2014 at 05:08:38PM +0100, Thomas Petazzoni wrote:
> Hello,
> 
> This set of patches moves the Marvell Armada 370 DB audio complex
> description from a custom audio machine driver to the
> simple-audio-card DT binding.

Hi Thomas

All looks sensible, from the little i know about simple-audio-card.

Acked-by: Andrew Lunn <andrew@lunn.ch>

	  Andrew

> 
> The first three patches are meant to go through the ASoC tree, the
> last three patches are meant to go through the mvebu maintainers tree.
> 
> Quick description of the patches:
> 
>  - First patch fixes a small issue in the cs42l51 driver following its
>    split in two parts.
> 
>  - Second patch makes the cs42l51 user-selectable by adding a prompt
>    to its Kconfig option.
> 
>  - Third patch gets rid of the machine driver.
> 
>  - Fourth patch removes some now incorrect pin-muxing selection in the
>    Armada 370 DB platform.
> 
>  - Fifth patch actually switches to use the simple-audio-card DT
>    binding on Armada 370 DB.
> 
>  - Sixth patch updates mvebu_v7_defconfig to select the relevant
>    options to get audio to work.
> 
> Note: obviously, after PATCH 3 is applied, the audio will no longer
> work until PATCH 5 is applied. But since those patches will anyway go
> through different trees, it is a bit inevitable. And it is not
> dramatically important, since audio support on Armada 370 DB is
> already broken since the split of the CS42L51 driver.
> 
> Thanks,
> 
> Thomas
> 
> Thomas Petazzoni (6):
>   ASoC: cs42l51: re-add of_match_table pointer
>   ASoC: cs42l51: make driver user-selectable
>   ASoC: kirkwood: get rid of armada-370-db driver
>   ARM: mvebu: remove conflicting muxing on Armada 370 DB
>   ARM: mvebu: use simple-card DT binding for audio on Armada 370 DB
>   ARM: mvebu: update mvebu_v7_defconfig for Armada 370 audio
> 
>  arch/arm/boot/dts/armada-370-db.dts |  80 +++++++++++--------
>  arch/arm/boot/dts/armada-370.dtsi   |   1 +
>  arch/arm/configs/mvebu_v7_defconfig |   4 +-
>  sound/soc/codecs/Kconfig            |   2 +-
>  sound/soc/codecs/cs42l51-i2c.c      |   7 ++
>  sound/soc/codecs/cs42l51.c          |   5 --
>  sound/soc/kirkwood/Kconfig          |  13 +---
>  sound/soc/kirkwood/Makefile         |   4 -
>  sound/soc/kirkwood/armada-370-db.c  | 148 ------------------------------------
>  9 files changed, 63 insertions(+), 201 deletions(-)
>  delete mode 100644 sound/soc/kirkwood/armada-370-db.c
> 
> -- 
> 2.0.0
> 

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 0/6] ASoC/ARM: move Marvell Armada 370 DB to simple-audio-card
@ 2014-10-28 16:23   ` Andrew Lunn
  0 siblings, 0 replies; 38+ messages in thread
From: Andrew Lunn @ 2014-10-28 16:23 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 28, 2014 at 05:08:38PM +0100, Thomas Petazzoni wrote:
> Hello,
> 
> This set of patches moves the Marvell Armada 370 DB audio complex
> description from a custom audio machine driver to the
> simple-audio-card DT binding.

Hi Thomas

All looks sensible, from the little i know about simple-audio-card.

Acked-by: Andrew Lunn <andrew@lunn.ch>

	  Andrew

> 
> The first three patches are meant to go through the ASoC tree, the
> last three patches are meant to go through the mvebu maintainers tree.
> 
> Quick description of the patches:
> 
>  - First patch fixes a small issue in the cs42l51 driver following its
>    split in two parts.
> 
>  - Second patch makes the cs42l51 user-selectable by adding a prompt
>    to its Kconfig option.
> 
>  - Third patch gets rid of the machine driver.
> 
>  - Fourth patch removes some now incorrect pin-muxing selection in the
>    Armada 370 DB platform.
> 
>  - Fifth patch actually switches to use the simple-audio-card DT
>    binding on Armada 370 DB.
> 
>  - Sixth patch updates mvebu_v7_defconfig to select the relevant
>    options to get audio to work.
> 
> Note: obviously, after PATCH 3 is applied, the audio will no longer
> work until PATCH 5 is applied. But since those patches will anyway go
> through different trees, it is a bit inevitable. And it is not
> dramatically important, since audio support on Armada 370 DB is
> already broken since the split of the CS42L51 driver.
> 
> Thanks,
> 
> Thomas
> 
> Thomas Petazzoni (6):
>   ASoC: cs42l51: re-add of_match_table pointer
>   ASoC: cs42l51: make driver user-selectable
>   ASoC: kirkwood: get rid of armada-370-db driver
>   ARM: mvebu: remove conflicting muxing on Armada 370 DB
>   ARM: mvebu: use simple-card DT binding for audio on Armada 370 DB
>   ARM: mvebu: update mvebu_v7_defconfig for Armada 370 audio
> 
>  arch/arm/boot/dts/armada-370-db.dts |  80 +++++++++++--------
>  arch/arm/boot/dts/armada-370.dtsi   |   1 +
>  arch/arm/configs/mvebu_v7_defconfig |   4 +-
>  sound/soc/codecs/Kconfig            |   2 +-
>  sound/soc/codecs/cs42l51-i2c.c      |   7 ++
>  sound/soc/codecs/cs42l51.c          |   5 --
>  sound/soc/kirkwood/Kconfig          |  13 +---
>  sound/soc/kirkwood/Makefile         |   4 -
>  sound/soc/kirkwood/armada-370-db.c  | 148 ------------------------------------
>  9 files changed, 63 insertions(+), 201 deletions(-)
>  delete mode 100644 sound/soc/kirkwood/armada-370-db.c
> 
> -- 
> 2.0.0
> 

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 2/6] ASoC: cs42l51: make driver user-selectable
  2014-10-28 16:08   ` Thomas Petazzoni
@ 2014-10-28 19:50     ` Brian Austin
  -1 siblings, 0 replies; 38+ messages in thread
From: Brian Austin @ 2014-10-28 19:50 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Jason Cooper,
	Tawfik Bayouk, Brian Austin, Liam Girdwood, Nadav Haklai,
	Mark Brown, Arnaud Patard (Rtp),
	Ezequiel Garcia, Gregory Clement, linux-arm-kernel,
	Sebastian Hesselbarth

> the CS42L51 I2C codec driver user-selectable.
> 
> Cc: Brian Austin <brian.austin@cirrus.com>
> Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  sound/soc/codecs/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index a68d173..f4fb12f 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -336,7 +336,7 @@ config SND_SOC_CS42L51
>  	tristate
>  
>  config SND_SOC_CS42L51_I2C
> -	tristate
> +	tristate "Cirrus Logic CS42L51 CODEC (I2C)"
>  	select SND_SOC_CS42L51
>  
>  config SND_SOC_CS42L52
> -- 
> 2.0.0
> 

Thanks,

Acked-by: Brian Austin <brian.austin@cirrus.com>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 2/6] ASoC: cs42l51: make driver user-selectable
@ 2014-10-28 19:50     ` Brian Austin
  0 siblings, 0 replies; 38+ messages in thread
From: Brian Austin @ 2014-10-28 19:50 UTC (permalink / raw)
  To: linux-arm-kernel

> the CS42L51 I2C codec driver user-selectable.
> 
> Cc: Brian Austin <brian.austin@cirrus.com>
> Cc: Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  sound/soc/codecs/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
> index a68d173..f4fb12f 100644
> --- a/sound/soc/codecs/Kconfig
> +++ b/sound/soc/codecs/Kconfig
> @@ -336,7 +336,7 @@ config SND_SOC_CS42L51
>  	tristate
>  
>  config SND_SOC_CS42L51_I2C
> -	tristate
> +	tristate "Cirrus Logic CS42L51 CODEC (I2C)"
>  	select SND_SOC_CS42L51
>  
>  config SND_SOC_CS42L52
> -- 
> 2.0.0
> 

Thanks,

Acked-by: Brian Austin <brian.austin@cirrus.com>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 1/6] ASoC: cs42l51: re-add of_match_table pointer
  2014-10-28 16:08   ` Thomas Petazzoni
@ 2014-10-28 20:09     ` Brian Austin
  -1 siblings, 0 replies; 38+ messages in thread
From: Brian Austin @ 2014-10-28 20:09 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Jason Cooper,
	Tawfik Bayouk, Brian Austin, Liam Girdwood, stable, Nadav Haklai,
	Mark Brown, Arnaud Patard (Rtp),
	Ezequiel Garcia, Gregory Clement, linux-arm-kernel,
	Sebastian Hesselbarth

On Tue, 28 Oct 2014, Thomas Petazzoni wrote:

>  #include "cs42l51.h"
>  
> +static const struct of_device_id cs42l51_of_match[] = {
> +	{ .compatible = "cirrus,cs42l51", },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, cs42l51_of_match);
> +

Can't this be exported in the codec driver instead of removed?
It seems like it would be duplication for a multi-bus codec to have 
to add it in the bus driver.
For example if/when we add SPI this would have to be duplicated there as 
well right?  And then if we have I2C/SPI/Slimbus/Wireless/etc we would 
have this in all those files.

I believe that is how the cs42xx8 is handled. I will have to check.

Thanks,
Brian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 1/6] ASoC: cs42l51: re-add of_match_table pointer
@ 2014-10-28 20:09     ` Brian Austin
  0 siblings, 0 replies; 38+ messages in thread
From: Brian Austin @ 2014-10-28 20:09 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, 28 Oct 2014, Thomas Petazzoni wrote:

>  #include "cs42l51.h"
>  
> +static const struct of_device_id cs42l51_of_match[] = {
> +	{ .compatible = "cirrus,cs42l51", },
> +	{ }
> +};
> +MODULE_DEVICE_TABLE(of, cs42l51_of_match);
> +

Can't this be exported in the codec driver instead of removed?
It seems like it would be duplication for a multi-bus codec to have 
to add it in the bus driver.
For example if/when we add SPI this would have to be duplicated there as 
well right?  And then if we have I2C/SPI/Slimbus/Wireless/etc we would 
have this in all those files.

I believe that is how the cs42xx8 is handled. I will have to check.

Thanks,
Brian

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 2/6] ASoC: cs42l51: make driver user-selectable
  2014-10-28 16:08   ` Thomas Petazzoni
@ 2014-10-28 22:34     ` Mark Brown
  -1 siblings, 0 replies; 38+ messages in thread
From: Mark Brown @ 2014-10-28 22:34 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Jason Cooper,
	Tawfik Bayouk, Brian Austin, Liam Girdwood, Nadav Haklai,
	Arnaud Patard (Rtp),
	Ezequiel Garcia, Gregory Clement, linux-arm-kernel,
	Sebastian Hesselbarth


[-- Attachment #1.1: Type: text/plain, Size: 223 bytes --]

On Tue, Oct 28, 2014 at 05:08:40PM +0100, Thomas Petazzoni wrote:
> Since we are removing the Armada 370 DB audio machine driver to use
> the 'simple-card' Device Tree binding, we can no longer select the

Applied, thanks.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 2/6] ASoC: cs42l51: make driver user-selectable
@ 2014-10-28 22:34     ` Mark Brown
  0 siblings, 0 replies; 38+ messages in thread
From: Mark Brown @ 2014-10-28 22:34 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 28, 2014 at 05:08:40PM +0100, Thomas Petazzoni wrote:
> Since we are removing the Armada 370 DB audio machine driver to use
> the 'simple-card' Device Tree binding, we can no longer select the

Applied, thanks.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141028/8895bb11/attachment-0001.sig>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
  2014-10-28 16:08   ` Thomas Petazzoni
@ 2014-10-28 22:35     ` Mark Brown
  -1 siblings, 0 replies; 38+ messages in thread
From: Mark Brown @ 2014-10-28 22:35 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Jason Cooper,
	Tawfik Bayouk, Liam Girdwood, Nadav Haklai, Ezequiel Garcia,
	Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth


[-- Attachment #1.1: Type: text/plain, Size: 316 bytes --]

On Tue, Oct 28, 2014 at 05:08:41PM +0100, Thomas Petazzoni wrote:
> Now that the Armada 370 DB audio complex is fully described in the
> Device Tree using the simple-card DT binding, the armada-370-db audio
> machine driver can be removed.

This is just removing support for the old binding which is
incompatible...

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
@ 2014-10-28 22:35     ` Mark Brown
  0 siblings, 0 replies; 38+ messages in thread
From: Mark Brown @ 2014-10-28 22:35 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 28, 2014 at 05:08:41PM +0100, Thomas Petazzoni wrote:
> Now that the Armada 370 DB audio complex is fully described in the
> Device Tree using the simple-card DT binding, the armada-370-db audio
> machine driver can be removed.

This is just removing support for the old binding which is
incompatible...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141028/05eecdf4/attachment.sig>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
  2014-10-28 22:35     ` Mark Brown
@ 2014-10-28 22:54       ` Thomas Petazzoni
  -1 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 22:54 UTC (permalink / raw)
  To: Mark Brown
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Jason Cooper,
	Tawfik Bayouk, Liam Girdwood, Nadav Haklai, Ezequiel Garcia,
	Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth

Dear Mark Brown,

On Tue, 28 Oct 2014 22:35:21 +0000, Mark Brown wrote:
> On Tue, Oct 28, 2014 at 05:08:41PM +0100, Thomas Petazzoni wrote:
> > Now that the Armada 370 DB audio complex is fully described in the
> > Device Tree using the simple-card DT binding, the armada-370-db audio
> > machine driver can be removed.
> 
> This is just removing support for the old binding which is
> incompatible...

Hum, I'm not sure to follow you here. In a subsequent patch, I change
the Armada 370 DB audio complex DT description to use the
simple-audio-card DT binding, which makes the Armada 370 DB audio
machine driver irrelevant.

Of course, this means that if someone uses an old Armada 370 DB Device
Tree with a new kernel, it will no longer. But I believe this is kind
of expected for this specific case: when we originally introduced the
Armada 370 DB audio support, we knew a proper DT binding to describe
sound complex was arriving, and therefore the Armada 370 DB audio
machine driver was only a temporary solution until the pure DT solution
was available.

Therefore, with the agreement of the mvebu maintainers, I'd like to be
allowed to break the DT backward compatibility here, and get rid of
this audio machine driver which would otherwise have no users left.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
@ 2014-10-28 22:54       ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-28 22:54 UTC (permalink / raw)
  To: linux-arm-kernel

Dear Mark Brown,

On Tue, 28 Oct 2014 22:35:21 +0000, Mark Brown wrote:
> On Tue, Oct 28, 2014 at 05:08:41PM +0100, Thomas Petazzoni wrote:
> > Now that the Armada 370 DB audio complex is fully described in the
> > Device Tree using the simple-card DT binding, the armada-370-db audio
> > machine driver can be removed.
> 
> This is just removing support for the old binding which is
> incompatible...

Hum, I'm not sure to follow you here. In a subsequent patch, I change
the Armada 370 DB audio complex DT description to use the
simple-audio-card DT binding, which makes the Armada 370 DB audio
machine driver irrelevant.

Of course, this means that if someone uses an old Armada 370 DB Device
Tree with a new kernel, it will no longer. But I believe this is kind
of expected for this specific case: when we originally introduced the
Armada 370 DB audio support, we knew a proper DT binding to describe
sound complex was arriving, and therefore the Armada 370 DB audio
machine driver was only a temporary solution until the pure DT solution
was available.

Therefore, with the agreement of the mvebu maintainers, I'd like to be
allowed to break the DT backward compatibility here, and get rid of
this audio machine driver which would otherwise have no users left.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
  2014-10-28 22:54       ` Thomas Petazzoni
@ 2014-10-28 23:07         ` Mark Brown
  -1 siblings, 0 replies; 38+ messages in thread
From: Mark Brown @ 2014-10-28 23:07 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Jason Cooper,
	Tawfik Bayouk, Liam Girdwood, Nadav Haklai, Ezequiel Garcia,
	Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth


[-- Attachment #1.1: Type: text/plain, Size: 1885 bytes --]

On Tue, Oct 28, 2014 at 11:54:56PM +0100, Thomas Petazzoni wrote:
> On Tue, 28 Oct 2014 22:35:21 +0000, Mark Brown wrote:

> > This is just removing support for the old binding which is
> > incompatible...

> Hum, I'm not sure to follow you here. In a subsequent patch, I change
> the Armada 370 DB audio complex DT description to use the
> simple-audio-card DT binding, which makes the Armada 370 DB audio
> machine driver irrelevant.

> Of course, this means that if someone uses an old Armada 370 DB Device
> Tree with a new kernel, it will no longer. But I believe this is kind

Yes, this is the entire point of device tree as an ABI.  We also need to
care about out of tree users.

> of expected for this specific case: when we originally introduced the
> Armada 370 DB audio support, we knew a proper DT binding to describe
> sound complex was arriving, and therefore the Armada 370 DB audio
> machine driver was only a temporary solution until the pure DT solution
> was available.

No, that's not the case - these drivers predate DT IIRC and while it's
good to avoid adding new drivers there's nothing inherently bad about
having a machine driver or adaption layer into simple card (you could do
this just as platform data for simple card for many devices).

In this particular case I'm especially worried since we've got the whole
thing with not having a good story for supporting simulataneous use of
the S/PDIF and I2S links worked out yet on the controller side and on
the simple-card side it's pretty much just the most basic CPUs that are
supported.

> Therefore, with the agreement of the mvebu maintainers, I'd like to be
> allowed to break the DT backward compatibility here, and get rid of
> this audio machine driver which would otherwise have no users left.

...in mainline.  Doesn't this hardware tend to have lots of small
variants on the design floating around?

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
@ 2014-10-28 23:07         ` Mark Brown
  0 siblings, 0 replies; 38+ messages in thread
From: Mark Brown @ 2014-10-28 23:07 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 28, 2014 at 11:54:56PM +0100, Thomas Petazzoni wrote:
> On Tue, 28 Oct 2014 22:35:21 +0000, Mark Brown wrote:

> > This is just removing support for the old binding which is
> > incompatible...

> Hum, I'm not sure to follow you here. In a subsequent patch, I change
> the Armada 370 DB audio complex DT description to use the
> simple-audio-card DT binding, which makes the Armada 370 DB audio
> machine driver irrelevant.

> Of course, this means that if someone uses an old Armada 370 DB Device
> Tree with a new kernel, it will no longer. But I believe this is kind

Yes, this is the entire point of device tree as an ABI.  We also need to
care about out of tree users.

> of expected for this specific case: when we originally introduced the
> Armada 370 DB audio support, we knew a proper DT binding to describe
> sound complex was arriving, and therefore the Armada 370 DB audio
> machine driver was only a temporary solution until the pure DT solution
> was available.

No, that's not the case - these drivers predate DT IIRC and while it's
good to avoid adding new drivers there's nothing inherently bad about
having a machine driver or adaption layer into simple card (you could do
this just as platform data for simple card for many devices).

In this particular case I'm especially worried since we've got the whole
thing with not having a good story for supporting simulataneous use of
the S/PDIF and I2S links worked out yet on the controller side and on
the simple-card side it's pretty much just the most basic CPUs that are
supported.

> Therefore, with the agreement of the mvebu maintainers, I'd like to be
> allowed to break the DT backward compatibility here, and get rid of
> this audio machine driver which would otherwise have no users left.

...in mainline.  Doesn't this hardware tend to have lots of small
variants on the design floating around?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141028/e8b39ce7/attachment.sig>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
  2014-10-28 23:07         ` Mark Brown
@ 2014-10-29  8:24           ` Thomas Petazzoni
  -1 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-29  8:24 UTC (permalink / raw)
  To: Mark Brown
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Jason Cooper,
	Tawfik Bayouk, Liam Girdwood, Nadav Haklai, Ezequiel Garcia,
	Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth

Mark,

On Tue, 28 Oct 2014 23:07:40 +0000, Mark Brown wrote:

> > Hum, I'm not sure to follow you here. In a subsequent patch, I change
> > the Armada 370 DB audio complex DT description to use the
> > simple-audio-card DT binding, which makes the Armada 370 DB audio
> > machine driver irrelevant.
> 
> > Of course, this means that if someone uses an old Armada 370 DB Device
> > Tree with a new kernel, it will no longer. But I believe this is kind
> 
> Yes, this is the entire point of device tree as an ABI.  We also need to
> care about out of tree users.

Right, but I believe it has been discussed multiple times that when a
subsystem doesn't yet have the proper generic DT bindings and that
temporary solutions are used, we are allowed to break the compatibility
when moving to the proper generic DT bindings.

Another example is a platform moving from clocks defined in the platform
code to clocks defined in the Device Tree and using the common clock
framework. Should we keep around the code defining the clocks in the
platform code forever, just because old Device Tree didn't carry the
clock description?

> > of expected for this specific case: when we originally introduced the
> > Armada 370 DB audio support, we knew a proper DT binding to describe
> > sound complex was arriving, and therefore the Armada 370 DB audio
> > machine driver was only a temporary solution until the pure DT solution
> > was available.
> 
> No, that's not the case - these drivers predate DT IIRC and while it's

No, the armada-370-db driver does not predate DT. The mach-mvebu
platforms started to be supported in kernel 3.6, in full DT mode from
the beginning. The armada-370-db audio machine driver was added in
3.15, and is *only* used for the Marvell Armada 370 DB platform, which
is only described in DT.

In addition, the Marvell Armada 370 DB board is an internal evaluation
board that is not publicly available. So the rules in terms of DT
backward compatibility should I believe be a bit relaxed for such
platforms.

> good to avoid adding new drivers there's nothing inherently bad about
> having a machine driver or adaption layer into simple card (you could do
> this just as platform data for simple card for many devices).

I'm sorry but I don't understand what you mean: the simple card DT
binding is completely sufficient, in its current state, to describe the
audio complex of the Armada 370 DB.

> In this particular case I'm especially worried since we've got the whole
> thing with not having a good story for supporting simulataneous use of
> the S/PDIF and I2S links worked out yet on the controller side and on
> the simple-card side it's pretty much just the most basic CPUs that are
> supported.

I agree that the simple card binding may not be sufficient for all
situations, but in the case of this platform, it is sufficient. The
audio data gets sent simultaneously to the codec and the S/PDIF
transceiver, with no way of enabling or disabling those outputs
independently. So I believe the simple card DT binding is good enough
for this case.

> > Therefore, with the agreement of the mvebu maintainers, I'd like to be
> > allowed to break the DT backward compatibility here, and get rid of
> > this audio machine driver which would otherwise have no users left.
> 
> ...in mainline.  Doesn't this hardware tend to have lots of small
> variants on the design floating around?

Again, the armada-370-db driver is a *board* specific driver, that
works just and only for the Armada 370 DB board. Other boards may have
a different codec, maybe no S/PDIF transceivers, etc. So any "variant"
on the design would anyway have to use a different driver.

All that being said, if you really want to keep the armada-370-db audio
machine driver around that's fine with me. It's going to be just an
unused piece of code and therefore a piece of code that will probably
be broken in the near future, but I'm not the ASoC maintainer, so it's
your call.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
@ 2014-10-29  8:24           ` Thomas Petazzoni
  0 siblings, 0 replies; 38+ messages in thread
From: Thomas Petazzoni @ 2014-10-29  8:24 UTC (permalink / raw)
  To: linux-arm-kernel

Mark,

On Tue, 28 Oct 2014 23:07:40 +0000, Mark Brown wrote:

> > Hum, I'm not sure to follow you here. In a subsequent patch, I change
> > the Armada 370 DB audio complex DT description to use the
> > simple-audio-card DT binding, which makes the Armada 370 DB audio
> > machine driver irrelevant.
> 
> > Of course, this means that if someone uses an old Armada 370 DB Device
> > Tree with a new kernel, it will no longer. But I believe this is kind
> 
> Yes, this is the entire point of device tree as an ABI.  We also need to
> care about out of tree users.

Right, but I believe it has been discussed multiple times that when a
subsystem doesn't yet have the proper generic DT bindings and that
temporary solutions are used, we are allowed to break the compatibility
when moving to the proper generic DT bindings.

Another example is a platform moving from clocks defined in the platform
code to clocks defined in the Device Tree and using the common clock
framework. Should we keep around the code defining the clocks in the
platform code forever, just because old Device Tree didn't carry the
clock description?

> > of expected for this specific case: when we originally introduced the
> > Armada 370 DB audio support, we knew a proper DT binding to describe
> > sound complex was arriving, and therefore the Armada 370 DB audio
> > machine driver was only a temporary solution until the pure DT solution
> > was available.
> 
> No, that's not the case - these drivers predate DT IIRC and while it's

No, the armada-370-db driver does not predate DT. The mach-mvebu
platforms started to be supported in kernel 3.6, in full DT mode from
the beginning. The armada-370-db audio machine driver was added in
3.15, and is *only* used for the Marvell Armada 370 DB platform, which
is only described in DT.

In addition, the Marvell Armada 370 DB board is an internal evaluation
board that is not publicly available. So the rules in terms of DT
backward compatibility should I believe be a bit relaxed for such
platforms.

> good to avoid adding new drivers there's nothing inherently bad about
> having a machine driver or adaption layer into simple card (you could do
> this just as platform data for simple card for many devices).

I'm sorry but I don't understand what you mean: the simple card DT
binding is completely sufficient, in its current state, to describe the
audio complex of the Armada 370 DB.

> In this particular case I'm especially worried since we've got the whole
> thing with not having a good story for supporting simulataneous use of
> the S/PDIF and I2S links worked out yet on the controller side and on
> the simple-card side it's pretty much just the most basic CPUs that are
> supported.

I agree that the simple card binding may not be sufficient for all
situations, but in the case of this platform, it is sufficient. The
audio data gets sent simultaneously to the codec and the S/PDIF
transceiver, with no way of enabling or disabling those outputs
independently. So I believe the simple card DT binding is good enough
for this case.

> > Therefore, with the agreement of the mvebu maintainers, I'd like to be
> > allowed to break the DT backward compatibility here, and get rid of
> > this audio machine driver which would otherwise have no users left.
> 
> ...in mainline.  Doesn't this hardware tend to have lots of small
> variants on the design floating around?

Again, the armada-370-db driver is a *board* specific driver, that
works just and only for the Armada 370 DB board. Other boards may have
a different codec, maybe no S/PDIF transceivers, etc. So any "variant"
on the design would anyway have to use a different driver.

All that being said, if you really want to keep the armada-370-db audio
machine driver around that's fine with me. It's going to be just an
unused piece of code and therefore a piece of code that will probably
be broken in the near future, but I'm not the ASoC maintainer, so it's
your call.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
  2014-10-29  8:24           ` Thomas Petazzoni
@ 2014-10-29 10:56             ` Mark Brown
  -1 siblings, 0 replies; 38+ messages in thread
From: Mark Brown @ 2014-10-29 10:56 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Jason Cooper,
	Tawfik Bayouk, Liam Girdwood, Nadav Haklai, Ezequiel Garcia,
	Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth


[-- Attachment #1.1: Type: text/plain, Size: 3372 bytes --]

On Wed, Oct 29, 2014 at 09:24:19AM +0100, Thomas Petazzoni wrote:
> On Tue, 28 Oct 2014 23:07:40 +0000, Mark Brown wrote:

> > Yes, this is the entire point of device tree as an ABI.  We also need to
> > care about out of tree users.

> Right, but I believe it has been discussed multiple times that when a
> subsystem doesn't yet have the proper generic DT bindings and that
> temporary solutions are used, we are allowed to break the compatibility
> when moving to the proper generic DT bindings.

*sigh*  As has been discussed *repeatedly* audio system integration is
itself frequently intersting hardware and "proper" "generic" bindings
are not a useful goal for a large class of systems, we need to apply
some taste in describing things in DT - it's the same problem we've got
with people just constantly dumping Linux implementation details into
DT really.

> > good to avoid adding new drivers there's nothing inherently bad about
> > having a machine driver or adaption layer into simple card (you could do
> > this just as platform data for simple card for many devices).

> I'm sorry but I don't understand what you mean: the simple card DT
> binding is completely sufficient, in its current state, to describe the
> audio complex of the Armada 370 DB.

That's nice but like I just said that still doesn't mean that there's
anything inherently bad about a machine driver.

> In addition, the Marvell Armada 370 DB board is an internal evaluation
> board that is not publicly available. So the rules in terms of DT
> backward compatibility should I believe be a bit relaxed for such
> platforms.

Which you're absolutely sure will never have been used as a reference
design or otherwise cloned?  The board you have might not be widely
available but that doesn't mean other people aren't using boards with a
similar design.

> > In this particular case I'm especially worried since we've got the whole
> > thing with not having a good story for supporting simulataneous use of
> > the S/PDIF and I2S links worked out yet on the controller side and on
> > the simple-card side it's pretty much just the most basic CPUs that are
> > supported.

> I agree that the simple card binding may not be sufficient for all
> situations, but in the case of this platform, it is sufficient. The
> audio data gets sent simultaneously to the codec and the S/PDIF
> transceiver, with no way of enabling or disabling those outputs
> independently. So I believe the simple card DT binding is good enough
> for this case.

You're looking at the current driver implementation, there are actually
separate enable bits for I2S and S/PDIF in the hardware.

> All that being said, if you really want to keep the armada-370-db audio
> machine driver around that's fine with me. It's going to be just an
> unused piece of code and therefore a piece of code that will probably
> be broken in the near future, but I'm not the ASoC maintainer, so it's
> your call.

What I'm seeing is a patch that just totally ignores DT compatibility,
there is no reference to ABI stability in the changelog and no effort to
maintain it in the code.  If you're sending patches like that you should
expect them not to be applied, DT stability is something we're trying to
maintian.  Patches breaking compatibility need to both justify the
benefits of the break and explain why this isn't going to hurt users.

[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver
@ 2014-10-29 10:56             ` Mark Brown
  0 siblings, 0 replies; 38+ messages in thread
From: Mark Brown @ 2014-10-29 10:56 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 29, 2014 at 09:24:19AM +0100, Thomas Petazzoni wrote:
> On Tue, 28 Oct 2014 23:07:40 +0000, Mark Brown wrote:

> > Yes, this is the entire point of device tree as an ABI.  We also need to
> > care about out of tree users.

> Right, but I believe it has been discussed multiple times that when a
> subsystem doesn't yet have the proper generic DT bindings and that
> temporary solutions are used, we are allowed to break the compatibility
> when moving to the proper generic DT bindings.

*sigh*  As has been discussed *repeatedly* audio system integration is
itself frequently intersting hardware and "proper" "generic" bindings
are not a useful goal for a large class of systems, we need to apply
some taste in describing things in DT - it's the same problem we've got
with people just constantly dumping Linux implementation details into
DT really.

> > good to avoid adding new drivers there's nothing inherently bad about
> > having a machine driver or adaption layer into simple card (you could do
> > this just as platform data for simple card for many devices).

> I'm sorry but I don't understand what you mean: the simple card DT
> binding is completely sufficient, in its current state, to describe the
> audio complex of the Armada 370 DB.

That's nice but like I just said that still doesn't mean that there's
anything inherently bad about a machine driver.

> In addition, the Marvell Armada 370 DB board is an internal evaluation
> board that is not publicly available. So the rules in terms of DT
> backward compatibility should I believe be a bit relaxed for such
> platforms.

Which you're absolutely sure will never have been used as a reference
design or otherwise cloned?  The board you have might not be widely
available but that doesn't mean other people aren't using boards with a
similar design.

> > In this particular case I'm especially worried since we've got the whole
> > thing with not having a good story for supporting simulataneous use of
> > the S/PDIF and I2S links worked out yet on the controller side and on
> > the simple-card side it's pretty much just the most basic CPUs that are
> > supported.

> I agree that the simple card binding may not be sufficient for all
> situations, but in the case of this platform, it is sufficient. The
> audio data gets sent simultaneously to the codec and the S/PDIF
> transceiver, with no way of enabling or disabling those outputs
> independently. So I believe the simple card DT binding is good enough
> for this case.

You're looking at the current driver implementation, there are actually
separate enable bits for I2S and S/PDIF in the hardware.

> All that being said, if you really want to keep the armada-370-db audio
> machine driver around that's fine with me. It's going to be just an
> unused piece of code and therefore a piece of code that will probably
> be broken in the near future, but I'm not the ASoC maintainer, so it's
> your call.

What I'm seeing is a patch that just totally ignores DT compatibility,
there is no reference to ABI stability in the changelog and no effort to
maintain it in the code.  If you're sending patches like that you should
expect them not to be applied, DT stability is something we're trying to
maintian.  Patches breaking compatibility need to both justify the
benefits of the break and explain why this isn't going to hurt users.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141029/4c51bc68/attachment.sig>

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 4/6] ARM: mvebu: remove conflicting muxing on Armada 370 DB
  2014-10-28 16:08   ` Thomas Petazzoni
@ 2014-11-07  3:15     ` Jason Cooper
  -1 siblings, 0 replies; 38+ messages in thread
From: Jason Cooper @ 2014-11-07  3:15 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Tawfik Bayouk,
	Liam Girdwood, Nadav Haklai, Mark Brown, Ezequiel Garcia,
	Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth

On Tue, Oct 28, 2014 at 05:08:42PM +0100, Thomas Petazzoni wrote:
> Back when audio was enabled, the muxing of some MPP pins was causing
> problems. However, since commit fea038ed55ae ("ARM: mvebu: Add proper
> pin muxing on the Armada 370 DB board"), those problematic MPP pins
> have been assigned a proper muxing for the Ethernet interfaces. This
> proper muxing is now conflicting with the hog pins muxing that had
> been added as part of 249f3822509b ("ARM: mvebu: add audio support to
> Armada 370 DB").
> 
> Therefore, this commit simply removes the hog pins muxing, which
> solves a warning a boot time due to the conflicting muxing
> requirements.
> 
> Fixes: fea038ed55ae ("ARM: mvebu: Add proper pin muxing on the Armada 370 DB board")
> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  arch/arm/boot/dts/armada-370-db.dts | 24 ------------------------
>  1 file changed, 24 deletions(-)

Patches 5 and 6 applied to mvebu/dt with Andrew's Ack.

I didn't Cc this one to stable since it is only removing a warning.
Later on, if needed, someone can request it be backported and the Fixes
tag will assist with that.

thx,

Jason.

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 4/6] ARM: mvebu: remove conflicting muxing on Armada 370 DB
@ 2014-11-07  3:15     ` Jason Cooper
  0 siblings, 0 replies; 38+ messages in thread
From: Jason Cooper @ 2014-11-07  3:15 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 28, 2014 at 05:08:42PM +0100, Thomas Petazzoni wrote:
> Back when audio was enabled, the muxing of some MPP pins was causing
> problems. However, since commit fea038ed55ae ("ARM: mvebu: Add proper
> pin muxing on the Armada 370 DB board"), those problematic MPP pins
> have been assigned a proper muxing for the Ethernet interfaces. This
> proper muxing is now conflicting with the hog pins muxing that had
> been added as part of 249f3822509b ("ARM: mvebu: add audio support to
> Armada 370 DB").
> 
> Therefore, this commit simply removes the hog pins muxing, which
> solves a warning a boot time due to the conflicting muxing
> requirements.
> 
> Fixes: fea038ed55ae ("ARM: mvebu: Add proper pin muxing on the Armada 370 DB board")
> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  arch/arm/boot/dts/armada-370-db.dts | 24 ------------------------
>  1 file changed, 24 deletions(-)

Patches 5 and 6 applied to mvebu/dt with Andrew's Ack.

I didn't Cc this one to stable since it is only removing a warning.
Later on, if needed, someone can request it be backported and the Fixes
tag will assist with that.

thx,

Jason.

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 6/6] ARM: mvebu: update mvebu_v7_defconfig for Armada 370 audio
  2014-10-28 16:08   ` Thomas Petazzoni
@ 2014-11-07  3:17     ` Jason Cooper
  -1 siblings, 0 replies; 38+ messages in thread
From: Jason Cooper @ 2014-11-07  3:17 UTC (permalink / raw)
  To: Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Tawfik Bayouk,
	Liam Girdwood, Nadav Haklai, Mark Brown, Ezequiel Garcia,
	Gregory Clement, linux-arm-kernel, Sebastian Hesselbarth

On Tue, Oct 28, 2014 at 05:08:44PM +0100, Thomas Petazzoni wrote:
> Now that the Armada 370 DB audio complex is represented fully in
> Device Tree using the simple-card DT binding, this commit updates
> mvebu_v7_defconfig to no longer select the Armada 370 DB audio machine
> driver, and instead select the appropriate audio controller and codec
> drivers.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  arch/arm/configs/mvebu_v7_defconfig | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied to mvebu/defconfig with Andrew's Ack.

thx,

Jason.

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 6/6] ARM: mvebu: update mvebu_v7_defconfig for Armada 370 audio
@ 2014-11-07  3:17     ` Jason Cooper
  0 siblings, 0 replies; 38+ messages in thread
From: Jason Cooper @ 2014-11-07  3:17 UTC (permalink / raw)
  To: linux-arm-kernel

On Tue, Oct 28, 2014 at 05:08:44PM +0100, Thomas Petazzoni wrote:
> Now that the Armada 370 DB audio complex is represented fully in
> Device Tree using the simple-card DT binding, this commit updates
> mvebu_v7_defconfig to no longer select the Armada 370 DB audio machine
> driver, and instead select the appropriate audio controller and codec
> drivers.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  arch/arm/configs/mvebu_v7_defconfig | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

Applied to mvebu/defconfig with Andrew's Ack.

thx,

Jason.

^ permalink raw reply	[flat|nested] 38+ messages in thread

* Re: [PATCH 4/6] ARM: mvebu: remove conflicting muxing on Armada 370 DB
  2014-11-07  3:15     ` Jason Cooper
@ 2014-12-18 18:13       ` Gregory CLEMENT
  -1 siblings, 0 replies; 38+ messages in thread
From: Gregory CLEMENT @ 2014-12-18 18:13 UTC (permalink / raw)
  To: Jason Cooper, Thomas Petazzoni
  Cc: Lior Amsalem, Andrew Lunn, alsa-devel, Tawfik Bayouk,
	Liam Girdwood, Nadav Haklai, Mark Brown, Ezequiel Garcia,
	linux-arm-kernel, Sebastian Hesselbarth

Hi Jason,

On 07/11/2014 04:15, Jason Cooper wrote:
> On Tue, Oct 28, 2014 at 05:08:42PM +0100, Thomas Petazzoni wrote:
>> Back when audio was enabled, the muxing of some MPP pins was causing
>> problems. However, since commit fea038ed55ae ("ARM: mvebu: Add proper
>> pin muxing on the Armada 370 DB board"), those problematic MPP pins
>> have been assigned a proper muxing for the Ethernet interfaces. This
>> proper muxing is now conflicting with the hog pins muxing that had
>> been added as part of 249f3822509b ("ARM: mvebu: add audio support to
>> Armada 370 DB").
>>
>> Therefore, this commit simply removes the hog pins muxing, which
>> solves a warning a boot time due to the conflicting muxing
>> requirements.
>>
>> Fixes: fea038ed55ae ("ARM: mvebu: Add proper pin muxing on the Armada 370 DB board")
>> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
>> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> ---
>>  arch/arm/boot/dts/armada-370-db.dts | 24 ------------------------
>>  1 file changed, 24 deletions(-)
> 
> Patches 5 and 6 applied to mvebu/dt with Andrew's Ack.
> 
> I didn't Cc this one to stable since it is only removing a warning.

Actually it didn't just remove a warning. As explained with the patch
I sent yesterday: "[PATCH] ARM: mvebu: Fix pinctrl configuration for
Armada 370 DB", it also allows to use the first Ethernet Giga port on
the Armada 370 DB board.

> Later on, if needed, someone can request it be backported and the Fixes
> tag will assist with that.

Thanks for you offer and indeed I am not sure on how to do it, so your
help will be appreciate :)

I thought that I could forward to stable the patch sent by Thomas. I also thought
that adding the commit id used in linus tree and why we need it should be enough. Am
I right?

For 3.18 it seemed doable, but the bug on the Ethernet port was
introduced by the commit 49f3822509b74f8c8d0731aeb7ccea065376c9b ("ARM:
mvebu: add audio support to Armada 370 DB" in 3.14.")

So this patch won't be enough we also need the one sent by Ezequiel:
fea038ed55ae ("ARM: mvebu: Add proper pin muxing on the Armada 370 DB
board"). Then in this case I would have to add the line:

Cc: <stable@vger.kernel.org> # 3.14.x: fea038ed55ae ARM: mvebu: Add
proper pin muxing on the Armada 370 DB board


Thanks,

Gregory


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 38+ messages in thread

* [PATCH 4/6] ARM: mvebu: remove conflicting muxing on Armada 370 DB
@ 2014-12-18 18:13       ` Gregory CLEMENT
  0 siblings, 0 replies; 38+ messages in thread
From: Gregory CLEMENT @ 2014-12-18 18:13 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Jason,

On 07/11/2014 04:15, Jason Cooper wrote:
> On Tue, Oct 28, 2014 at 05:08:42PM +0100, Thomas Petazzoni wrote:
>> Back when audio was enabled, the muxing of some MPP pins was causing
>> problems. However, since commit fea038ed55ae ("ARM: mvebu: Add proper
>> pin muxing on the Armada 370 DB board"), those problematic MPP pins
>> have been assigned a proper muxing for the Ethernet interfaces. This
>> proper muxing is now conflicting with the hog pins muxing that had
>> been added as part of 249f3822509b ("ARM: mvebu: add audio support to
>> Armada 370 DB").
>>
>> Therefore, this commit simply removes the hog pins muxing, which
>> solves a warning a boot time due to the conflicting muxing
>> requirements.
>>
>> Fixes: fea038ed55ae ("ARM: mvebu: Add proper pin muxing on the Armada 370 DB board")
>> Cc: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
>> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
>> ---
>>  arch/arm/boot/dts/armada-370-db.dts | 24 ------------------------
>>  1 file changed, 24 deletions(-)
> 
> Patches 5 and 6 applied to mvebu/dt with Andrew's Ack.
> 
> I didn't Cc this one to stable since it is only removing a warning.

Actually it didn't just remove a warning. As explained with the patch
I sent yesterday: "[PATCH] ARM: mvebu: Fix pinctrl configuration for
Armada 370 DB", it also allows to use the first Ethernet Giga port on
the Armada 370 DB board.

> Later on, if needed, someone can request it be backported and the Fixes
> tag will assist with that.

Thanks for you offer and indeed I am not sure on how to do it, so your
help will be appreciate :)

I thought that I could forward to stable the patch sent by Thomas. I also thought
that adding the commit id used in linus tree and why we need it should be enough. Am
I right?

For 3.18 it seemed doable, but the bug on the Ethernet port was
introduced by the commit 49f3822509b74f8c8d0731aeb7ccea065376c9b ("ARM:
mvebu: add audio support to Armada 370 DB" in 3.14.")

So this patch won't be enough we also need the one sent by Ezequiel:
fea038ed55ae ("ARM: mvebu: Add proper pin muxing on the Armada 370 DB
board"). Then in this case I would have to add the line:

Cc: <stable@vger.kernel.org> # 3.14.x: fea038ed55ae ARM: mvebu: Add
proper pin muxing on the Armada 370 DB board


Thanks,

Gregory


-- 
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

^ permalink raw reply	[flat|nested] 38+ messages in thread

end of thread, other threads:[~2014-12-18 18:13 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-28 16:08 [PATCH 0/6] ASoC/ARM: move Marvell Armada 370 DB to simple-audio-card Thomas Petazzoni
2014-10-28 16:08 ` Thomas Petazzoni
2014-10-28 16:08 ` [PATCH 1/6] ASoC: cs42l51: re-add of_match_table pointer Thomas Petazzoni
2014-10-28 16:08   ` Thomas Petazzoni
2014-10-28 20:09   ` Brian Austin
2014-10-28 20:09     ` Brian Austin
2014-10-28 16:08 ` [PATCH 2/6] ASoC: cs42l51: make driver user-selectable Thomas Petazzoni
2014-10-28 16:08   ` Thomas Petazzoni
2014-10-28 19:50   ` Brian Austin
2014-10-28 19:50     ` Brian Austin
2014-10-28 22:34   ` Mark Brown
2014-10-28 22:34     ` Mark Brown
2014-10-28 16:08 ` [PATCH 3/6] ASoC: kirkwood: get rid of armada-370-db driver Thomas Petazzoni
2014-10-28 16:08   ` Thomas Petazzoni
2014-10-28 22:35   ` Mark Brown
2014-10-28 22:35     ` Mark Brown
2014-10-28 22:54     ` Thomas Petazzoni
2014-10-28 22:54       ` Thomas Petazzoni
2014-10-28 23:07       ` Mark Brown
2014-10-28 23:07         ` Mark Brown
2014-10-29  8:24         ` Thomas Petazzoni
2014-10-29  8:24           ` Thomas Petazzoni
2014-10-29 10:56           ` Mark Brown
2014-10-29 10:56             ` Mark Brown
2014-10-28 16:08 ` [PATCH 4/6] ARM: mvebu: remove conflicting muxing on Armada 370 DB Thomas Petazzoni
2014-10-28 16:08   ` Thomas Petazzoni
2014-11-07  3:15   ` Jason Cooper
2014-11-07  3:15     ` Jason Cooper
2014-12-18 18:13     ` Gregory CLEMENT
2014-12-18 18:13       ` Gregory CLEMENT
2014-10-28 16:08 ` [PATCH 5/6] ARM: mvebu: use simple-card DT binding for audio " Thomas Petazzoni
2014-10-28 16:08   ` Thomas Petazzoni
2014-10-28 16:08 ` [PATCH 6/6] ARM: mvebu: update mvebu_v7_defconfig for Armada 370 audio Thomas Petazzoni
2014-10-28 16:08   ` Thomas Petazzoni
2014-11-07  3:17   ` Jason Cooper
2014-11-07  3:17     ` Jason Cooper
2014-10-28 16:23 ` [PATCH 0/6] ASoC/ARM: move Marvell Armada 370 DB to simple-audio-card Andrew Lunn
2014-10-28 16:23   ` Andrew Lunn

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.