summaryrefslogtreecommitdiff
path: root/sound/soc/jz4740
diff options
context:
space:
mode:
authorZubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>2015-02-03 13:55:59 +0300
committerMark Brown <broonie@kernel.org>2015-02-05 00:12:48 +0300
commitf2610571fd82417f44825f3b705fd651e3788ceb (patch)
tree40ed44f79014d6f49bac4d59582e532bb276cebe /sound/soc/jz4740
parent6fb4aebee9d128f1c61c3bc9e6a0132b12ab563c (diff)
downloadlinux-f2610571fd82417f44825f3b705fd651e3788ceb.tar.xz
ASoC: jz4740: Add DT support to jz4740-i2s driver
This patch adds device tree support for the jz4740 driver. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> Acked-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/jz4740')
-rw-r--r--sound/soc/jz4740/jz4740-i2s.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c
index b7a7e8295d3c..07f77815a586 100644
--- a/sound/soc/jz4740/jz4740-i2s.c
+++ b/sound/soc/jz4740/jz4740-i2s.c
@@ -14,6 +14,8 @@
#include <linux/init.h>
#include <linux/io.h>
+#include <linux/of.h>
+#include <linux/of_device.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
@@ -424,6 +426,13 @@ static const struct snd_soc_component_driver jz4740_i2s_component = {
.name = "jz4740-i2s",
};
+#ifdef CONFIG_OF
+static const struct of_device_id jz4740_of_matches[] = {
+ { .compatible = "ingenic,jz4740-i2s" },
+ { /* sentinel */ }
+};
+#endif
+
static int jz4740_i2s_dev_probe(struct platform_device *pdev)
{
struct jz4740_i2s *i2s;
@@ -464,6 +473,7 @@ static struct platform_driver jz4740_i2s_driver = {
.probe = jz4740_i2s_dev_probe,
.driver = {
.name = "jz4740-i2s",
+ .of_match_table = of_match_ptr(jz4740_of_matches)
},
};