[PATCH 0/2] 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(-)
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);
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) {
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) {
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
participants (3)
-
Jerome Brunet
-
Mark Brown
-
Pierre-Louis Bossart