summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Grzeschik <m.grzeschik@pengutronix.de>2013-06-28 17:56:42 +0200
committerMichael Grzeschik <m.grzeschik@pengutronix.de>2013-09-09 12:54:17 +0200
commit95c94eae1d31ead2e2d57f7efc456cd2617e12fe (patch)
tree9428efeb487f2652e7d6cf2e6f3af1b2778e1a0a
parentfe45b3b338c872e91691bf5ff3c0467329b08a66 (diff)
downloadlinux-95c94eae1d31ead2e2d57f7efc456cd2617e12fe.tar.gz
ASoC: imx-mc13783: make devicetree capable und use fsl,ssi
Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
-rw-r--r--sound/soc/fsl/imx-mc13783.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sound/soc/fsl/imx-mc13783.c b/sound/soc/fsl/imx-mc13783.c
index 9df173c..e555cd5 100644
--- a/sound/soc/fsl/imx-mc13783.c
+++ b/sound/soc/fsl/imx-mc13783.c
@@ -16,6 +16,7 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/device.h>
+#include <linux/of.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/soc.h>
@@ -102,8 +103,20 @@ static int imx_mc13783_probe(struct platform_device *pdev)
{
int ret;
+ struct device_node *ssi_np;
+
imx_mc13783.dev = &pdev->dev;
+ ssi_np = of_parse_phandle(pdev->dev.of_node, "fsl,ssi", 0);
+ if (ssi_np) {
+ imx_mc13783_dai_mc13783[0].cpu_of_node = ssi_np;
+ imx_mc13783_dai_mc13783[0].platform_of_node = ssi_np;
+ imx_mc13783_dai_mc13783[0].cpu_dai_name = NULL;
+ imx_mc13783_dai_mc13783[0].platform_name = NULL;
+ } else {
+ dev_err(&pdev->dev, "No valid ssi phandle found\n");
+ }
+
ret = snd_soc_register_card(&imx_mc13783);
if (ret) {
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
@@ -155,10 +168,17 @@ static int imx_mc13783_remove(struct platform_device *pdev)
return 0;
}
+static const struct of_device_id imx_mc13783_dt_ids[] = {
+ { .compatible = "fsl,imx-mc13783", },
+ { /* sentinel */ }
+};
+MODULE_DEVICE_TABLE(of, imx_mc13783_dt_ids);
+
static struct platform_driver imx_mc13783_audio_driver = {
.driver = {
.name = "imx_mc13783",
.owner = THIS_MODULE,
+ .of_match_table = imx_mc13783_dt_ids,
},
.probe = imx_mc13783_probe,
.remove = imx_mc13783_remove