[alsa-devel] [PATCH v2 1/6] dt-bindings: sound: Document jz4740-codec bindings

Add documentation about how to probe the jz4740-codec driver from devicetree.
Signed-off-by: Paul Cercueil paul@crapouillou.net ---
Changes:
v2: No change
.../bindings/sound/ingenic,jz4740-codec.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/ingenic,jz4740-codec.txt
diff --git a/Documentation/devicetree/bindings/sound/ingenic,jz4740-codec.txt b/Documentation/devicetree/bindings/sound/ingenic,jz4740-codec.txt new file mode 100644 index 000000000000..1ffcade87e7b --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ingenic,jz4740-codec.txt @@ -0,0 +1,20 @@ +Ingenic JZ4740 codec controller + +Required properties: +- compatible : "ingenic,jz4740-codec" +- reg : codec registers location and length +- clocks : phandle to the AIC clock. +- clock-names: must be set to "aic". +- #sound-dai-cells: Must be set to 0. + +Example: + +codec: audio-codec@10020080 { + compatible = "ingenic,jz4740-codec"; + reg = <0x10020080 0x8>; + + #sound-dai-cells = <0>; + + clocks = <&cgu JZ4740_CLK_AIC>; + clock-names = "aic"; +};

Add documentation about how to probe the jz4725b-codec driver from devicetree.
Signed-off-by: Paul Cercueil paul@crapouillou.net ---
Changes:
v2: No change
.../bindings/sound/ingenic,jz4725b-codec.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/ingenic,jz4725b-codec.txt
diff --git a/Documentation/devicetree/bindings/sound/ingenic,jz4725b-codec.txt b/Documentation/devicetree/bindings/sound/ingenic,jz4725b-codec.txt new file mode 100644 index 000000000000..05adc0d47b13 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/ingenic,jz4725b-codec.txt @@ -0,0 +1,20 @@ +Ingenic JZ4725B codec controller + +Required properties: +- compatible : "ingenic,jz4725b-codec" +- reg : codec registers location and length +- clocks : phandle to the AIC clock. +- clock-names: must be set to "aic". +- #sound-dai-cells: Must be set to 0. + +Example: + +codec: audio-codec@100200a4 { + compatible = "ingenic,jz4725b-codec"; + reg = <0x100200a4 0x8>; + + #sound-dai-cells = <0>; + + clocks = <&cgu JZ4725B_CLK_AIC>; + clock-names = "aic"; +};

Add license information as a standard SPDX license notifier instead of custom text.
Signed-off-by: Paul Cercueil paul@crapouillou.net ---
Changes:
v2: Use C++ style comment
sound/soc/codecs/jz4740.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c index 9395b583432c..9b3e1227a971 100644 --- a/sound/soc/codecs/jz4740.c +++ b/sound/soc/codecs/jz4740.c @@ -1,15 +1,8 @@ -/* - * Copyright (C) 2009-2010, Lars-Peter Clausen lars@metafoo.de - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ +// SPDX-License-Identifier: GPL-2.0 +// +// JZ4740 CODEC driver +// +// Copyright (C) 2009-2010, Lars-Peter Clausen lars@metafoo.de
#include <linux/kernel.h> #include <linux/module.h>

The patch
ASoC: codecs: jz4740: Use SPDX license notifier
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From 06a334ae98d15c3e32ae4ef8ce18a241a12f3dff Mon Sep 17 00:00:00 2001
From: Paul Cercueil paul@crapouillou.net Date: Thu, 7 Feb 2019 10:31:40 -0300 Subject: [PATCH] ASoC: codecs: jz4740: Use SPDX license notifier
Add license information as a standard SPDX license notifier instead of custom text.
Signed-off-by: Paul Cercueil paul@crapouillou.net Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/jz4740.c | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c index 9395b583432c..9b3e1227a971 100644 --- a/sound/soc/codecs/jz4740.c +++ b/sound/soc/codecs/jz4740.c @@ -1,15 +1,8 @@ -/* - * Copyright (C) 2009-2010, Lars-Peter Clausen lars@metafoo.de - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 675 Mass Ave, Cambridge, MA 02139, USA. - * - */ +// SPDX-License-Identifier: GPL-2.0 +// +// JZ4740 CODEC driver +// +// Copyright (C) 2009-2010, Lars-Peter Clausen lars@metafoo.de
#include <linux/kernel.h> #include <linux/module.h>

Add support for probing the driver from devicetree.
Signed-off-by: Paul Cercueil paul@crapouillou.net ---
Changes:
v2: No change
sound/soc/codecs/jz4740.c | 9 +++++++++ 1 file changed, 9 insertions(+)
diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c index 9b3e1227a971..974e17fa1911 100644 --- a/sound/soc/codecs/jz4740.c +++ b/sound/soc/codecs/jz4740.c @@ -346,10 +346,19 @@ static int jz4740_codec_probe(struct platform_device *pdev) return ret; }
+#ifdef CONFIG_OF +static const struct of_device_id jz4740_codec_of_matches[] = { + { .compatible = "ingenic,jz4740-codec", }, + { } +}; +MODULE_DEVICE_TABLE(of, jz4740_codec_of_matches); +#endif + static struct platform_driver jz4740_codec_driver = { .probe = jz4740_codec_probe, .driver = { .name = "jz4740-codec", + .of_match_table = of_match_ptr(jz4740_codec_of_matches), }, };

Show the knob to enable or disable the jz4740-codec driver, add a proper description, and add a dependency on MIPS || COMPILE_TEST, as this driver is only useful on MIPS.
Signed-off-by: Paul Cercueil paul@crapouillou.net ---
Changes:
v2: No change
sound/soc/codecs/Kconfig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index fec894c725d3..e6ce18c21b98 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -579,8 +579,15 @@ config SND_SOC_CX20442 depends on TTY
config SND_SOC_JZ4740_CODEC + depends on MIPS || COMPILE_TEST select REGMAP_MMIO - tristate + tristate "Ingenic JZ4740 internal CODEC" + help + Enable support for the internal CODEC found in the JZ4740 SoC + from Ingenic. + + This driver can also be built as a module. If so, the module + will be called snd-soc-jz4740-codec.
config SND_SOC_JZ4725B_CODEC depends on MIPS || COMPILE_TEST

The patch
ASoC: codecs: Kconfig: Show knob, and depend on MIPS || COMPILE_TEST
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From edcd3ed182f804ebec71b063bab32c424ddd8b6a Mon Sep 17 00:00:00 2001
From: Paul Cercueil paul@crapouillou.net Date: Thu, 7 Feb 2019 10:31:42 -0300 Subject: [PATCH] ASoC: codecs: Kconfig: Show knob, and depend on MIPS || COMPILE_TEST
Show the knob to enable or disable the jz4740-codec driver, add a proper description, and add a dependency on MIPS || COMPILE_TEST, as this driver is only useful on MIPS.
Signed-off-by: Paul Cercueil paul@crapouillou.net Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/Kconfig | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig index fec894c725d3..e6ce18c21b98 100644 --- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -579,8 +579,15 @@ config SND_SOC_CX20442 depends on TTY
config SND_SOC_JZ4740_CODEC + depends on MIPS || COMPILE_TEST select REGMAP_MMIO - tristate + tristate "Ingenic JZ4740 internal CODEC" + help + Enable support for the internal CODEC found in the JZ4740 SoC + from Ingenic. + + This driver can also be built as a module. If so, the module + will be called snd-soc-jz4740-codec.
config SND_SOC_JZ4725B_CODEC depends on MIPS || COMPILE_TEST

Change the header comment to use C++ style, so that it looks more consistent with the rest of ASoC.
Signed-off-by: Paul Cercueil paul@crapouillou.net ---
Changes:
v2: New patch
sound/soc/codecs/jz4725b.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/jz4725b.c b/sound/soc/codecs/jz4725b.c index 24b1b23b99c9..103ccbc5d55c 100644 --- a/sound/soc/codecs/jz4725b.c +++ b/sound/soc/codecs/jz4725b.c @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 -/* - * JZ4725B CODEC driver - * - * Copyright (C) 2019, Paul Cercueil paul@crapouillou.net - */ +// +// JZ4725B CODEC driver +// +// Copyright (C) 2019, Paul Cercueil paul@crapouillou.net
#include <linux/kernel.h> #include <linux/module.h>

The patch
ASoC: codecs: jz4725b: Use C++ style comments in header
has been applied to the asoc tree at
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks, Mark
From a50e32694fbcdbf55875095258b9398e2eabd71f Mon Sep 17 00:00:00 2001
From: Paul Cercueil paul@crapouillou.net Date: Thu, 7 Feb 2019 10:31:43 -0300 Subject: [PATCH] ASoC: codecs: jz4725b: Use C++ style comments in header
Change the header comment to use C++ style, so that it looks more consistent with the rest of ASoC.
Signed-off-by: Paul Cercueil paul@crapouillou.net Signed-off-by: Mark Brown broonie@kernel.org --- sound/soc/codecs/jz4725b.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/sound/soc/codecs/jz4725b.c b/sound/soc/codecs/jz4725b.c index 24b1b23b99c9..103ccbc5d55c 100644 --- a/sound/soc/codecs/jz4725b.c +++ b/sound/soc/codecs/jz4725b.c @@ -1,9 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 -/* - * JZ4725B CODEC driver - * - * Copyright (C) 2019, Paul Cercueil paul@crapouillou.net - */ +// +// JZ4725B CODEC driver +// +// Copyright (C) 2019, Paul Cercueil paul@crapouillou.net
#include <linux/kernel.h> #include <linux/module.h>

On Thu, Feb 07, 2019 at 10:31:38AM -0300, Paul Cercueil wrote:
Add documentation about how to probe the jz4740-codec driver from devicetree.
Please do not submit new versions of already applied patches, please submit incremental updates to the existing code. Modifying existing commits creates problems for other users building on top of those commits so it's best practice to only change pubished git commits if absolutely essential.

Hi Mark,
On Thu, Feb 7, 2019 at 11:00 AM, Mark Brown broonie@kernel.org wrote:
On Thu, Feb 07, 2019 at 10:31:38AM -0300, Paul Cercueil wrote:
Add documentation about how to probe the jz4740-codec driver from devicetree.
Please do not submit new versions of already applied patches, please submit incremental updates to the existing code. Modifying existing commits creates problems for other users building on top of those commits so it's best practice to only change pubished git commits if absolutely essential.
Well you only applied patch 6/6, didn't you? I only see this one in your tree.
-Paul
participants (2)
-
Mark Brown
-
Paul Cercueil