diff options
author | Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> | 2015-02-03 05:55:59 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-02-04 16:12:48 -0500 |
commit | f2610571fd82417f44825f3b705fd651e3788ceb (patch) | |
tree | 40ed44f79014d6f49bac4d59582e532bb276cebe /sound | |
parent | 6fb4aebee9d128f1c61c3bc9e6a0132b12ab563c (diff) |
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')
-rw-r--r-- | sound/soc/jz4740/jz4740-i2s.c | 10 |
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 @@ | |||
14 | 14 | ||
15 | #include <linux/init.h> | 15 | #include <linux/init.h> |
16 | #include <linux/io.h> | 16 | #include <linux/io.h> |
17 | #include <linux/of.h> | ||
18 | #include <linux/of_device.h> | ||
17 | #include <linux/kernel.h> | 19 | #include <linux/kernel.h> |
18 | #include <linux/module.h> | 20 | #include <linux/module.h> |
19 | #include <linux/platform_device.h> | 21 | #include <linux/platform_device.h> |
@@ -424,6 +426,13 @@ static const struct snd_soc_component_driver jz4740_i2s_component = { | |||
424 | .name = "jz4740-i2s", | 426 | .name = "jz4740-i2s", |
425 | }; | 427 | }; |
426 | 428 | ||
429 | #ifdef CONFIG_OF | ||
430 | static const struct of_device_id jz4740_of_matches[] = { | ||
431 | { .compatible = "ingenic,jz4740-i2s" }, | ||
432 | { /* sentinel */ } | ||
433 | }; | ||
434 | #endif | ||
435 | |||
427 | static int jz4740_i2s_dev_probe(struct platform_device *pdev) | 436 | static int jz4740_i2s_dev_probe(struct platform_device *pdev) |
428 | { | 437 | { |
429 | struct jz4740_i2s *i2s; | 438 | struct jz4740_i2s *i2s; |
@@ -464,6 +473,7 @@ static struct platform_driver jz4740_i2s_driver = { | |||
464 | .probe = jz4740_i2s_dev_probe, | 473 | .probe = jz4740_i2s_dev_probe, |
465 | .driver = { | 474 | .driver = { |
466 | .name = "jz4740-i2s", | 475 | .name = "jz4740-i2s", |
476 | .of_match_table = of_match_ptr(jz4740_of_matches) | ||
467 | }, | 477 | }, |
468 | }; | 478 | }; |
469 | 479 | ||