diff options
author | Peter Ujfalusi <peter.ujfalusi@ti.com> | 2014-04-16 08:46:12 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-18 13:00:35 -0400 |
commit | fe7b5868809a89a7316eef064f0bb7796aa8c225 (patch) | |
tree | b1eaf59740c5cfc78839b49c5fb79f8e9c54b8f8 | |
parent | 3819bfa23786fd1e8571fbb143e1b0b8f0fead86 (diff) |
ASoC: omap-pcm: Support for binding the platform driver to dai devices
With the new calls it is going to be possible to bind the platform driver
to a dai device which makes it easier for us in a long run to handle DT
boots, and opens the possibility to move machine driver to generic simple
card.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/omap/omap-pcm.c | 6 | ||||
-rw-r--r-- | sound/soc/omap/omap-pcm.h | 30 |
2 files changed, 36 insertions, 0 deletions
diff --git a/sound/soc/omap/omap-pcm.c b/sound/soc/omap/omap-pcm.c index 07b8b7bc9d20..c3711b582d5f 100644 --- a/sound/soc/omap/omap-pcm.c +++ b/sound/soc/omap/omap-pcm.c | |||
@@ -232,6 +232,12 @@ static struct snd_soc_platform_driver omap_soc_platform = { | |||
232 | .pcm_free = omap_pcm_free_dma_buffers, | 232 | .pcm_free = omap_pcm_free_dma_buffers, |
233 | }; | 233 | }; |
234 | 234 | ||
235 | int omap_pcm_platform_register(struct device *dev) | ||
236 | { | ||
237 | return devm_snd_soc_register_platform(dev, &omap_soc_platform); | ||
238 | } | ||
239 | EXPORT_SYMBOL_GPL(omap_pcm_platform_register); | ||
240 | |||
235 | static int omap_pcm_probe(struct platform_device *pdev) | 241 | static int omap_pcm_probe(struct platform_device *pdev) |
236 | { | 242 | { |
237 | return snd_soc_register_platform(&pdev->dev, | 243 | return snd_soc_register_platform(&pdev->dev, |
diff --git a/sound/soc/omap/omap-pcm.h b/sound/soc/omap/omap-pcm.h new file mode 100644 index 000000000000..c1d2f31d71e9 --- /dev/null +++ b/sound/soc/omap/omap-pcm.h | |||
@@ -0,0 +1,30 @@ | |||
1 | /* | ||
2 | * omap-pcm.h - OMAP PCM driver | ||
3 | * | ||
4 | * Copyright (C) 2014 Texas Instruments, Inc. | ||
5 | * | ||
6 | * Author: Peter Ujfalusi <peter.ujfalusi@ti.com> | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or | ||
9 | * modify it under the terms of the GNU General Public License | ||
10 | * version 2 as published by the Free Software Foundation. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | */ | ||
17 | |||
18 | #ifndef __OMAP_PCM_H__ | ||
19 | #define __OMAP_PCM_H__ | ||
20 | |||
21 | #if IS_ENABLED(CONFIG_SND_OMAP_SOC) | ||
22 | int omap_pcm_platform_register(struct device *dev); | ||
23 | #else | ||
24 | static inline int omap_pcm_platform_register(struct device *dev) | ||
25 | { | ||
26 | return 0; | ||
27 | } | ||
28 | #endif /* CONFIG_SND_OMAP_SOC */ | ||
29 | |||
30 | #endif /* __OMAP_PCM_H__ */ | ||