linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Rename audio graph export functions
@ 2021-02-04 13:50 Sameer Pujar
  2021-02-04 13:50 ` [PATCH v2 1/3] ASoC: audio-graph: Rename functions needed for export Sameer Pujar
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Sameer Pujar @ 2021-02-04 13:50 UTC (permalink / raw)
  To: broonie
  Cc: thierry.reding, jonathanh, kuninori.morimoto.gx, alsa-devel,
	linux-tegra, linux-kernel, sharadg, Sameer Pujar

This series renames exported functions from audio graph for a better
global visibility. In doing so update the references in audio graph
and Tegra audio graph card drivers.


Changelog
=========

v1 -> v2:
---------
 [Patch v2 1/3]:
   - Rename graph_parse_of() to audio_graph_parse_of() and
     graph_card_probe() to audio_graph_card_probe() as well.

   - Update above references in audio graph driver.

 [Patch v2 2/3]: New patch
   - Update references for audio_graph_parse_of() and
     audio_graph_card_probe() in Tegra graph driver.

   - Add "Depends-on" tag

 [Patch v2 3/3]:
   - Update commit message to add "Depends-on" tag.

Sameer Pujar (3):
  ASoC: audio-graph: Rename functions needed for export
  ASoC: tegra: Update references of audio graph helpers
  ASoC: tegra: Add driver remove() callback

 include/sound/graph_card.h               |  6 ++++--
 sound/soc/generic/audio-graph-card.c     | 17 +++++++++--------
 sound/soc/tegra/tegra_audio_graph_card.c |  9 +++++----
 3 files changed, 18 insertions(+), 14 deletions(-)

-- 
2.7.4


^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH v2 1/3] ASoC: audio-graph: Rename functions needed for export
  2021-02-04 13:50 [PATCH v2 0/3] Rename audio graph export functions Sameer Pujar
@ 2021-02-04 13:50 ` Sameer Pujar
  2021-02-04 13:50 ` [PATCH v2 2/3] ASoC: tegra: Update references of audio graph helpers Sameer Pujar
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Sameer Pujar @ 2021-02-04 13:50 UTC (permalink / raw)
  To: broonie
  Cc: thierry.reding, jonathanh, kuninori.morimoto.gx, alsa-devel,
	linux-tegra, linux-kernel, sharadg, Sameer Pujar

Following functions are renamed for a better global visibility.
  graph_card_probe() --> audio_graph_card_probe()
  graph_parse_of()   --> audio_graph_parse_of()
  graph_remove()     --> audio_graph_remove() [exported as well]

The references in header and source files of audio graph are
updated to make use of above.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/graph_card.h           |  6 ++++--
 sound/soc/generic/audio-graph-card.c | 17 +++++++++--------
 2 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/include/sound/graph_card.h b/include/sound/graph_card.h
index bbb5a13..0137844 100644
--- a/include/sound/graph_card.h
+++ b/include/sound/graph_card.h
@@ -9,8 +9,10 @@
 
 #include <sound/simple_card_utils.h>
 
-int graph_card_probe(struct snd_soc_card *card);
+int audio_graph_card_probe(struct snd_soc_card *card);
 
-int graph_parse_of(struct asoc_simple_priv *priv, struct device *dev);
+int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev);
+
+int audio_graph_remove(struct platform_device *pdev);
 
 #endif /* __GRAPH_CARD_H */
diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 16a04a6..8c5cdcd 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -532,7 +532,7 @@ static int graph_for_each_link(struct asoc_simple_priv *priv,
 static void graph_get_dais_count(struct asoc_simple_priv *priv,
 				 struct link_info *li);
 
-int graph_parse_of(struct asoc_simple_priv *priv, struct device *dev)
+int audio_graph_parse_of(struct asoc_simple_priv *priv, struct device *dev)
 {
 	struct snd_soc_card *card = simple_priv_to_card(priv);
 	struct link_info li;
@@ -608,7 +608,7 @@ int graph_parse_of(struct asoc_simple_priv *priv, struct device *dev)
 
 	return ret;
 }
-EXPORT_SYMBOL_GPL(graph_parse_of);
+EXPORT_SYMBOL_GPL(audio_graph_parse_of);
 
 static int graph_count_noml(struct asoc_simple_priv *priv,
 			    struct device_node *cpu_ep,
@@ -705,7 +705,7 @@ static void graph_get_dais_count(struct asoc_simple_priv *priv,
 		li->link, li->dais, li->conf);
 }
 
-int graph_card_probe(struct snd_soc_card *card)
+int audio_graph_card_probe(struct snd_soc_card *card)
 {
 	struct asoc_simple_priv *priv = snd_soc_card_get_drvdata(card);
 	int ret;
@@ -720,7 +720,7 @@ int graph_card_probe(struct snd_soc_card *card)
 
 	return 0;
 }
-EXPORT_SYMBOL_GPL(graph_card_probe);
+EXPORT_SYMBOL_GPL(audio_graph_card_probe);
 
 static int graph_probe(struct platform_device *pdev)
 {
@@ -736,20 +736,21 @@ static int graph_probe(struct platform_device *pdev)
 	card = simple_priv_to_card(priv);
 	card->dapm_widgets	= graph_dapm_widgets;
 	card->num_dapm_widgets	= ARRAY_SIZE(graph_dapm_widgets);
-	card->probe		= graph_card_probe;
+	card->probe		= audio_graph_card_probe;
 
 	if (of_device_get_match_data(dev))
 		priv->dpcm_selectable = 1;
 
-	return graph_parse_of(priv, dev);
+	return audio_graph_parse_of(priv, dev);
 }
 
-static int graph_remove(struct platform_device *pdev)
+int audio_graph_remove(struct platform_device *pdev)
 {
 	struct snd_soc_card *card = platform_get_drvdata(pdev);
 
 	return asoc_simple_clean_reference(card);
 }
+EXPORT_SYMBOL_GPL(audio_graph_remove);
 
 static const struct of_device_id graph_of_match[] = {
 	{ .compatible = "audio-graph-card", },
@@ -766,7 +767,7 @@ static struct platform_driver graph_card = {
 		.of_match_table = graph_of_match,
 	},
 	.probe = graph_probe,
-	.remove = graph_remove,
+	.remove = audio_graph_remove,
 };
 module_platform_driver(graph_card);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 2/3] ASoC: tegra: Update references of audio graph helpers
  2021-02-04 13:50 [PATCH v2 0/3] Rename audio graph export functions Sameer Pujar
  2021-02-04 13:50 ` [PATCH v2 1/3] ASoC: audio-graph: Rename functions needed for export Sameer Pujar
@ 2021-02-04 13:50 ` Sameer Pujar
  2021-02-04 13:50 ` [PATCH v2 3/3] ASoC: tegra: Add driver remove() callback Sameer Pujar
  2021-02-04 22:20 ` [PATCH v2 0/3] Rename audio graph export functions Kuninori Morimoto
  3 siblings, 0 replies; 6+ messages in thread
From: Sameer Pujar @ 2021-02-04 13:50 UTC (permalink / raw)
  To: broonie
  Cc: thierry.reding, jonathanh, kuninori.morimoto.gx, alsa-devel,
	linux-tegra, linux-kernel, sharadg, Sameer Pujar

The audio graph helper functions are renamed now for a better global
visibility and hence references need to be updated in Tegra audio
graph.

Signed-off-by: Sameer Pujar <spujar@nvidia.com>
---
 sound/soc/tegra/tegra_audio_graph_card.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/tegra/tegra_audio_graph_card.c b/sound/soc/tegra/tegra_audio_graph_card.c
index 9e43f16..121e572 100644
--- a/sound/soc/tegra/tegra_audio_graph_card.c
+++ b/sound/soc/tegra/tegra_audio_graph_card.c
@@ -184,7 +184,7 @@ static int tegra_audio_graph_card_probe(struct snd_soc_card *card)
 		return PTR_ERR(priv->clk_plla_out0);
 	}
 
-	return graph_card_probe(card);
+	return audio_graph_card_probe(card);
 }
 
 static int tegra_audio_graph_probe(struct platform_device *pdev)
@@ -201,12 +201,12 @@ static int tegra_audio_graph_probe(struct platform_device *pdev)
 
 	card->probe = tegra_audio_graph_card_probe;
 
-	/* graph_parse_of() depends on below */
+	/* audio_graph_parse_of() depends on below */
 	card->component_chaining = 1;
 	priv->simple.ops = &tegra_audio_graph_ops;
 	priv->simple.force_dpcm = 1;
 
-	return graph_parse_of(&priv->simple, dev);
+	return audio_graph_parse_of(&priv->simple, dev);
 }
 
 static const struct tegra_audio_cdata tegra210_data = {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH v2 3/3] ASoC: tegra: Add driver remove() callback
  2021-02-04 13:50 [PATCH v2 0/3] Rename audio graph export functions Sameer Pujar
  2021-02-04 13:50 ` [PATCH v2 1/3] ASoC: audio-graph: Rename functions needed for export Sameer Pujar
  2021-02-04 13:50 ` [PATCH v2 2/3] ASoC: tegra: Update references of audio graph helpers Sameer Pujar
@ 2021-02-04 13:50 ` Sameer Pujar
  2021-02-04 22:20 ` [PATCH v2 0/3] Rename audio graph export functions Kuninori Morimoto
  3 siblings, 0 replies; 6+ messages in thread
From: Sameer Pujar @ 2021-02-04 13:50 UTC (permalink / raw)
  To: broonie
  Cc: thierry.reding, jonathanh, kuninori.morimoto.gx, alsa-devel,
	linux-tegra, linux-kernel, sharadg, Sameer Pujar

There is cleanup required, related to release of phandles, during driver
removal and hence point remove function pointer to audio_graph_remove().

Fixes: 202e2f774543 ("ASoC: tegra: Add audio graph based card driver")
Depends-on: "ASoC: audio-graph: Rename functions needed for export"
Signed-off-by: Sameer Pujar <spujar@nvidia.com>
---
 sound/soc/tegra/tegra_audio_graph_card.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sound/soc/tegra/tegra_audio_graph_card.c b/sound/soc/tegra/tegra_audio_graph_card.c
index 121e572..ddedf18 100644
--- a/sound/soc/tegra/tegra_audio_graph_card.c
+++ b/sound/soc/tegra/tegra_audio_graph_card.c
@@ -2,7 +2,7 @@
 //
 // tegra_audio_graph_card.c - Audio Graph based Tegra Machine Driver
 //
-// Copyright (c) 2020 NVIDIA CORPORATION.  All rights reserved.
+// Copyright (c) 2020-2021 NVIDIA CORPORATION.  All rights reserved.
 
 #include <linux/math64.h>
 #include <linux/module.h>
@@ -243,6 +243,7 @@ static struct platform_driver tegra_audio_graph_card = {
 		.of_match_table = graph_of_tegra_match,
 	},
 	.probe = tegra_audio_graph_probe,
+	.remove = audio_graph_remove,
 };
 module_platform_driver(tegra_audio_graph_card);
 
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/3] Rename audio graph export functions
  2021-02-04 13:50 [PATCH v2 0/3] Rename audio graph export functions Sameer Pujar
                   ` (2 preceding siblings ...)
  2021-02-04 13:50 ` [PATCH v2 3/3] ASoC: tegra: Add driver remove() callback Sameer Pujar
@ 2021-02-04 22:20 ` Kuninori Morimoto
  2021-02-05 19:24   ` Mark Brown
  3 siblings, 1 reply; 6+ messages in thread
From: Kuninori Morimoto @ 2021-02-04 22:20 UTC (permalink / raw)
  To: Sameer Pujar
  Cc: broonie, thierry.reding, jonathanh, alsa-devel, linux-tegra,
	linux-kernel, sharadg


Hi Sameer

> This series renames exported functions from audio graph for a better
> global visibility. In doing so update the references in audio graph
> and Tegra audio graph card drivers.

I guess [1/3] and [2/3] should be merged/squashed ?
Otherwise, there is git-bisect error.

Except it
       Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Thank you for your help !!

Best regards
---
Kuninori Morimoto

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH v2 0/3] Rename audio graph export functions
  2021-02-04 22:20 ` [PATCH v2 0/3] Rename audio graph export functions Kuninori Morimoto
@ 2021-02-05 19:24   ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2021-02-05 19:24 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Sameer Pujar, thierry.reding, jonathanh, alsa-devel, linux-tegra,
	linux-kernel, sharadg

[-- Attachment #1: Type: text/plain, Size: 474 bytes --]

On Fri, Feb 05, 2021 at 07:20:42AM +0900, Kuninori Morimoto wrote:

> > This series renames exported functions from audio graph for a better
> > global visibility. In doing so update the references in audio graph
> > and Tegra audio graph card drivers.

> I guess [1/3] and [2/3] should be merged/squashed ?
> Otherwise, there is git-bisect error.

Yes, and I'll complain because I have automation to test every patch
individually!  Otherwise this does look fine to me too.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-02-05 19:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-04 13:50 [PATCH v2 0/3] Rename audio graph export functions Sameer Pujar
2021-02-04 13:50 ` [PATCH v2 1/3] ASoC: audio-graph: Rename functions needed for export Sameer Pujar
2021-02-04 13:50 ` [PATCH v2 2/3] ASoC: tegra: Update references of audio graph helpers Sameer Pujar
2021-02-04 13:50 ` [PATCH v2 3/3] ASoC: tegra: Add driver remove() callback Sameer Pujar
2021-02-04 22:20 ` [PATCH v2 0/3] Rename audio graph export functions Kuninori Morimoto
2021-02-05 19:24   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).