Commit f2610571 authored by Zubair Lutfullah Kakakhel's avatar Zubair Lutfullah Kakakhel Committed by Mark Brown

ASoC: jz4740: Add DT support to jz4740-i2s driver

This patch adds device tree support for the jz4740 driver.
Signed-off-by: default avatarZubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
Acked-by: default avatarLars-Peter Clausen <lars@metafoo.de>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 6fb4aebe
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
...@@ -424,6 +426,13 @@ static const struct snd_soc_component_driver jz4740_i2s_component = { ...@@ -424,6 +426,13 @@ static const struct snd_soc_component_driver jz4740_i2s_component = {
.name = "jz4740-i2s", .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) static int jz4740_i2s_dev_probe(struct platform_device *pdev)
{ {
struct jz4740_i2s *i2s; struct jz4740_i2s *i2s;
...@@ -464,6 +473,7 @@ static struct platform_driver jz4740_i2s_driver = { ...@@ -464,6 +473,7 @@ static struct platform_driver jz4740_i2s_driver = {
.probe = jz4740_i2s_dev_probe, .probe = jz4740_i2s_dev_probe,
.driver = { .driver = {
.name = "jz4740-i2s", .name = "jz4740-i2s",
.of_match_table = of_match_ptr(jz4740_of_matches)
}, },
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment