diff mbox series

[v2,9/8] ASoC: soc-core: add comment of return value for snd_soc_daifmt_parse_clock_provider_raw()

Message ID 87y2bjboai.wl-kuninori.morimoto.gx@renesas.com
State New
Headers show
Series ASoC: tidyup snd_soc_of_parse_daifmt() | expand

Commit Message

Kuninori Morimoto June 9, 2021, 5:27 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

return value from snd_soc_daifmt_parse_clock_provider_raw() will
be used at snd_soc_daifmt_clock_provider_from_bitmap().
But it is very difficult to know that without any comments.
This patch adds it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
Hi Mark

snd_soc_daifmt_clock_provider_from_bitmap() was used from
snd_soc_of_parse_daifmt() too.
[8/8] patch removes it, and this patch was postponed until it.
But I forgot to include this. Thus this patch has strange numbering [9/8].

sound/soc/soc-core.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 638dc6beecdd..0fa4966eddfc 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3021,6 +3021,11 @@  EXPORT_SYMBOL_GPL(snd_soc_daifmt_clock_provider_fliped);
 
 unsigned int snd_soc_daifmt_clock_provider_from_bitmap(unsigned int bit_frame)
 {
+	/*
+	 * bit_frame is return value from
+	 *	snd_soc_daifmt_parse_clock_provider_raw()
+	 */
+
 	/* Codec base */
 	switch (bit_frame) {
 	case 0x11:
@@ -3149,6 +3154,11 @@  unsigned int snd_soc_daifmt_parse_clock_provider_raw(struct device_node *np,
 	if (frame && framemaster)
 		*framemaster = of_parse_phandle(np, prop, 0);
 
+	/*
+	 * return bitmap.
+	 * It will be parameter of
+	 *	snd_soc_daifmt_clock_provider_from_bitmap()
+	 */
 	return (bit << 4) + frame;
 }
 EXPORT_SYMBOL_GPL(snd_soc_daifmt_parse_clock_provider_raw);