[alsa-devel] [PATCH] ASoC: omap-dmic: Add device tree bindings
Device tree support for OMAP4+ dmic cpu dai driver.
Signed-off-by: Peter Ujfalusi peter.ujfalusi@ti.com --- .../devicetree/bindings/sound/omap-dmic.txt | 17 +++++++++++++++++ sound/soc/omap/omap-dmic.c | 8 ++++++++ 2 files changed, 25 insertions(+), 0 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/omap-dmic.txt
diff --git a/Documentation/devicetree/bindings/sound/omap-dmic.txt b/Documentation/devicetree/bindings/sound/omap-dmic.txt new file mode 100644 index 0000000..1d79e3f --- /dev/null +++ b/Documentation/devicetree/bindings/sound/omap-dmic.txt @@ -0,0 +1,17 @@ +* Texas Instruments OMAP4+ Digital Microphone Module + +Required properties: +- compatible: "ti,omap4-dmic" +- ti,hwmods: Name of the hwmod associated with OMAP dmic IP + +Example: + +dmic: dmic@4012e000 { + compatible = "ti,omap4-dmic"; + ti,hwmods = "dmic"; +}; + +sound { /* ASoC machine dirver */ + ... + dai-link,dai = <&dmic>; +}; diff --git a/sound/soc/omap/omap-dmic.c b/sound/soc/omap/omap-dmic.c index 4dcb5a7..75f5dca 100644 --- a/sound/soc/omap/omap-dmic.c +++ b/sound/soc/omap/omap-dmic.c @@ -32,6 +32,7 @@ #include <linux/io.h> #include <linux/slab.h> #include <linux/pm_runtime.h> +#include <linux/of_device.h> #include <plat/dma.h>
#include <sound/core.h> @@ -528,10 +529,17 @@ static int __devexit asoc_dmic_remove(struct platform_device *pdev) return 0; }
+static const struct of_device_id omap_dmic_of_match[] = { + { .compatible = "ti,omap4-dmic", }, + { } +}; +MODULE_DEVICE_TABLE(of, omap_dmic_of_match); + static struct platform_driver asoc_dmic_driver = { .driver = { .name = "omap-dmic", .owner = THIS_MODULE, + .of_match_table = omap_dmic_of_match, }, .probe = asoc_dmic_probe, .remove = __devexit_p(asoc_dmic_remove),
On Tue, May 08, 2012 at 02:59:02PM +0300, Peter Ujfalusi wrote:
Device tree support for OMAP4+ dmic cpu dai driver.
Acked-by: Mark Brown broonie@opensource.wolfsonmicro.com
participants (2)
-
Mark Brown
-
Peter Ujfalusi