From: Zubair Lutfullah Kakakhel Date: Tue, 3 Feb 2015 10:55:59 +0000 (+0000) Subject: ASoC: jz4740: Add DT support to jz4740-i2s driver X-Git-Tag: v4.14-rc1~5985^2~13^2~6^5 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f2610571fd82417f44825f3b705fd651e3788ceb;p=platform%2Fkernel%2Flinux-rpi.git 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 Acked-by: Lars-Peter Clausen Signed-off-by: Mark Brown --- diff --git a/sound/soc/jz4740/jz4740-i2s.c b/sound/soc/jz4740/jz4740-i2s.c index b7a7e82..07f7781 100644 --- a/sound/soc/jz4740/jz4740-i2s.c +++ b/sound/soc/jz4740/jz4740-i2s.c @@ -14,6 +14,8 @@ #include #include +#include +#include #include #include #include @@ -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) }, };