Skip to contentSkip to conversation

ASoC: Revert clk_hw_get_clk() cleanup

PATCH In review Jerome Brunet 3 participants 5 messages Apr 28, 2021

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover ASoC: Revert clk_hw_get_clk() cleanup

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(-)
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/2 ASoC: stm32: do not request a new clock consummer reference

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.

---
 sound/soc/stm/stm32_sai_sub.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
sound/soc/stm/stm32_sai_sub.c +1 -4
index c1561237ee24..3aa1cf262402 100644
@@ -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);
Signature · 1 line
2.31.1
#2 lore raw

PATCH 2/2 ASoC: da7219: do not request a new clock consummer reference

In reply to 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.

---
 sound/soc/codecs/da7219.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
sound/soc/codecs/da7219.c +1 -4
index bd3c523a8617..13009d08b09a 100644
@@ -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) {
Signature · 1 line
2.31.1
Tested-by on v1 2/2
#3 lore raw

Re: [PATCH 2/2] ASoC: da7219: do not request a new clock consummer reference

Quoted 10 lines · 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.

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/

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

Quoted 21 lines
---
  sound/soc/codecs/da7219.c | 5 +----
  1 file changed, 1 insertion(+), 4 deletions(-)
sound/soc/codecs/da7219.c +1 -4
index bd3c523a8617..13009d08b09a 100644
@@ -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) {
maintainer
#4 lore raw
In reply to Jerome Brunet
Quoted 10 lines · 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

[...]

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