summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs
diff options
context:
space:
mode:
authorPaul Cercueil <paul@crapouillou.net>2019-02-07 10:31:41 -0300
committerMark Brown <broonie@kernel.org>2019-02-07 14:38:25 +0000
commit030a79e97730976f54299634fa3bbb7a99e32b71 (patch)
tree1645ba3541d763d61f1ebb1dc3efcbbf73adf862 /sound/soc/codecs
parent06a334ae98d15c3e32ae4ef8ce18a241a12f3dff (diff)
downloadlinux-030a79e97730976f54299634fa3bbb7a99e32b71.tar.bz2
ASoC: codecs: jz4740: Add support for devicetree
Add support for probing the driver from devicetree. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs')
-rw-r--r--sound/soc/codecs/jz4740.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sound/soc/codecs/jz4740.c b/sound/soc/codecs/jz4740.c
index 9b3e1227a971..974e17fa1911 100644
--- a/sound/soc/codecs/jz4740.c
+++ b/sound/soc/codecs/jz4740.c
@@ -346,10 +346,19 @@ static int jz4740_codec_probe(struct platform_device *pdev)
return ret;
}
+#ifdef CONFIG_OF
+static const struct of_device_id jz4740_codec_of_matches[] = {
+ { .compatible = "ingenic,jz4740-codec", },
+ { }
+};
+MODULE_DEVICE_TABLE(of, jz4740_codec_of_matches);
+#endif
+
static struct platform_driver jz4740_codec_driver = {
.probe = jz4740_codec_probe,
.driver = {
.name = "jz4740-codec",
+ .of_match_table = of_match_ptr(jz4740_codec_of_matches),
},
};