Skip to contentSkip to conversation

ASoC: omap-mcpdm: Add device tree bindings

PATCH In review Peter Ujfalusi 2 participants 2 messages May 8, 2012 – May 12, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ASoC: omap-mcpdm: Add device tree bindings

Device tree support for OMAP4+ McPDM cpu dai driver.

---
 .../devicetree/bindings/sound/omap-mcpdm.txt       |   17 +++++++++++++++++
 sound/soc/omap/omap-mcpdm.c                        |    8 ++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/sound/omap-mcpdm.txt
Documentation/devicetree/bindings/sound/omap-mcpdm.txt new file +17 -0
new file mode 100644
index 0000000..58b0e31
@@ -0,0 +1,17 @@
+* Texas Instruments OMAP4+ McPDM
+
+Required properties:
+- compatible: "ti,omap4-mcpdm"
+- ti,hwmods: Name of the hwmod associated to the McPDM
+
+Example:
+
+mcpdm: mcpdm@40132000 {
+	compatible = "ti,omap4-mcpdm";
+	ti,hwmods = "mcpdm";
+};
+
+sound { /* ASoC machine dirver */
+	...
+	dai-link,dai = <&mcpdm>;
+};
sound/soc/omap/omap-mcpdm.c +8 -0
index 3970556..59d47ab 100644
@@ -33,6 +33,7 @@
 #include <linux/irq.h>
 #include <linux/slab.h>
 #include <linux/pm_runtime.h>
+#include <linux/of_device.h>
 
 #include <sound/core.h>
 #include <sound/pcm.h>
@@ -507,10 +508,17 @@ static int __devexit asoc_mcpdm_remove(struct platform_device *pdev)
 	return 0;
 }
 
+static const struct of_device_id omap_mcpdm_of_match[] = {
+	{ .compatible = "ti,omap4-mcpdm", },
+	{ }
+};
+MODULE_DEVICE_TABLE(of, omap_mcpdm_of_match);
+
 static struct platform_driver asoc_mcpdm_driver = {
 	.driver = {
 		.name	= "omap-mcpdm",
 		.owner	= THIS_MODULE,
+		.of_match_table = omap_mcpdm_of_match,
 	},
 
 	.probe	= asoc_mcpdm_probe,
Signature · 1 line
1.7.8.6
Acked-by on v1 1/1
#1 lore raw
Quoted 1 line · Peter Ujfalusi

Device tree support for OMAP4+ McPDM cpu dai driver.

I'm still not at all happy about the use of hwmod with no regs or anything but