Skip to contentSkip to conversation

ASoC: core - Allow some components to probe/remove later or earlier.

PATCH New Liam Girdwood 1 participant 1 message May 24, 2011

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

PATCH 1/1 ASoC: core - Allow some components to probe/remove later or earlier.

Some ASoC components depend on other ASoC components to provide clocks and power resources in order to probe().

Provide a method to allow some components to be probed() later and be also removed() earlier.

---
 include/sound/soc-dai.h |    4 +++
 include/sound/soc.h     |    8 +++++++
 sound/soc/soc-core.c    |   49 ++++++++++++++++++++++++++++++++++------------
 3 files changed, 48 insertions(+), 13 deletions(-)
include/sound/soc-dai.h +4 -0
index 1bafe95..ada1f24 100644
@@ -209,6 +209,10 @@ struct snd_soc_dai_driver {
 	struct snd_soc_pcm_stream capture;
 	struct snd_soc_pcm_stream playback;
 	unsigned int symmetric_rates:1;
+
+	/* probe ordering - for components with runtime dependencies */
+	bool late_probe;
+	bool early_remove;
 };
 
 /*
include/sound/soc.h +8 -0
index f1de3e0..a2139d4 100644
@@ -613,6 +613,10 @@ struct snd_soc_codec_driver {
 
 	void (*seq_notifier)(struct snd_soc_dapm_context *,
 			     enum snd_soc_dapm_type, int);
+
+	/* probe ordering - for components with runtime dependencies */
+	bool late_probe;
+	bool early_remove;
 };
 
 /* SoC platform interface */
@@ -637,6 +641,10 @@ struct snd_soc_platform_driver {
 
 	/* platform stream ops */
 	struct snd_pcm_ops *ops;
+
+	/* probe ordering - for components with runtime dependencies */
+	bool late_probe;
+	bool early_remove;
 };
 
 struct snd_soc_platform {
sound/soc/soc-core.c +36 -13

131 lines not on this page · raw message

Signature · 1 line
1.7.4.1