devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] ASoC: Add devicetree support for spdif dummy codecs.
@ 2013-04-25 13:13 Marek Belisko
       [not found] ` <1366895594-19596-1-git-send-email-marek.belisko-6oiIBCxl0MMjD8S081q9vkEOCMrvLtNR@public.gmane.org>
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Marek Belisko @ 2013-04-25 13:13 UTC (permalink / raw)
  To: grant.likely, rob.herring, rob
  Cc: broonie, perex, tiwai, zonque, devicetree-discuss, linux-doc,
	linux-kernel, alsa-devel, Marek Belisko

changes from v1 (for patch 2 and 3):
- add prefix linux for compatible property (for both tx and rx)
- rename spdif_transceiver.c to spdif_transmitter.c
- add bindings documentation

Marek Belisko (3):
  ASoC: spdif_transceiver: Change driver filename to
    spdif_transmitter.c.
  ASoC: spdif_transmitter: Add DT support.
  ASoC: spdif_receiver: Add DT support.

 .../devicetree/bindings/sound/spdif-receiver.txt   |   10 ++++++++++
 .../bindings/sound/spdif-transmitter.txt           |   10 ++++++++++
 sound/soc/codecs/Makefile                          |    2 +-
 sound/soc/codecs/spdif_receiver.c                  |   10 ++++++++++
 .../{spdif_transciever.c => spdif_transmitter.c}   |   10 ++++++++++
 5 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/sound/spdif-receiver.txt
 create mode 100644 Documentation/devicetree/bindings/sound/spdif-transmitter.txt
 rename sound/soc/codecs/{spdif_transciever.c => spdif_transmitter.c} (88%)

-- 
1.7.9.5

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

* [PATCH v2 1/3] ASoC: spdif_transceiver: Change driver filename to spdif_transmitter.c.
       [not found] ` <1366895594-19596-1-git-send-email-marek.belisko-6oiIBCxl0MMjD8S081q9vkEOCMrvLtNR@public.gmane.org>
@ 2013-04-25 13:13   ` Marek Belisko
  0 siblings, 0 replies; 8+ messages in thread
From: Marek Belisko @ 2013-04-25 13:13 UTC (permalink / raw)
  To: grant.likely-s3s/WqlpOiPyB63q8FvJNQ,
	rob.herring-bsGFqQB8/DxBDgjK7y7TUQ, rob-VoJi6FS/r0vR7s880joybQ
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	linux-doc-u79uwXL29TY76Z2rM5mHXA, tiwai-l3A5Bk7waGM,
	devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, Marek Belisko, perex-/Fr2/VpizcU

Transceiver usually means receiver + transmitter. This codec can do only
transmit. Update driver accordingly.

Signed-off-by: Marek Belisko <marek.belisko-6oiIBCxl0MMjD8S081q9vkEOCMrvLtNR@public.gmane.org>
---
 sound/soc/codecs/Makefile                          |    2 +-
 .../{spdif_transciever.c => spdif_transmitter.c}   |    0
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename sound/soc/codecs/{spdif_transciever.c => spdif_transmitter.c} (100%)

diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index 8cf5951..4252c35 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -51,7 +51,7 @@ snd-soc-alc5632-objs := alc5632.o
 snd-soc-sigmadsp-objs := sigmadsp.o
 snd-soc-si476x-objs := si476x.o
 snd-soc-sn95031-objs := sn95031.o
-snd-soc-spdif-tx-objs := spdif_transciever.o
+snd-soc-spdif-tx-objs := spdif_transmitter.o
 snd-soc-spdif-rx-objs := spdif_receiver.o
 snd-soc-ssm2602-objs := ssm2602.o
 snd-soc-sta32x-objs := sta32x.o
diff --git a/sound/soc/codecs/spdif_transciever.c b/sound/soc/codecs/spdif_transmitter.c
similarity index 100%
rename from sound/soc/codecs/spdif_transciever.c
rename to sound/soc/codecs/spdif_transmitter.c
-- 
1.7.9.5

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

* [PATCH v2 2/3] ASoC: spdif_transmitter: Add DT support.
  2013-04-25 13:13 [PATCH v2 0/3] ASoC: Add devicetree support for spdif dummy codecs Marek Belisko
       [not found] ` <1366895594-19596-1-git-send-email-marek.belisko-6oiIBCxl0MMjD8S081q9vkEOCMrvLtNR@public.gmane.org>
@ 2013-04-25 13:13 ` Marek Belisko
  2013-04-26 19:24   ` Sebastian Hesselbarth
  2013-04-25 13:13 ` [PATCH v2 3/3] ASoC: spdif_receiver: " Marek Belisko
  2013-04-30 18:43 ` [PATCH v2 0/3] ASoC: Add devicetree support for spdif dummy codecs Mark Brown
  3 siblings, 1 reply; 8+ messages in thread
From: Marek Belisko @ 2013-04-25 13:13 UTC (permalink / raw)
  To: grant.likely, rob.herring, rob
  Cc: broonie, perex, tiwai, zonque, devicetree-discuss, linux-doc,
	linux-kernel, alsa-devel, Marek Belisko, Michal Bachraty

Add devicetree support for this dummy audio soc driver.

Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
Signed-off-by: Marek Belisko <marek.belisko@streamunlimited.com>
---
 .../bindings/sound/spdif-transmitter.txt           |   10 ++++++++++
 sound/soc/codecs/spdif_transmitter.c               |   10 ++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/spdif-transmitter.txt

diff --git a/Documentation/devicetree/bindings/sound/spdif-transmitter.txt b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt
new file mode 100644
index 0000000..55a8584
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt
@@ -0,0 +1,10 @@
+Device-Tree bindings for dummy spdif transmitter
+
+Required properties:
+	- compatible: should be "linux,spdif-dit".
+
+Example node:
+
+	codec: spdif-transmitter {
+		compatible = "linux,spdif-dit";
+	};
diff --git a/sound/soc/codecs/spdif_transmitter.c b/sound/soc/codecs/spdif_transmitter.c
index 112a49d..1828049 100644
--- a/sound/soc/codecs/spdif_transmitter.c
+++ b/sound/soc/codecs/spdif_transmitter.c
@@ -20,6 +20,7 @@
 #include <sound/soc.h>
 #include <sound/pcm.h>
 #include <sound/initval.h>
+#include <linux/of.h>
 
 #define DRV_NAME "spdif-dit"
 
@@ -52,12 +53,21 @@ static int spdif_dit_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id spdif_dit_dt_ids[] = {
+	{ .compatible = "linux,spdif-dit", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, spdif_dit_dt_ids);
+#endif
+
 static struct platform_driver spdif_dit_driver = {
 	.probe		= spdif_dit_probe,
 	.remove		= spdif_dit_remove,
 	.driver		= {
 		.name	= DRV_NAME,
 		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(spdif_dit_dt_ids),
 	},
 };
 
-- 
1.7.9.5

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

* [PATCH v2 3/3] ASoC: spdif_receiver: Add DT support.
  2013-04-25 13:13 [PATCH v2 0/3] ASoC: Add devicetree support for spdif dummy codecs Marek Belisko
       [not found] ` <1366895594-19596-1-git-send-email-marek.belisko-6oiIBCxl0MMjD8S081q9vkEOCMrvLtNR@public.gmane.org>
  2013-04-25 13:13 ` [PATCH v2 2/3] ASoC: spdif_transmitter: Add DT support Marek Belisko
@ 2013-04-25 13:13 ` Marek Belisko
  2013-04-30 18:43 ` [PATCH v2 0/3] ASoC: Add devicetree support for spdif dummy codecs Mark Brown
  3 siblings, 0 replies; 8+ messages in thread
From: Marek Belisko @ 2013-04-25 13:13 UTC (permalink / raw)
  To: grant.likely, rob.herring, rob
  Cc: broonie, perex, tiwai, zonque, devicetree-discuss, linux-doc,
	linux-kernel, alsa-devel, Marek Belisko, Michal Bachraty

Add devicetree support for this dummy audio soc driver.

Signed-off-by: Michal Bachraty <michal.bachraty@streamunlimited.com>
Signed-off-by: Marek Belisko <marek.belisko@streamunlimited.com>
---
 .../devicetree/bindings/sound/spdif-receiver.txt   |   10 ++++++++++
 sound/soc/codecs/spdif_receiver.c                  |   10 ++++++++++
 2 files changed, 20 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/spdif-receiver.txt

diff --git a/Documentation/devicetree/bindings/sound/spdif-receiver.txt b/Documentation/devicetree/bindings/sound/spdif-receiver.txt
new file mode 100644
index 0000000..80f807b
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/spdif-receiver.txt
@@ -0,0 +1,10 @@
+Device-Tree bindings for dummy spdif receiver
+
+Required properties:
+	- compatible: should be "linux,spdif-dir".
+
+Example node:
+
+	codec: spdif-receiver {
+		compatible = "linux,spdif-dir";
+	};
diff --git a/sound/soc/codecs/spdif_receiver.c b/sound/soc/codecs/spdif_receiver.c
index dd8d856..e9d7881 100644
--- a/sound/soc/codecs/spdif_receiver.c
+++ b/sound/soc/codecs/spdif_receiver.c
@@ -21,6 +21,7 @@
 #include <sound/soc.h>
 #include <sound/pcm.h>
 #include <sound/initval.h>
+#include <linux/of.h>
 
 #define STUB_RATES	SNDRV_PCM_RATE_8000_192000
 #define STUB_FORMATS	(SNDRV_PCM_FMTBIT_S16_LE | \
@@ -51,12 +52,21 @@ static int spdif_dir_remove(struct platform_device *pdev)
 	return 0;
 }
 
+#ifdef CONFIG_OF
+static const struct of_device_id spdif_dir_dt_ids[] = {
+	{ .compatible = "linux,spdif-dir", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, spdif_dir_dt_ids);
+#endif
+
 static struct platform_driver spdif_dir_driver = {
 	.probe		= spdif_dir_probe,
 	.remove		= spdif_dir_remove,
 	.driver		= {
 		.name	= "spdif-dir",
 		.owner	= THIS_MODULE,
+		.of_match_table = of_match_ptr(spdif_dir_dt_ids),
 	},
 };
 
-- 
1.7.9.5

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

* Re: [PATCH v2 2/3] ASoC: spdif_transmitter: Add DT support.
  2013-04-25 13:13 ` [PATCH v2 2/3] ASoC: spdif_transmitter: Add DT support Marek Belisko
@ 2013-04-26 19:24   ` Sebastian Hesselbarth
  2013-04-29 12:16     ` Marek Belisko
  0 siblings, 1 reply; 8+ messages in thread
From: Sebastian Hesselbarth @ 2013-04-26 19:24 UTC (permalink / raw)
  To: Marek Belisko
  Cc: grant.likely, rob.herring, rob, alsa-devel, Michal Bachraty,
	linux-doc, tiwai, devicetree-discuss, linux-kernel, broonie,
	Marek Belisko, perex

On 04/25/2013 03:13 PM, Marek Belisko wrote:
> Add devicetree support for this dummy audio soc driver.
>
> Signed-off-by: Michal Bachraty<michal.bachraty@streamunlimited.com>
> Signed-off-by: Marek Belisko<marek.belisko@streamunlimited.com>
> ---
>   .../bindings/sound/spdif-transmitter.txt           |   10 ++++++++++
>   sound/soc/codecs/spdif_transmitter.c               |   10 ++++++++++
>   2 files changed, 20 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/sound/spdif-transmitter.txt
>
> diff --git a/Documentation/devicetree/bindings/sound/spdif-transmitter.txt b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt
> new file mode 100644
> index 0000000..55a8584
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt
> @@ -0,0 +1,10 @@
> +Device-Tree bindings for dummy spdif transmitter
> +
> +Required properties:
> +	- compatible: should be "linux,spdif-dit".

Marek,

I remember Daniel commenting on the name already, but
what about "spdif-transmitter" and "spdif-receiver" respectively?
That is very generic and should allow to remove "linux," prefix.
And there is a lot of drivers using more informative compatible
strings compared to the driver name.

Sebastian

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

* Re: [PATCH v2 2/3] ASoC: spdif_transmitter: Add DT support.
  2013-04-26 19:24   ` Sebastian Hesselbarth
@ 2013-04-29 12:16     ` Marek Belisko
  2013-04-29 20:10       ` Mark Brown
  0 siblings, 1 reply; 8+ messages in thread
From: Marek Belisko @ 2013-04-29 12:16 UTC (permalink / raw)
  To: Sebastian Hesselbarth
  Cc: Marek Belisko, grant.likely, rob.herring, rob, alsa-devel,
	linux-doc, tiwai, devicetree-discuss, linux-kernel, broonie,
	perex

Dear Sebastian Hesselbarth,

On 04/26/2013 09:24 PM, Sebastian Hesselbarth wrote:
> On 04/25/2013 03:13 PM, Marek Belisko wrote:
>> Add devicetree support for this dummy audio soc driver.
>>
>> Signed-off-by: Michal Bachraty<michal.bachraty@streamunlimited.com>
>> Signed-off-by: Marek Belisko<marek.belisko@streamunlimited.com>
>> ---
>>   .../bindings/sound/spdif-transmitter.txt           |   10 ++++++++++
>>   sound/soc/codecs/spdif_transmitter.c               |   10 ++++++++++
>>   2 files changed, 20 insertions(+)
>>   create mode 100644
>> Documentation/devicetree/bindings/sound/spdif-transmitter.txt
>>
>> diff --git
>> a/Documentation/devicetree/bindings/sound/spdif-transmitter.txt
>> b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt
>> new file mode 100644
>> index 0000000..55a8584
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/sound/spdif-transmitter.txt
>> @@ -0,0 +1,10 @@
>> +Device-Tree bindings for dummy spdif transmitter
>> +
>> +Required properties:
>> +    - compatible: should be "linux,spdif-dit".
>
> Marek,
>
> I remember Daniel commenting on the name already, but
> what about "spdif-transmitter" and "spdif-receiver" respectively?
Agree.
> That is very generic and should allow to remove "linux," prefix.
Not sure if linux, prefix can be removed. I believe (at least what 
documentation said) is that <manufacturer>,<model> must be format for 
compatible.
> And there is a lot of drivers using more informative compatible
> strings compared to the driver name.
>
> Sebastian
>

Cheers,

	~marek
-- 
Marek Belisko

Software Developer
StreamUnlimited Engineering GmbH
Gutheil Schodergasse 8-12
A-1100 Vienna, Austria

Office: +421 267200087

e-mail: marek.belisko@streamunlimited.com
http://www.streamunlimited.com

Meet us at:

High End - Munich, 09 - 12 May, Hall 4/F05
IFA - Berlin, 6-11 September
CEDIA - Denver, 25-28 September

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

* Re: [PATCH v2 2/3] ASoC: spdif_transmitter: Add DT support.
  2013-04-29 12:16     ` Marek Belisko
@ 2013-04-29 20:10       ` Mark Brown
  0 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2013-04-29 20:10 UTC (permalink / raw)
  To: Marek Belisko
  Cc: alsa-devel, linux-doc, tiwai, Marek Belisko, devicetree-discuss,
	linux-kernel, rob.herring, grant.likely, rob,
	Sebastian Hesselbarth


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

On Mon, Apr 29, 2013 at 02:16:33PM +0200, Marek Belisko wrote:
> Dear Sebastian Hesselbarth,

> >That is very generic and should allow to remove "linux," prefix.

> Not sure if linux, prefix can be removed. I believe (at least what
> documentation said) is that <manufacturer>,<model> must be format
> for compatible.

Yeah, you're supposed to have some prefix.  I guess for stuff that we're
really happy is totally generic we could use "generic" or something but
it doesn't make much practical difference.

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

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



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

* Re: [PATCH v2 0/3] ASoC: Add devicetree support for spdif dummy codecs.
  2013-04-25 13:13 [PATCH v2 0/3] ASoC: Add devicetree support for spdif dummy codecs Marek Belisko
                   ` (2 preceding siblings ...)
  2013-04-25 13:13 ` [PATCH v2 3/3] ASoC: spdif_receiver: " Marek Belisko
@ 2013-04-30 18:43 ` Mark Brown
  3 siblings, 0 replies; 8+ messages in thread
From: Mark Brown @ 2013-04-30 18:43 UTC (permalink / raw)
  To: Marek Belisko
  Cc: grant.likely, rob.herring, rob, perex, tiwai, zonque,
	devicetree-discuss, linux-doc, linux-kernel, alsa-devel,
	Marek Belisko

[-- Attachment #1: Type: text/plain, Size: 275 bytes --]

On Thu, Apr 25, 2013 at 03:13:11PM +0200, Marek Belisko wrote:
> changes from v1 (for patch 2 and 3):
> - add prefix linux for compatible property (for both tx and rx)
> - rename spdif_transceiver.c to spdif_transmitter.c
> - add bindings documentation

Applied all, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

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

end of thread, other threads:[~2013-04-30 18:43 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-25 13:13 [PATCH v2 0/3] ASoC: Add devicetree support for spdif dummy codecs Marek Belisko
     [not found] ` <1366895594-19596-1-git-send-email-marek.belisko-6oiIBCxl0MMjD8S081q9vkEOCMrvLtNR@public.gmane.org>
2013-04-25 13:13   ` [PATCH v2 1/3] ASoC: spdif_transceiver: Change driver filename to spdif_transmitter.c Marek Belisko
2013-04-25 13:13 ` [PATCH v2 2/3] ASoC: spdif_transmitter: Add DT support Marek Belisko
2013-04-26 19:24   ` Sebastian Hesselbarth
2013-04-29 12:16     ` Marek Belisko
2013-04-29 20:10       ` Mark Brown
2013-04-25 13:13 ` [PATCH v2 3/3] ASoC: spdif_receiver: " Marek Belisko
2013-04-30 18:43 ` [PATCH v2 0/3] ASoC: Add devicetree support for spdif dummy codecs Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).