From: Daniel Mack <zonque@gmail.com>
To: alsa-devel@alsa-project.org
Cc: Timur Tabi <timur@freescale.com>,
broonie@opensource.wolfsonmicro.com, lrg@ti.com,
Daniel Mack <zonque@gmail.com>
Subject: [PATCH 1/2] ALSA: ASoC: add DT bindings for cs4270
Date: Tue, 24 Jul 2012 22:20:47 +0200 [thread overview]
Message-ID: <1343161248-27557-1-git-send-email-zonque@gmail.com> (raw)
Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Timur Tabi <timur@freescale.com>
---
Documentation/devicetree/bindings/sound/cs4270.txt | 16 ++++++++++++++++
sound/soc/codecs/cs4270.c | 11 +++++++++++
2 files changed, 27 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/cs4270.txt
diff --git a/Documentation/devicetree/bindings/sound/cs4270.txt b/Documentation/devicetree/bindings/sound/cs4270.txt
new file mode 100644
index 0000000..7f0bfd8
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/cs4270.txt
@@ -0,0 +1,16 @@
+CS4270 audio CODEC
+
+The driver for this device currently only supports I2C.
+
+Required properties:
+
+ - compatible : "cirrus,cs4270"
+
+ - reg : the I2C address of the device for I2C
+
+Example:
+
+codec: cs4270@48 {
+ compatible = "cirrus,cs4270";
+ reg = <0x48>;
+};
diff --git a/sound/soc/codecs/cs4270.c b/sound/soc/codecs/cs4270.c
index 047917f..4b71b01 100644
--- a/sound/soc/codecs/cs4270.c
+++ b/sound/soc/codecs/cs4270.c
@@ -29,6 +29,7 @@
#include <linux/i2c.h>
#include <linux/delay.h>
#include <linux/regulator/consumer.h>
+#include <linux/of_device.h>
/*
* The codec isn't really big-endian or little-endian, since the I2S
@@ -639,6 +640,15 @@ static const struct snd_soc_codec_driver soc_codec_device_cs4270 = {
.reg_cache_default = cs4270_default_reg_cache,
};
+/*
+ * cs4270_of_match - the device tree bindings
+ */
+static const struct of_device_id cs4270_of_match[] = {
+ { .compatible = "cirrus,cs4270", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, cs4270_of_match);
+
/**
* cs4270_i2c_probe - initialize the I2C interface of the CS4270
* @i2c_client: the I2C client object
@@ -718,6 +728,7 @@ static struct i2c_driver cs4270_i2c_driver = {
.driver = {
.name = "cs4270",
.owner = THIS_MODULE,
+ .of_match_table = cs4270_of_match,
},
.id_table = cs4270_id,
.probe = cs4270_i2c_probe,
--
1.7.10.4
next reply other threads:[~2012-07-24 20:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-24 20:20 Daniel Mack [this message]
2012-07-24 20:20 ` [PATCH 2/2] ALSA: ASoC: Add reset-gpio DT property to cs4270 driver Daniel Mack
2012-07-24 20:22 ` [PATCH 1/2] ALSA: ASoC: add DT bindings for cs4270 Timur Tabi
2012-07-24 20:26 ` Daniel Mack
2012-07-24 20:30 ` Timur Tabi
2012-07-24 20:32 ` Daniel Mack
2012-07-24 20:39 ` Timur Tabi
2012-07-24 20:53 ` Daniel Mack
2012-07-24 21:01 ` Timur Tabi
2012-07-25 6:19 ` Daniel Mack
2012-07-24 22:01 ` Stephen Warren
2012-07-24 22:02 ` Timur Tabi
2012-07-24 22:42 ` Mark Brown
2012-07-24 22:41 ` Mark Brown
2012-07-24 22:00 ` Stephen Warren
2012-07-24 22:03 ` Timur Tabi
2012-07-24 22:44 ` Mark Brown
2012-07-25 6:12 ` Daniel Mack
2012-07-25 7:03 ` [PATCH 2/2 v2] ALSA: ASoC: Add reset-gpio DT property to cs4270 driver Daniel Mack
2012-07-25 13:18 ` Mark Brown
2012-07-25 13:22 ` Daniel Mack
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1343161248-27557-1-git-send-email-zonque@gmail.com \
--to=zonque@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@opensource.wolfsonmicro.com \
--cc=lrg@ti.com \
--cc=timur@freescale.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is 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.