All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] ASoC: add/use asoc_simple_card_clk_enable/disable()
@ 2017-06-07  0:28 ` Kuninori Morimoto
  0 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:28 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc


Hi Mark

It is not a big deal, but current Simple/Audio card is
using simple_dai::clk directly.
Encapsulation is one of simple-card-util's purpose.
This patch adds asoc_simple_card_clk_enable/disable() and
encapsulate it.

Kuninori Morimoto (5):
  ASoC: simple_card_utils: add asoc_simple_card_clk_enable/disable()
  ASoC: simple-card: use asoc_simple_card_clk_enable/disable()
  ASoC: simple-scu-card: use asoc_simple_card_clk_enable/disable()
  ASoC: audio-graph-scu-card: use asoc_simple_card_clk_enable/disable()
  ASoC: audio-graph-card: use asoc_simple_card_clk_enable/disable()

 include/sound/simple_card_utils.h        |  2 ++
 sound/soc/generic/audio-graph-card.c     | 10 +++++-----
 sound/soc/generic/audio-graph-scu-card.c |  4 ++--
 sound/soc/generic/simple-card-utils.c    |  6 ++++++
 sound/soc/generic/simple-card.c          | 10 +++++-----
 sound/soc/generic/simple-scu-card.c      |  4 ++--
 6 files changed, 22 insertions(+), 14 deletions(-)

-- 
1.9.1

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

* [PATCH 0/5] ASoC: add/use asoc_simple_card_clk_enable/disable()
@ 2017-06-07  0:28 ` Kuninori Morimoto
  0 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:28 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc


Hi Mark

It is not a big deal, but current Simple/Audio card is
using simple_dai::clk directly.
Encapsulation is one of simple-card-util's purpose.
This patch adds asoc_simple_card_clk_enable/disable() and
encapsulate it.

Kuninori Morimoto (5):
  ASoC: simple_card_utils: add asoc_simple_card_clk_enable/disable()
  ASoC: simple-card: use asoc_simple_card_clk_enable/disable()
  ASoC: simple-scu-card: use asoc_simple_card_clk_enable/disable()
  ASoC: audio-graph-scu-card: use asoc_simple_card_clk_enable/disable()
  ASoC: audio-graph-card: use asoc_simple_card_clk_enable/disable()

 include/sound/simple_card_utils.h        |  2 ++
 sound/soc/generic/audio-graph-card.c     | 10 +++++-----
 sound/soc/generic/audio-graph-scu-card.c |  4 ++--
 sound/soc/generic/simple-card-utils.c    |  6 ++++++
 sound/soc/generic/simple-card.c          | 10 +++++-----
 sound/soc/generic/simple-scu-card.c      |  4 ++--
 6 files changed, 22 insertions(+), 14 deletions(-)

-- 
1.9.1

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

* [PATCH 1/5] ASoC: simple_card_utils: add asoc_simple_card_clk_enable/disable()
  2017-06-07  0:28 ` Kuninori Morimoto
@ 2017-06-07  0:29   ` Kuninori Morimoto
  -1 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk(), and requested parameter is only
simple_dai. But current simple card drivers are using
simple_dai::clk directly for clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's encapsulate it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/simple_card_utils.h     | 2 ++
 sound/soc/generic/simple-card-utils.c | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index 108cae4..9e8e829 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -45,6 +45,8 @@ int asoc_simple_card_parse_clk(struct device *dev,
 			       struct device_node *dai_of_node,
 			       struct asoc_simple_dai *simple_dai,
 			       const char *name);
+#define asoc_simple_card_clk_enable(dai) clk_prepare_enable((dai)->clk)
+#define asoc_simple_card_clk_disable(dai) clk_disable_unprepare((dai)->clk)
 
 #define asoc_simple_card_parse_cpu(node, dai_link,				\
 				   list_name, cells_name, is_single_link)	\
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index d9d8b8a..f7df08b 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -128,6 +128,12 @@ int asoc_simple_card_parse_clk(struct device *dev,
 	clk = devm_get_clk_from_child(dev, node, NULL);
 	if (!IS_ERR(clk)) {
 		simple_dai->sysclk = clk_get_rate(clk);
+
+		/*
+		 * This enables
+		 *	asoc_simple_card_clk_enable()
+		 *	asoc_simple_card_clk_disable()
+		 */
 		simple_dai->clk = clk;
 	} else if (!of_property_read_u32(node, "system-clock-frequency", &val)) {
 		simple_dai->sysclk = val;
-- 
1.9.1

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

* [PATCH 1/5] ASoC: simple_card_utils: add asoc_simple_card_clk_enable/disable()
@ 2017-06-07  0:29   ` Kuninori Morimoto
  0 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk(), and requested parameter is only
simple_dai. But current simple card drivers are using
simple_dai::clk directly for clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's encapsulate it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 include/sound/simple_card_utils.h     | 2 ++
 sound/soc/generic/simple-card-utils.c | 6 ++++++
 2 files changed, 8 insertions(+)

diff --git a/include/sound/simple_card_utils.h b/include/sound/simple_card_utils.h
index 108cae4..9e8e829 100644
--- a/include/sound/simple_card_utils.h
+++ b/include/sound/simple_card_utils.h
@@ -45,6 +45,8 @@ int asoc_simple_card_parse_clk(struct device *dev,
 			       struct device_node *dai_of_node,
 			       struct asoc_simple_dai *simple_dai,
 			       const char *name);
+#define asoc_simple_card_clk_enable(dai) clk_prepare_enable((dai)->clk)
+#define asoc_simple_card_clk_disable(dai) clk_disable_unprepare((dai)->clk)
 
 #define asoc_simple_card_parse_cpu(node, dai_link,				\
 				   list_name, cells_name, is_single_link)	\
diff --git a/sound/soc/generic/simple-card-utils.c b/sound/soc/generic/simple-card-utils.c
index d9d8b8a..f7df08b 100644
--- a/sound/soc/generic/simple-card-utils.c
+++ b/sound/soc/generic/simple-card-utils.c
@@ -128,6 +128,12 @@ int asoc_simple_card_parse_clk(struct device *dev,
 	clk = devm_get_clk_from_child(dev, node, NULL);
 	if (!IS_ERR(clk)) {
 		simple_dai->sysclk = clk_get_rate(clk);
+
+		/*
+		 * This enables
+		 *	asoc_simple_card_clk_enable()
+		 *	asoc_simple_card_clk_disable()
+		 */
 		simple_dai->clk = clk;
 	} else if (!of_property_read_u32(node, "system-clock-frequency", &val)) {
 		simple_dai->sysclk = val;
-- 
1.9.1

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

* [PATCH 2/5] ASoC: simple-card: use asoc_simple_card_clk_enable/disable()
  2017-06-07  0:28 ` Kuninori Morimoto
@ 2017-06-07  0:29   ` Kuninori Morimoto
  -1 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk(), and requested parameter is only
simple_dai. But current simple card drivers are using
simple_dai::clk directly for clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/simple-card.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 82ab81d..b745320b 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -118,13 +118,13 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
 		simple_priv_to_props(priv, rtd->num);
 	int ret;
 
-	ret = clk_prepare_enable(dai_props->cpu_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->cpu_dai);
 	if (ret)
 		return ret;
 
-	ret = clk_prepare_enable(dai_props->codec_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->codec_dai);
 	if (ret)
-		clk_disable_unprepare(dai_props->cpu_dai.clk);
+		asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
 	return ret;
 }
@@ -136,9 +136,9 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
 	struct simple_dai_props *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->cpu_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
-	clk_disable_unprepare(dai_props->codec_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->codec_dai);
 }
 
 static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
-- 
1.9.1

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

* [PATCH 2/5] ASoC: simple-card: use asoc_simple_card_clk_enable/disable()
@ 2017-06-07  0:29   ` Kuninori Morimoto
  0 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk(), and requested parameter is only
simple_dai. But current simple card drivers are using
simple_dai::clk directly for clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/simple-card.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index 82ab81d..b745320b 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -118,13 +118,13 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
 		simple_priv_to_props(priv, rtd->num);
 	int ret;
 
-	ret = clk_prepare_enable(dai_props->cpu_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->cpu_dai);
 	if (ret)
 		return ret;
 
-	ret = clk_prepare_enable(dai_props->codec_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->codec_dai);
 	if (ret)
-		clk_disable_unprepare(dai_props->cpu_dai.clk);
+		asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
 	return ret;
 }
@@ -136,9 +136,9 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
 	struct simple_dai_props *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->cpu_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
-	clk_disable_unprepare(dai_props->codec_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->codec_dai);
 }
 
 static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
-- 
1.9.1

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

* [PATCH 3/5] ASoC: simple-scu-card: use asoc_simple_card_clk_enable/disable()
  2017-06-07  0:28 ` Kuninori Morimoto
@ 2017-06-07  0:29   ` Kuninori Morimoto
  -1 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk(), and requested parameter is only
simple_dai. But current simple card drivers are using
simple_dai::clk directly for clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/simple-scu-card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/generic/simple-scu-card.c b/sound/soc/generic/simple-scu-card.c
index 9a25140..75210ec 100644
--- a/sound/soc/generic/simple-scu-card.c
+++ b/sound/soc/generic/simple-scu-card.c
@@ -47,7 +47,7 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
 	struct asoc_simple_dai *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	return clk_prepare_enable(dai_props->clk);
+	return asoc_simple_card_clk_enable(dai_props);
 }
 
 static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
@@ -57,7 +57,7 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
 	struct asoc_simple_dai *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->clk);
+	asoc_simple_card_clk_disable(dai_props);
 }
 
 static const struct snd_soc_ops asoc_simple_card_ops = {
-- 
1.9.1

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

* [PATCH 3/5] ASoC: simple-scu-card: use asoc_simple_card_clk_enable/disable()
@ 2017-06-07  0:29   ` Kuninori Morimoto
  0 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk(), and requested parameter is only
simple_dai. But current simple card drivers are using
simple_dai::clk directly for clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/simple-scu-card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/generic/simple-scu-card.c b/sound/soc/generic/simple-scu-card.c
index 9a25140..75210ec 100644
--- a/sound/soc/generic/simple-scu-card.c
+++ b/sound/soc/generic/simple-scu-card.c
@@ -47,7 +47,7 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
 	struct asoc_simple_dai *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	return clk_prepare_enable(dai_props->clk);
+	return asoc_simple_card_clk_enable(dai_props);
 }
 
 static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
@@ -57,7 +57,7 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
 	struct asoc_simple_dai *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->clk);
+	asoc_simple_card_clk_disable(dai_props);
 }
 
 static const struct snd_soc_ops asoc_simple_card_ops = {
-- 
1.9.1

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

* [PATCH 4/5] ASoC: audio-graph-scu-card: use asoc_simple_card_clk_enable/disable()
  2017-06-07  0:28 ` Kuninori Morimoto
@ 2017-06-07  0:29   ` Kuninori Morimoto
  -1 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk(), and requested parameter is only
simple_dai. But current simple card drivers are using
simple_dai::clk directly for clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/audio-graph-scu-card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/generic/audio-graph-scu-card.c b/sound/soc/generic/audio-graph-scu-card.c
index 0066102..27a261e 100644
--- a/sound/soc/generic/audio-graph-scu-card.c
+++ b/sound/soc/generic/audio-graph-scu-card.c
@@ -45,7 +45,7 @@ static int asoc_graph_card_startup(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct asoc_simple_dai *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	return clk_prepare_enable(dai_props->clk);
+	return asoc_simple_card_clk_enable(dai_props);
 }
 
 static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
@@ -54,7 +54,7 @@ static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct asoc_simple_dai *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->clk);
+	asoc_simple_card_clk_disable(dai_props);
 }
 
 static struct snd_soc_ops asoc_graph_card_ops = {
-- 
1.9.1

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

* [PATCH 4/5] ASoC: audio-graph-scu-card: use asoc_simple_card_clk_enable/disable()
@ 2017-06-07  0:29   ` Kuninori Morimoto
  0 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:29 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk(), and requested parameter is only
simple_dai. But current simple card drivers are using
simple_dai::clk directly for clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/audio-graph-scu-card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/generic/audio-graph-scu-card.c b/sound/soc/generic/audio-graph-scu-card.c
index 0066102..27a261e 100644
--- a/sound/soc/generic/audio-graph-scu-card.c
+++ b/sound/soc/generic/audio-graph-scu-card.c
@@ -45,7 +45,7 @@ static int asoc_graph_card_startup(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct asoc_simple_dai *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	return clk_prepare_enable(dai_props->clk);
+	return asoc_simple_card_clk_enable(dai_props);
 }
 
 static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
@@ -54,7 +54,7 @@ static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct asoc_simple_dai *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->clk);
+	asoc_simple_card_clk_disable(dai_props);
 }
 
 static struct snd_soc_ops asoc_graph_card_ops = {
-- 
1.9.1

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

* [PATCH 5/5] ASoC: audio-graph-card: use asoc_simple_card_clk_enable/disable()
  2017-06-07  0:28 ` Kuninori Morimoto
@ 2017-06-07  0:30   ` Kuninori Morimoto
  -1 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:30 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk(), and requested parameter is only
simple_dai. But current simple card drivers are using
simple_dai::clk directly for clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/audio-graph-card.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 0180b28..b5bb791 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -44,13 +44,13 @@ static int asoc_graph_card_startup(struct snd_pcm_substream *substream)
 	struct graph_dai_props *dai_props = graph_priv_to_props(priv, rtd->num);
 	int ret;
 
-	ret = clk_prepare_enable(dai_props->cpu_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->cpu_dai);
 	if (ret)
 		return ret;
 
-	ret = clk_prepare_enable(dai_props->codec_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->codec_dai);
 	if (ret)
-		clk_disable_unprepare(dai_props->cpu_dai.clk);
+		asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
 	return ret;
 }
@@ -61,9 +61,9 @@ static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct graph_dai_props *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->cpu_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
-	clk_disable_unprepare(dai_props->codec_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->codec_dai);
 }
 
 static struct snd_soc_ops asoc_graph_card_ops = {
-- 
1.9.1

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

* [PATCH 5/5] ASoC: audio-graph-card: use asoc_simple_card_clk_enable/disable()
@ 2017-06-07  0:30   ` Kuninori Morimoto
  0 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-07  0:30 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk(), and requested parameter is only
simple_dai. But current simple card drivers are using
simple_dai::clk directly for clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/generic/audio-graph-card.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 0180b28..b5bb791 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -44,13 +44,13 @@ static int asoc_graph_card_startup(struct snd_pcm_substream *substream)
 	struct graph_dai_props *dai_props = graph_priv_to_props(priv, rtd->num);
 	int ret;
 
-	ret = clk_prepare_enable(dai_props->cpu_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->cpu_dai);
 	if (ret)
 		return ret;
 
-	ret = clk_prepare_enable(dai_props->codec_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->codec_dai);
 	if (ret)
-		clk_disable_unprepare(dai_props->cpu_dai.clk);
+		asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
 	return ret;
 }
@@ -61,9 +61,9 @@ static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct graph_dai_props *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->cpu_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
-	clk_disable_unprepare(dai_props->codec_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->codec_dai);
 }
 
 static struct snd_soc_ops asoc_graph_card_ops = {
-- 
1.9.1

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

* Re: [PATCH 1/5] ASoC: simple_card_utils: add asoc_simple_card_clk_enable/disable()
  2017-06-07  0:29   ` Kuninori Morimoto
  (?)
@ 2017-06-08 14:50   ` Mark Brown
  2017-06-08 23:39       ` Kuninori Morimoto
  -1 siblings, 1 reply; 23+ messages in thread
From: Mark Brown @ 2017-06-08 14:50 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Linux-ALSA, Simon, linux-renesas-soc

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

On Wed, Jun 07, 2017 at 12:29:05AM +0000, Kuninori Morimoto wrote:

> +#define asoc_simple_card_clk_enable(dai) clk_prepare_enable((dai)->clk)
> +#define asoc_simple_card_clk_disable(dai) clk_disable_unprepare((dai)->clk)

Could we make these static inline functions instead please?  It
shouldn't make any difference to the generated code but it's a bit more
type safe.

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

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

* Re: [PATCH 1/5] ASoC: simple_card_utils: add asoc_simple_card_clk_enable/disable()
  2017-06-08 14:50   ` Mark Brown
@ 2017-06-08 23:39       ` Kuninori Morimoto
  0 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-08 23:39 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc


Hi Mark

> > +#define asoc_simple_card_clk_enable(dai) clk_prepare_enable((dai)->clk)
> > +#define asoc_simple_card_clk_disable(dai) clk_disable_unprepare((dai)->clk)
> 
> Could we make these static inline functions instead please?  It
> shouldn't make any difference to the generated code but it's a bit more
> type safe.

OK, will do in v2

Best regards
---
Kuninori Morimoto

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

* Re: [PATCH 1/5] ASoC: simple_card_utils: add asoc_simple_card_clk_enable/disable()
@ 2017-06-08 23:39       ` Kuninori Morimoto
  0 siblings, 0 replies; 23+ messages in thread
From: Kuninori Morimoto @ 2017-06-08 23:39 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc


Hi Mark

> > +#define asoc_simple_card_clk_enable(dai) clk_prepare_enable((dai)->clk)
> > +#define asoc_simple_card_clk_disable(dai) clk_disable_unprepare((dai)->clk)
> 
> Could we make these static inline functions instead please?  It
> shouldn't make any difference to the generated code but it's a bit more
> type safe.

OK, will do in v2

Best regards
---
Kuninori Morimoto

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

* Applied "ASoC: audio-graph-card: use asoc_simple_card_clk_xxx()" to the asoc tree
  2017-06-07  0:30   ` Kuninori Morimoto
@ 2017-06-13 21:07     ` Mark Brown
  -1 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2017-06-13 21:07 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Brown, Mark Brown, linux-renesas-soc, Linux-ALSA, Simon, alsa-devel

The patch

   ASoC: audio-graph-card: use asoc_simple_card_clk_xxx()

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From d471d55934ca8b4f38535207589df4e3cc8b1484 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 9 Jun 2017 00:45:23 +0000
Subject: [PATCH] ASoC: audio-graph-card: use asoc_simple_card_clk_xxx()

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk().
Current simple card drivers are using it directly for
clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/generic/audio-graph-card.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 0180b286bee3..b5bb791a6e61 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -44,13 +44,13 @@ static int asoc_graph_card_startup(struct snd_pcm_substream *substream)
 	struct graph_dai_props *dai_props = graph_priv_to_props(priv, rtd->num);
 	int ret;
 
-	ret = clk_prepare_enable(dai_props->cpu_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->cpu_dai);
 	if (ret)
 		return ret;
 
-	ret = clk_prepare_enable(dai_props->codec_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->codec_dai);
 	if (ret)
-		clk_disable_unprepare(dai_props->cpu_dai.clk);
+		asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
 	return ret;
 }
@@ -61,9 +61,9 @@ static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct graph_dai_props *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->cpu_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
-	clk_disable_unprepare(dai_props->codec_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->codec_dai);
 }
 
 static struct snd_soc_ops asoc_graph_card_ops = {
-- 
2.11.0

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

* Applied "ASoC: audio-graph-card: use asoc_simple_card_clk_xxx()" to the asoc tree
@ 2017-06-13 21:07     ` Mark Brown
  0 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2017-06-13 21:07 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Mark Brown

The patch

   ASoC: audio-graph-card: use asoc_simple_card_clk_xxx()

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From d471d55934ca8b4f38535207589df4e3cc8b1484 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 9 Jun 2017 00:45:23 +0000
Subject: [PATCH] ASoC: audio-graph-card: use asoc_simple_card_clk_xxx()

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk().
Current simple card drivers are using it directly for
clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/generic/audio-graph-card.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/generic/audio-graph-card.c b/sound/soc/generic/audio-graph-card.c
index 0180b286bee3..b5bb791a6e61 100644
--- a/sound/soc/generic/audio-graph-card.c
+++ b/sound/soc/generic/audio-graph-card.c
@@ -44,13 +44,13 @@ static int asoc_graph_card_startup(struct snd_pcm_substream *substream)
 	struct graph_dai_props *dai_props = graph_priv_to_props(priv, rtd->num);
 	int ret;
 
-	ret = clk_prepare_enable(dai_props->cpu_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->cpu_dai);
 	if (ret)
 		return ret;
 
-	ret = clk_prepare_enable(dai_props->codec_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->codec_dai);
 	if (ret)
-		clk_disable_unprepare(dai_props->cpu_dai.clk);
+		asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
 	return ret;
 }
@@ -61,9 +61,9 @@ static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct graph_dai_props *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->cpu_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
-	clk_disable_unprepare(dai_props->codec_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->codec_dai);
 }
 
 static struct snd_soc_ops asoc_graph_card_ops = {
-- 
2.11.0

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

* Applied "ASoC: audio-graph-scu-card: use asoc_simple_card_clk_xxx()" to the asoc tree
  2017-06-07  0:29   ` Kuninori Morimoto
@ 2017-06-13 21:07     ` Mark Brown
  -1 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2017-06-13 21:07 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Brown, Mark Brown, linux-renesas-soc, Linux-ALSA, Simon, alsa-devel

The patch

   ASoC: audio-graph-scu-card: use asoc_simple_card_clk_xxx()

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 6654fc77797e306a3b67b3cdf0b6121294893dba Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 9 Jun 2017 00:45:01 +0000
Subject: [PATCH] ASoC: audio-graph-scu-card: use asoc_simple_card_clk_xxx()

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk().
Current simple card drivers are using it directly for
clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/generic/audio-graph-scu-card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/generic/audio-graph-scu-card.c b/sound/soc/generic/audio-graph-scu-card.c
index 0066102f5bc4..27a261ee7302 100644
--- a/sound/soc/generic/audio-graph-scu-card.c
+++ b/sound/soc/generic/audio-graph-scu-card.c
@@ -45,7 +45,7 @@ static int asoc_graph_card_startup(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct asoc_simple_dai *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	return clk_prepare_enable(dai_props->clk);
+	return asoc_simple_card_clk_enable(dai_props);
 }
 
 static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
@@ -54,7 +54,7 @@ static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct asoc_simple_dai *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->clk);
+	asoc_simple_card_clk_disable(dai_props);
 }
 
 static struct snd_soc_ops asoc_graph_card_ops = {
-- 
2.11.0

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

* Applied "ASoC: audio-graph-scu-card: use asoc_simple_card_clk_xxx()" to the asoc tree
@ 2017-06-13 21:07     ` Mark Brown
  0 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2017-06-13 21:07 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Mark Brown

The patch

   ASoC: audio-graph-scu-card: use asoc_simple_card_clk_xxx()

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 6654fc77797e306a3b67b3cdf0b6121294893dba Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 9 Jun 2017 00:45:01 +0000
Subject: [PATCH] ASoC: audio-graph-scu-card: use asoc_simple_card_clk_xxx()

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk().
Current simple card drivers are using it directly for
clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/generic/audio-graph-scu-card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/generic/audio-graph-scu-card.c b/sound/soc/generic/audio-graph-scu-card.c
index 0066102f5bc4..27a261ee7302 100644
--- a/sound/soc/generic/audio-graph-scu-card.c
+++ b/sound/soc/generic/audio-graph-scu-card.c
@@ -45,7 +45,7 @@ static int asoc_graph_card_startup(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct asoc_simple_dai *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	return clk_prepare_enable(dai_props->clk);
+	return asoc_simple_card_clk_enable(dai_props);
 }
 
 static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
@@ -54,7 +54,7 @@ static void asoc_graph_card_shutdown(struct snd_pcm_substream *substream)
 	struct graph_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
 	struct asoc_simple_dai *dai_props = graph_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->clk);
+	asoc_simple_card_clk_disable(dai_props);
 }
 
 static struct snd_soc_ops asoc_graph_card_ops = {
-- 
2.11.0

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

* Applied "ASoC: simple-scu-card: use asoc_simple_card_clk_xxx()" to the asoc tree
  2017-06-07  0:29   ` Kuninori Morimoto
@ 2017-06-13 21:07     ` Mark Brown
  -1 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2017-06-13 21:07 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Brown, Mark Brown, linux-renesas-soc, Linux-ALSA, Simon, alsa-devel

The patch

   ASoC: simple-scu-card: use asoc_simple_card_clk_xxx()

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From bb24a3ba3f52942b5f3eb6c10288da830ec9ef70 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 9 Jun 2017 00:44:40 +0000
Subject: [PATCH] ASoC: simple-scu-card: use asoc_simple_card_clk_xxx()

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk().
Current simple card drivers are using it directly for
clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/generic/simple-scu-card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/generic/simple-scu-card.c b/sound/soc/generic/simple-scu-card.c
index 5faf5d6c48a2..f203783b2fad 100644
--- a/sound/soc/generic/simple-scu-card.c
+++ b/sound/soc/generic/simple-scu-card.c
@@ -47,7 +47,7 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
 	struct asoc_simple_dai *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	return clk_prepare_enable(dai_props->clk);
+	return asoc_simple_card_clk_enable(dai_props);
 }
 
 static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
@@ -57,7 +57,7 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
 	struct asoc_simple_dai *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->clk);
+	asoc_simple_card_clk_disable(dai_props);
 }
 
 static const struct snd_soc_ops asoc_simple_card_ops = {
-- 
2.11.0

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

* Applied "ASoC: simple-scu-card: use asoc_simple_card_clk_xxx()" to the asoc tree
@ 2017-06-13 21:07     ` Mark Brown
  0 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2017-06-13 21:07 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Mark Brown

The patch

   ASoC: simple-scu-card: use asoc_simple_card_clk_xxx()

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From bb24a3ba3f52942b5f3eb6c10288da830ec9ef70 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 9 Jun 2017 00:44:40 +0000
Subject: [PATCH] ASoC: simple-scu-card: use asoc_simple_card_clk_xxx()

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk().
Current simple card drivers are using it directly for
clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/generic/simple-scu-card.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/generic/simple-scu-card.c b/sound/soc/generic/simple-scu-card.c
index 5faf5d6c48a2..f203783b2fad 100644
--- a/sound/soc/generic/simple-scu-card.c
+++ b/sound/soc/generic/simple-scu-card.c
@@ -47,7 +47,7 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
 	struct asoc_simple_dai *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	return clk_prepare_enable(dai_props->clk);
+	return asoc_simple_card_clk_enable(dai_props);
 }
 
 static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
@@ -57,7 +57,7 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
 	struct asoc_simple_dai *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->clk);
+	asoc_simple_card_clk_disable(dai_props);
 }
 
 static const struct snd_soc_ops asoc_simple_card_ops = {
-- 
2.11.0

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

* Applied "ASoC: simple-card: use asoc_simple_card_clk_xxx()" to the asoc tree
  2017-06-07  0:29   ` Kuninori Morimoto
@ 2017-06-13 21:07     ` Mark Brown
  -1 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2017-06-13 21:07 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Brown, Mark Brown, linux-renesas-soc, Linux-ALSA, Simon, alsa-devel

The patch

   ASoC: simple-card: use asoc_simple_card_clk_xxx()

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 3ab50c4f98434080c1f73fc56d8d8b38364c6cd8 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 9 Jun 2017 00:44:16 +0000
Subject: [PATCH] ASoC: simple-card: use asoc_simple_card_clk_xxx()

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk().
Current simple card drivers are using it directly for
clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/generic/simple-card.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index e26bd14ba70f..8828b91867b8 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -118,13 +118,13 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
 		simple_priv_to_props(priv, rtd->num);
 	int ret;
 
-	ret = clk_prepare_enable(dai_props->cpu_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->cpu_dai);
 	if (ret)
 		return ret;
 
-	ret = clk_prepare_enable(dai_props->codec_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->codec_dai);
 	if (ret)
-		clk_disable_unprepare(dai_props->cpu_dai.clk);
+		asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
 	return ret;
 }
@@ -136,9 +136,9 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
 	struct simple_dai_props *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->cpu_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
-	clk_disable_unprepare(dai_props->codec_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->codec_dai);
 }
 
 static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
-- 
2.11.0

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

* Applied "ASoC: simple-card: use asoc_simple_card_clk_xxx()" to the asoc tree
@ 2017-06-13 21:07     ` Mark Brown
  0 siblings, 0 replies; 23+ messages in thread
From: Mark Brown @ 2017-06-13 21:07 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Mark Brown

The patch

   ASoC: simple-card: use asoc_simple_card_clk_xxx()

has been applied to the asoc tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 3ab50c4f98434080c1f73fc56d8d8b38364c6cd8 Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Fri, 9 Jun 2017 00:44:16 +0000
Subject: [PATCH] ASoC: simple-card: use asoc_simple_card_clk_xxx()

Current simple-card-utils sets asoc_simple_dai::clk via
asoc_simple_card_parse_clk().
Current simple card drivers are using it directly for
clk_enable/disable.
Encapsulation is one of simple card util's purpose.
Let's use asoc_simple_card_clk_enable/disable.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/generic/simple-card.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
index e26bd14ba70f..8828b91867b8 100644
--- a/sound/soc/generic/simple-card.c
+++ b/sound/soc/generic/simple-card.c
@@ -118,13 +118,13 @@ static int asoc_simple_card_startup(struct snd_pcm_substream *substream)
 		simple_priv_to_props(priv, rtd->num);
 	int ret;
 
-	ret = clk_prepare_enable(dai_props->cpu_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->cpu_dai);
 	if (ret)
 		return ret;
 
-	ret = clk_prepare_enable(dai_props->codec_dai.clk);
+	ret = asoc_simple_card_clk_enable(&dai_props->codec_dai);
 	if (ret)
-		clk_disable_unprepare(dai_props->cpu_dai.clk);
+		asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
 	return ret;
 }
@@ -136,9 +136,9 @@ static void asoc_simple_card_shutdown(struct snd_pcm_substream *substream)
 	struct simple_dai_props *dai_props =
 		simple_priv_to_props(priv, rtd->num);
 
-	clk_disable_unprepare(dai_props->cpu_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->cpu_dai);
 
-	clk_disable_unprepare(dai_props->codec_dai.clk);
+	asoc_simple_card_clk_disable(&dai_props->codec_dai);
 }
 
 static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
-- 
2.11.0

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

end of thread, other threads:[~2017-06-13 21:07 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-07  0:28 [PATCH 0/5] ASoC: add/use asoc_simple_card_clk_enable/disable() Kuninori Morimoto
2017-06-07  0:28 ` Kuninori Morimoto
2017-06-07  0:29 ` [PATCH 1/5] ASoC: simple_card_utils: add asoc_simple_card_clk_enable/disable() Kuninori Morimoto
2017-06-07  0:29   ` Kuninori Morimoto
2017-06-08 14:50   ` Mark Brown
2017-06-08 23:39     ` Kuninori Morimoto
2017-06-08 23:39       ` Kuninori Morimoto
2017-06-07  0:29 ` [PATCH 2/5] ASoC: simple-card: use asoc_simple_card_clk_enable/disable() Kuninori Morimoto
2017-06-07  0:29   ` Kuninori Morimoto
2017-06-13 21:07   ` Applied "ASoC: simple-card: use asoc_simple_card_clk_xxx()" to the asoc tree Mark Brown
2017-06-13 21:07     ` Mark Brown
2017-06-07  0:29 ` [PATCH 3/5] ASoC: simple-scu-card: use asoc_simple_card_clk_enable/disable() Kuninori Morimoto
2017-06-07  0:29   ` Kuninori Morimoto
2017-06-13 21:07   ` Applied "ASoC: simple-scu-card: use asoc_simple_card_clk_xxx()" to the asoc tree Mark Brown
2017-06-13 21:07     ` Mark Brown
2017-06-07  0:29 ` [PATCH 4/5] ASoC: audio-graph-scu-card: use asoc_simple_card_clk_enable/disable() Kuninori Morimoto
2017-06-07  0:29   ` Kuninori Morimoto
2017-06-13 21:07   ` Applied "ASoC: audio-graph-scu-card: use asoc_simple_card_clk_xxx()" to the asoc tree Mark Brown
2017-06-13 21:07     ` Mark Brown
2017-06-07  0:30 ` [PATCH 5/5] ASoC: audio-graph-card: use asoc_simple_card_clk_enable/disable() Kuninori Morimoto
2017-06-07  0:30   ` Kuninori Morimoto
2017-06-13 21:07   ` Applied "ASoC: audio-graph-card: use asoc_simple_card_clk_xxx()" to the asoc tree Mark Brown
2017-06-13 21:07     ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.