From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 5 Jul 2013 02:42:49 +0000 (-0700)
Subject: ASoC: ak4554: add DT support
X-Git-Tag: firefly_0821_release~176^2~4889^2~176^2~56^2~1
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b25f77815021ec6e7400a82c4984b9c80699ce80;p=firefly-linux-kernel-4.4.55.git

ASoC: ak4554: add DT support

Support for loading the ak4554 codec module via devicetree.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
---

diff --git a/Documentation/devicetree/bindings/sound/ak4554.c b/Documentation/devicetree/bindings/sound/ak4554.c
new file mode 100644
index 000000000000..934fa02754b3
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/ak4554.c
@@ -0,0 +1,11 @@
+AK4554 ADC/DAC
+
+Required properties:
+
+  - compatible : "asahi-kasei,ak4554"
+
+Example:
+
+ak4554-adc-dac {
+	compatible = "asahi-kasei,ak4554";
+};
diff --git a/sound/soc/codecs/ak4554.c b/sound/soc/codecs/ak4554.c
index c1a1733f8a35..6aed9c4d06d6 100644
--- a/sound/soc/codecs/ak4554.c
+++ b/sound/soc/codecs/ak4554.c
@@ -64,10 +64,17 @@ static int ak4554_soc_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static struct of_device_id ak4554_of_match[] = {
+	{ .compatible = "asahi-kasei,ak4554" },
+	{},
+};
+MODULE_DEVICE_TABLE(of, ak4554_of_match);
+
 static struct platform_driver ak4554_driver = {
 	.driver = {
 		.name = "ak4554-adc-dac",
 		.owner = THIS_MODULE,
+		.of_match_table = ak4554_of_match,
 	},
 	.probe	= ak4554_soc_probe,
 	.remove	= ak4554_soc_remove,