All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] ASoC: Revert clk_hw_get_clk() cleanup
@ 2021-04-28 12:26 ` Jerome Brunet
  0 siblings, 0 replies; 9+ messages in thread
From: Jerome Brunet @ 2021-04-28 12:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: Jerome Brunet, alsa-devel, linux-kernel, Stephen Boyd

There is problem with clk_hw_get_hw(). Using it pins the clock provider to
itself, making it impossible to remove the related module.

Revert the two commits using this function until this gets sorted out.

Jerome Brunet (2):
  ASoC: stm32: do not request a new clock consummer reference
  ASoC: da7219: do not request a new clock consummer reference

 sound/soc/codecs/da7219.c     | 5 +----
 sound/soc/stm/stm32_sai_sub.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

-- 
2.31.1


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

* [PATCH 0/2] ASoC: Revert clk_hw_get_clk() cleanup
@ 2021-04-28 12:26 ` Jerome Brunet
  0 siblings, 0 replies; 9+ messages in thread
From: Jerome Brunet @ 2021-04-28 12:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: Stephen Boyd, alsa-devel, linux-kernel, Jerome Brunet

There is problem with clk_hw_get_hw(). Using it pins the clock provider to
itself, making it impossible to remove the related module.

Revert the two commits using this function until this gets sorted out.

Jerome Brunet (2):
  ASoC: stm32: do not request a new clock consummer reference
  ASoC: da7219: do not request a new clock consummer reference

 sound/soc/codecs/da7219.c     | 5 +----
 sound/soc/stm/stm32_sai_sub.c | 5 +----
 2 files changed, 2 insertions(+), 8 deletions(-)

-- 
2.31.1


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

* [PATCH 1/2] ASoC: stm32: do not request a new clock consummer reference
  2021-04-28 12:26 ` Jerome Brunet
@ 2021-04-28 12:26   ` Jerome Brunet
  -1 siblings, 0 replies; 9+ messages in thread
From: Jerome Brunet @ 2021-04-28 12:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: Jerome Brunet, alsa-devel, linux-kernel, Stephen Boyd

This reverts commit 65d1cce726d4912793d0a84c55ecdb0ef5832130.

There is problem with clk_hw_get_hw(). Using it pins the clock provider to
itself, making it impossible to remove the module.

Revert commit 65d1cce726d4 ("ASoC: stm32: properly get clk from the
provider") until this gets sorted out.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 sound/soc/stm/stm32_sai_sub.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index c1561237ee24..3aa1cf262402 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -484,10 +484,7 @@ static int stm32_sai_add_mclk_provider(struct stm32_sai_sub_data *sai)
 		dev_err(dev, "mclk register returned %d\n", ret);
 		return ret;
 	}
-
-	sai->sai_mclk = devm_clk_hw_get_clk(dev, hw, NULL);
-	if (IS_ERR(sai->sai_mclk))
-		return PTR_ERR(sai->sai_mclk);
+	sai->sai_mclk = hw->clk;
 
 	/* register mclk provider */
 	return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, hw);
-- 
2.31.1


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

* [PATCH 1/2] ASoC: stm32: do not request a new clock consummer reference
@ 2021-04-28 12:26   ` Jerome Brunet
  0 siblings, 0 replies; 9+ messages in thread
From: Jerome Brunet @ 2021-04-28 12:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: Stephen Boyd, alsa-devel, linux-kernel, Jerome Brunet

This reverts commit 65d1cce726d4912793d0a84c55ecdb0ef5832130.

There is problem with clk_hw_get_hw(). Using it pins the clock provider to
itself, making it impossible to remove the module.

Revert commit 65d1cce726d4 ("ASoC: stm32: properly get clk from the
provider") until this gets sorted out.

Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 sound/soc/stm/stm32_sai_sub.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/stm/stm32_sai_sub.c b/sound/soc/stm/stm32_sai_sub.c
index c1561237ee24..3aa1cf262402 100644
--- a/sound/soc/stm/stm32_sai_sub.c
+++ b/sound/soc/stm/stm32_sai_sub.c
@@ -484,10 +484,7 @@ static int stm32_sai_add_mclk_provider(struct stm32_sai_sub_data *sai)
 		dev_err(dev, "mclk register returned %d\n", ret);
 		return ret;
 	}
-
-	sai->sai_mclk = devm_clk_hw_get_clk(dev, hw, NULL);
-	if (IS_ERR(sai->sai_mclk))
-		return PTR_ERR(sai->sai_mclk);
+	sai->sai_mclk = hw->clk;
 
 	/* register mclk provider */
 	return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, hw);
-- 
2.31.1


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

* [PATCH 2/2] ASoC: da7219: do not request a new clock consummer reference
  2021-04-28 12:26 ` Jerome Brunet
@ 2021-04-28 12:26   ` Jerome Brunet
  -1 siblings, 0 replies; 9+ messages in thread
From: Jerome Brunet @ 2021-04-28 12:26 UTC (permalink / raw)
  To: Mark Brown
  Cc: Jerome Brunet, alsa-devel, linux-kernel, Stephen Boyd,
	Pierre-Louis Bossart

This reverts commit 12f8127fe9e6154dd4197df97e44f3fd67583071.

There is problem with clk_hw_get_hw(). Using it pins the clock provider to
itself, making it impossible to remove the module.

Revert commit 12f8127fe9e6 ("ASoC: da7219: properly get clk from the
provider") until this gets sorted out.

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 sound/soc/codecs/da7219.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index bd3c523a8617..13009d08b09a 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -2181,10 +2181,7 @@ static int da7219_register_dai_clks(struct snd_soc_component *component)
 				 ret);
 			goto err;
 		}
-
-		da7219->dai_clks[i] = devm_clk_hw_get_clk(dev, dai_clk_hw, NULL);
-		if (IS_ERR(da7219->dai_clks[i]))
-			return PTR_ERR(da7219->dai_clks[i]);
+		da7219->dai_clks[i] = dai_clk_hw->clk;
 
 		/* For DT setup onecell data, otherwise create lookup */
 		if (np) {
-- 
2.31.1


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

* [PATCH 2/2] ASoC: da7219: do not request a new clock consummer reference
@ 2021-04-28 12:26   ` Jerome Brunet
  0 siblings, 0 replies; 9+ messages in thread
From: Jerome Brunet @ 2021-04-28 12:26 UTC (permalink / raw)
  To: Mark Brown
  Cc: Stephen Boyd, Pierre-Louis Bossart, alsa-devel, linux-kernel,
	Jerome Brunet

This reverts commit 12f8127fe9e6154dd4197df97e44f3fd67583071.

There is problem with clk_hw_get_hw(). Using it pins the clock provider to
itself, making it impossible to remove the module.

Revert commit 12f8127fe9e6 ("ASoC: da7219: properly get clk from the
provider") until this gets sorted out.

Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
 sound/soc/codecs/da7219.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
index bd3c523a8617..13009d08b09a 100644
--- a/sound/soc/codecs/da7219.c
+++ b/sound/soc/codecs/da7219.c
@@ -2181,10 +2181,7 @@ static int da7219_register_dai_clks(struct snd_soc_component *component)
 				 ret);
 			goto err;
 		}
-
-		da7219->dai_clks[i] = devm_clk_hw_get_clk(dev, dai_clk_hw, NULL);
-		if (IS_ERR(da7219->dai_clks[i]))
-			return PTR_ERR(da7219->dai_clks[i]);
+		da7219->dai_clks[i] = dai_clk_hw->clk;
 
 		/* For DT setup onecell data, otherwise create lookup */
 		if (np) {
-- 
2.31.1


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

* Re: [PATCH 2/2] ASoC: da7219: do not request a new clock consummer reference
  2021-04-28 12:26   ` Jerome Brunet
  (?)
@ 2021-04-28 15:17   ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 9+ messages in thread
From: Pierre-Louis Bossart @ 2021-04-28 15:17 UTC (permalink / raw)
  To: Jerome Brunet, Mark Brown; +Cc: Stephen Boyd, alsa-devel, linux-kernel



On 4/28/21 7:26 AM, Jerome Brunet wrote:
> This reverts commit 12f8127fe9e6154dd4197df97e44f3fd67583071.
> 
> There is problem with clk_hw_get_hw(). Using it pins the clock provider to
> itself, making it impossible to remove the module.
> 
> Revert commit 12f8127fe9e6 ("ASoC: da7219: properly get clk from the
> provider") until this gets sorted out.
> 
> Reported-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>

I added this patch in the SOF tree and the CI results are back to 
normal: https://sof-ci.01.org/linuxpr/PR2879/build5689/devicetest/

Tested-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>

Thanks Jerome, this was a surprising/hard-to-detect side effect.

> ---
>   sound/soc/codecs/da7219.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c
> index bd3c523a8617..13009d08b09a 100644
> --- a/sound/soc/codecs/da7219.c
> +++ b/sound/soc/codecs/da7219.c
> @@ -2181,10 +2181,7 @@ static int da7219_register_dai_clks(struct snd_soc_component *component)
>   				 ret);
>   			goto err;
>   		}
> -
> -		da7219->dai_clks[i] = devm_clk_hw_get_clk(dev, dai_clk_hw, NULL);
> -		if (IS_ERR(da7219->dai_clks[i]))
> -			return PTR_ERR(da7219->dai_clks[i]);
> +		da7219->dai_clks[i] = dai_clk_hw->clk;
>   
>   		/* For DT setup onecell data, otherwise create lookup */
>   		if (np) {
> 

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

* Re: [PATCH 0/2] ASoC: Revert clk_hw_get_clk() cleanup
  2021-04-28 12:26 ` Jerome Brunet
@ 2021-04-28 16:53   ` Mark Brown
  -1 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2021-04-28 16:53 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: Mark Brown, alsa-devel, Stephen Boyd, linux-kernel

On Wed, 28 Apr 2021 14:26:30 +0200, Jerome Brunet wrote:
> There is problem with clk_hw_get_hw(). Using it pins the clock provider to
> itself, making it impossible to remove the related module.
> 
> Revert the two commits using this function until this gets sorted out.
> 
> Jerome Brunet (2):
>   ASoC: stm32: do not request a new clock consummer reference
>   ASoC: da7219: do not request a new clock consummer reference
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: stm32: do not request a new clock consummer reference
      commit: a0695853e5906a9558eef9f79856e07659b7a1e6
[2/2] ASoC: da7219: do not request a new clock consummer reference
      commit: 97c733654ab4a5ac910216b4b74e605acf3e1cce

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

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

* Re: [PATCH 0/2] ASoC: Revert clk_hw_get_clk() cleanup
@ 2021-04-28 16:53   ` Mark Brown
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2021-04-28 16:53 UTC (permalink / raw)
  To: Jerome Brunet; +Cc: Stephen Boyd, alsa-devel, Mark Brown, linux-kernel

On Wed, 28 Apr 2021 14:26:30 +0200, Jerome Brunet wrote:
> There is problem with clk_hw_get_hw(). Using it pins the clock provider to
> itself, making it impossible to remove the related module.
> 
> Revert the two commits using this function until this gets sorted out.
> 
> Jerome Brunet (2):
>   ASoC: stm32: do not request a new clock consummer reference
>   ASoC: da7219: do not request a new clock consummer reference
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[1/2] ASoC: stm32: do not request a new clock consummer reference
      commit: a0695853e5906a9558eef9f79856e07659b7a1e6
[2/2] ASoC: da7219: do not request a new clock consummer reference
      commit: 97c733654ab4a5ac910216b4b74e605acf3e1cce

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

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

end of thread, other threads:[~2021-04-28 16:56 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28 12:26 [PATCH 0/2] ASoC: Revert clk_hw_get_clk() cleanup Jerome Brunet
2021-04-28 12:26 ` Jerome Brunet
2021-04-28 12:26 ` [PATCH 1/2] ASoC: stm32: do not request a new clock consummer reference Jerome Brunet
2021-04-28 12:26   ` Jerome Brunet
2021-04-28 12:26 ` [PATCH 2/2] ASoC: da7219: " Jerome Brunet
2021-04-28 12:26   ` Jerome Brunet
2021-04-28 15:17   ` Pierre-Louis Bossart
2021-04-28 16:53 ` [PATCH 0/2] ASoC: Revert clk_hw_get_clk() cleanup Mark Brown
2021-04-28 16:53   ` 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.