All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: rcar: fixup of_clk_xxx_provider()
@ 2017-03-30  1:48 ` Kuninori Morimoto
  0 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-30  1:48 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc


Hi Mark

These are bugfix for Renesas R-Car sound clock.
The issue will happen if I do bind/unbind many times.

Kuninori Morimoto (2):
  ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout
  ASoC: rcar: call missing of_clk_del_provider() when remove

 sound/soc/sh/rcar/adg.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

-- 
1.9.1

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

* [PATCH 0/2] ASoC: rcar: fixup of_clk_xxx_provider()
@ 2017-03-30  1:48 ` Kuninori Morimoto
  0 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-30  1:48 UTC (permalink / raw)
  To: Mark Brown; +Cc: linux-renesas-soc, Linux-ALSA, Simon


Hi Mark

These are bugfix for Renesas R-Car sound clock.
The issue will happen if I do bind/unbind many times.

Kuninori Morimoto (2):
  ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout
  ASoC: rcar: call missing of_clk_del_provider() when remove

 sound/soc/sh/rcar/adg.c | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

-- 
1.9.1

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

* [PATCH 1/2] ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout
  2017-03-30  1:48 ` Kuninori Morimoto
@ 2017-03-30  1:49   ` Kuninori Morimoto
  -1 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-30  1:49 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

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

Current adg is calling of_clk_add_povider() multiple times,
but it is not correct usage. This patch fixup its parameter
and call it once.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/adg.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 54146f6..3337861 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -537,16 +537,14 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
 			clk = clk_register_fixed_rate(dev, clkout_name[i],
 						      parent_clk_name, 0,
 						      req_rate);
-			if (!IS_ERR(clk)) {
-				adg->onecell.clks	= adg->clkout;
-				adg->onecell.clk_num	= CLKOUTMAX;
-
+			adg->clkout[i] = ERR_PTR(-ENOENT);
+			if (!IS_ERR(clk))
 				adg->clkout[i] = clk;
-
-				of_clk_add_provider(np, of_clk_src_onecell_get,
-						    &adg->onecell);
-			}
 		}
+		adg->onecell.clks	= adg->clkout;
+		adg->onecell.clk_num	= CLKOUTMAX;
+		of_clk_add_provider(np, of_clk_src_onecell_get,
+				    &adg->onecell);
 	}
 
 	adg->ckr = ckr;
-- 
1.9.1

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

* [PATCH 1/2] ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout
@ 2017-03-30  1:49   ` Kuninori Morimoto
  0 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-30  1:49 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

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

Current adg is calling of_clk_add_povider() multiple times,
but it is not correct usage. This patch fixup its parameter
and call it once.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/adg.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 54146f6..3337861 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -537,16 +537,14 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
 			clk = clk_register_fixed_rate(dev, clkout_name[i],
 						      parent_clk_name, 0,
 						      req_rate);
-			if (!IS_ERR(clk)) {
-				adg->onecell.clks	= adg->clkout;
-				adg->onecell.clk_num	= CLKOUTMAX;
-
+			adg->clkout[i] = ERR_PTR(-ENOENT);
+			if (!IS_ERR(clk))
 				adg->clkout[i] = clk;
-
-				of_clk_add_provider(np, of_clk_src_onecell_get,
-						    &adg->onecell);
-			}
 		}
+		adg->onecell.clks	= adg->clkout;
+		adg->onecell.clk_num	= CLKOUTMAX;
+		of_clk_add_provider(np, of_clk_src_onecell_get,
+				    &adg->onecell);
 	}
 
 	adg->ckr = ckr;
-- 
1.9.1

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

* [PATCH 2/2] ASoC: rcar: call missing of_clk_del_provider() when remove
  2017-03-30  1:48 ` Kuninori Morimoto
@ 2017-03-30  1:49   ` Kuninori Morimoto
  -1 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-30  1:49 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

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

adg is calling of_clk_add_provider() when probe time,
thus, remove should call of_clk_del_provider(), it doesn't now.
This patch fix this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/adg.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 3337861..214a9ce 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -590,5 +590,10 @@ int rsnd_adg_probe(struct rsnd_priv *priv)
 
 void rsnd_adg_remove(struct rsnd_priv *priv)
 {
+	struct device *dev = rsnd_priv_to_dev(priv);
+	struct device_node *np = dev->of_node;
+
+	of_clk_del_provider(np);
+
 	rsnd_adg_clk_disable(priv);
 }
-- 
1.9.1

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

* [PATCH 2/2] ASoC: rcar: call missing of_clk_del_provider() when remove
@ 2017-03-30  1:49   ` Kuninori Morimoto
  0 siblings, 0 replies; 10+ messages in thread
From: Kuninori Morimoto @ 2017-03-30  1:49 UTC (permalink / raw)
  To: Mark Brown; +Cc: Linux-ALSA, Simon, linux-renesas-soc

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

adg is calling of_clk_add_provider() when probe time,
thus, remove should call of_clk_del_provider(), it doesn't now.
This patch fix this issue.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/sh/rcar/adg.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 3337861..214a9ce 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -590,5 +590,10 @@ int rsnd_adg_probe(struct rsnd_priv *priv)
 
 void rsnd_adg_remove(struct rsnd_priv *priv)
 {
+	struct device *dev = rsnd_priv_to_dev(priv);
+	struct device_node *np = dev->of_node;
+
+	of_clk_del_provider(np);
+
 	rsnd_adg_clk_disable(priv);
 }
-- 
1.9.1

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

* Applied "ASoC: rcar: call missing of_clk_del_provider() when remove" to the asoc tree
  2017-03-30  1:49   ` Kuninori Morimoto
@ 2017-03-30 21:22     ` Mark Brown
  -1 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2017-03-30 21:22 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Brown, Mark Brown, linux-renesas-soc, Linux-ALSA, Simon, alsa-devel

The patch

   ASoC: rcar: call missing of_clk_del_provider() when remove

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 b5aac5a9adf667f907c34c520e023bc19f8c226c Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 30 Mar 2017 01:49:27 +0000
Subject: [PATCH] ASoC: rcar: call missing of_clk_del_provider() when remove

adg is calling of_clk_add_provider() when probe time,
thus, remove should call of_clk_del_provider(), it doesn't now.
This patch fix this issue.

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

diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 56107454bdb3..9665c1fa7216 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -587,5 +587,10 @@ int rsnd_adg_probe(struct rsnd_priv *priv)
 
 void rsnd_adg_remove(struct rsnd_priv *priv)
 {
+	struct device *dev = rsnd_priv_to_dev(priv);
+	struct device_node *np = dev->of_node;
+
+	of_clk_del_provider(np);
+
 	rsnd_adg_clk_disable(priv);
 }
-- 
2.11.0

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

* Applied "ASoC: rcar: call missing of_clk_del_provider() when remove" to the asoc tree
@ 2017-03-30 21:22     ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2017-03-30 21:22 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Mark Brown

The patch

   ASoC: rcar: call missing of_clk_del_provider() when remove

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 b5aac5a9adf667f907c34c520e023bc19f8c226c Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 30 Mar 2017 01:49:27 +0000
Subject: [PATCH] ASoC: rcar: call missing of_clk_del_provider() when remove

adg is calling of_clk_add_provider() when probe time,
thus, remove should call of_clk_del_provider(), it doesn't now.
This patch fix this issue.

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

diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 56107454bdb3..9665c1fa7216 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -587,5 +587,10 @@ int rsnd_adg_probe(struct rsnd_priv *priv)
 
 void rsnd_adg_remove(struct rsnd_priv *priv)
 {
+	struct device *dev = rsnd_priv_to_dev(priv);
+	struct device_node *np = dev->of_node;
+
+	of_clk_del_provider(np);
+
 	rsnd_adg_clk_disable(priv);
 }
-- 
2.11.0

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

* Applied "ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout" to the asoc tree
  2017-03-30  1:49   ` Kuninori Morimoto
@ 2017-03-30 21:23     ` Mark Brown
  -1 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2017-03-30 21:23 UTC (permalink / raw)
  To: Kuninori Morimoto
  Cc: Mark Brown, Mark Brown, linux-renesas-soc, Linux-ALSA, Simon, alsa-devel

The patch

   ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout

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 d7f298197a22f11b38059f257842dac7c30a564c Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 30 Mar 2017 01:49:06 +0000
Subject: [PATCH] ASoC: rcar: fixup of_clk_add_provider() usage for multi
 clkout

Current adg is calling of_clk_add_povider() multiple times,
but it is not correct usage. This patch fixup its parameter
and call it once.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sh/rcar/adg.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 85a33ac0a5c4..56107454bdb3 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -537,16 +537,14 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
 			clk = clk_register_fixed_rate(dev, clkout_name[i],
 						      parent_clk_name, 0,
 						      req_rate);
-			if (!IS_ERR(clk)) {
-				adg->onecell.clks	= adg->clkout;
-				adg->onecell.clk_num	= CLKOUTMAX;
-
+			adg->clkout[i] = ERR_PTR(-ENOENT);
+			if (!IS_ERR(clk))
 				adg->clkout[i] = clk;
-
-				of_clk_add_provider(np, of_clk_src_onecell_get,
-						    &adg->onecell);
-			}
 		}
+		adg->onecell.clks	= adg->clkout;
+		adg->onecell.clk_num	= CLKOUTMAX;
+		of_clk_add_provider(np, of_clk_src_onecell_get,
+				    &adg->onecell);
 	}
 
 	adg->ckr = ckr;
-- 
2.11.0

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

* Applied "ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout" to the asoc tree
@ 2017-03-30 21:23     ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2017-03-30 21:23 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: Mark Brown

The patch

   ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout

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 d7f298197a22f11b38059f257842dac7c30a564c Mon Sep 17 00:00:00 2001
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Date: Thu, 30 Mar 2017 01:49:06 +0000
Subject: [PATCH] ASoC: rcar: fixup of_clk_add_provider() usage for multi
 clkout

Current adg is calling of_clk_add_povider() multiple times,
but it is not correct usage. This patch fixup its parameter
and call it once.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/sh/rcar/adg.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
index 85a33ac0a5c4..56107454bdb3 100644
--- a/sound/soc/sh/rcar/adg.c
+++ b/sound/soc/sh/rcar/adg.c
@@ -537,16 +537,14 @@ static void rsnd_adg_get_clkout(struct rsnd_priv *priv,
 			clk = clk_register_fixed_rate(dev, clkout_name[i],
 						      parent_clk_name, 0,
 						      req_rate);
-			if (!IS_ERR(clk)) {
-				adg->onecell.clks	= adg->clkout;
-				adg->onecell.clk_num	= CLKOUTMAX;
-
+			adg->clkout[i] = ERR_PTR(-ENOENT);
+			if (!IS_ERR(clk))
 				adg->clkout[i] = clk;
-
-				of_clk_add_provider(np, of_clk_src_onecell_get,
-						    &adg->onecell);
-			}
 		}
+		adg->onecell.clks	= adg->clkout;
+		adg->onecell.clk_num	= CLKOUTMAX;
+		of_clk_add_provider(np, of_clk_src_onecell_get,
+				    &adg->onecell);
 	}
 
 	adg->ckr = ckr;
-- 
2.11.0

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

end of thread, other threads:[~2017-03-30 21:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-30  1:48 [PATCH 0/2] ASoC: rcar: fixup of_clk_xxx_provider() Kuninori Morimoto
2017-03-30  1:48 ` Kuninori Morimoto
2017-03-30  1:49 ` [PATCH 1/2] ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout Kuninori Morimoto
2017-03-30  1:49   ` Kuninori Morimoto
2017-03-30 21:23   ` Applied "ASoC: rcar: fixup of_clk_add_provider() usage for multi clkout" to the asoc tree Mark Brown
2017-03-30 21:23     ` Mark Brown
2017-03-30  1:49 ` [PATCH 2/2] ASoC: rcar: call missing of_clk_del_provider() when remove Kuninori Morimoto
2017-03-30  1:49   ` Kuninori Morimoto
2017-03-30 21:22   ` Applied "ASoC: rcar: call missing of_clk_del_provider() when remove" to the asoc tree Mark Brown
2017-03-30 21:22     ` 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.