linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASoC: qcom: lpass-cpu: Use optional clk APIs
@ 2021-05-20  1:48 Stephen Boyd
  2021-05-21  9:34 ` Srinivas Kandagatla
  2021-05-21 15:08 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Stephen Boyd @ 2021-05-20  1:48 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-kernel, alsa-devel, linux-arm-msm, Srinivas Kandagatla,
	Banajit Goswami

This driver spits out a warning for me at boot:

 sc7180-lpass-cpu 62f00000.lpass: asoc_qcom_lpass_cpu_platform_probe() error getting optional null: -2

but it looks like it is all an optional clk. Use the optional clk APIs
here so that we don't see this message and everything else is the same.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Banajit Goswami <bgoswami@codeaurora.org>
Fixes: 3e53ac8230c1 ("ASoC: qcom: make osr clock optional")
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
---
 sound/soc/qcom/lpass-cpu.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
index c62d2612e8f5..28c7497344e3 100644
--- a/sound/soc/qcom/lpass-cpu.c
+++ b/sound/soc/qcom/lpass-cpu.c
@@ -835,18 +835,8 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
 		if (dai_id == LPASS_DP_RX)
 			continue;
 
-		drvdata->mi2s_osr_clk[dai_id] = devm_clk_get(dev,
+		drvdata->mi2s_osr_clk[dai_id] = devm_clk_get_optional(dev,
 					     variant->dai_osr_clk_names[i]);
-		if (IS_ERR(drvdata->mi2s_osr_clk[dai_id])) {
-			dev_warn(dev,
-				"%s() error getting optional %s: %ld\n",
-				__func__,
-				variant->dai_osr_clk_names[i],
-				PTR_ERR(drvdata->mi2s_osr_clk[dai_id]));
-
-			drvdata->mi2s_osr_clk[dai_id] = NULL;
-		}
-
 		drvdata->mi2s_bit_clk[dai_id] = devm_clk_get(dev,
 						variant->dai_bit_clk_names[i]);
 		if (IS_ERR(drvdata->mi2s_bit_clk[dai_id])) {

base-commit: 6efb943b8616ec53a5e444193dccf1af9ad627b5
-- 
https://chromeos.dev


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

* Re: [PATCH] ASoC: qcom: lpass-cpu: Use optional clk APIs
  2021-05-20  1:48 [PATCH] ASoC: qcom: lpass-cpu: Use optional clk APIs Stephen Boyd
@ 2021-05-21  9:34 ` Srinivas Kandagatla
  2021-05-21 15:08 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Srinivas Kandagatla @ 2021-05-21  9:34 UTC (permalink / raw)
  To: Stephen Boyd, Mark Brown
  Cc: linux-kernel, alsa-devel, linux-arm-msm, Banajit Goswami

Thanks Stephen for patch.

On 20/05/2021 02:48, Stephen Boyd wrote:
> This driver spits out a warning for me at boot:
> 
>   sc7180-lpass-cpu 62f00000.lpass: asoc_qcom_lpass_cpu_platform_probe() error getting optional null: -2
> 
> but it looks like it is all an optional clk. Use the optional clk APIs
> here so that we don't see this message and everything else is the same.
> 
> Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> Cc: Banajit Goswami <bgoswami@codeaurora.org>
> Fixes: 3e53ac8230c1 ("ASoC: qcom: make osr clock optional")
> Signed-off-by: Stephen Boyd <swboyd@chromium.org>

Lgtm,

Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>


--srini

> ---
>   sound/soc/qcom/lpass-cpu.c | 12 +-----------
>   1 file changed, 1 insertion(+), 11 deletions(-)
> 
> diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
> index c62d2612e8f5..28c7497344e3 100644
> --- a/sound/soc/qcom/lpass-cpu.c
> +++ b/sound/soc/qcom/lpass-cpu.c
> @@ -835,18 +835,8 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
>   		if (dai_id == LPASS_DP_RX)
>   			continue;
>   
> -		drvdata->mi2s_osr_clk[dai_id] = devm_clk_get(dev,
> +		drvdata->mi2s_osr_clk[dai_id] = devm_clk_get_optional(dev,
>   					     variant->dai_osr_clk_names[i]);
> -		if (IS_ERR(drvdata->mi2s_osr_clk[dai_id])) {
> -			dev_warn(dev,
> -				"%s() error getting optional %s: %ld\n",
> -				__func__,
> -				variant->dai_osr_clk_names[i],
> -				PTR_ERR(drvdata->mi2s_osr_clk[dai_id]));
> -
> -			drvdata->mi2s_osr_clk[dai_id] = NULL;
> -		}
> -
>   		drvdata->mi2s_bit_clk[dai_id] = devm_clk_get(dev,
>   						variant->dai_bit_clk_names[i]);
>   		if (IS_ERR(drvdata->mi2s_bit_clk[dai_id])) {
> 
> base-commit: 6efb943b8616ec53a5e444193dccf1af9ad627b5
> 

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

* Re: [PATCH] ASoC: qcom: lpass-cpu: Use optional clk APIs
  2021-05-20  1:48 [PATCH] ASoC: qcom: lpass-cpu: Use optional clk APIs Stephen Boyd
  2021-05-21  9:34 ` Srinivas Kandagatla
@ 2021-05-21 15:08 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2021-05-21 15:08 UTC (permalink / raw)
  To: Stephen Boyd
  Cc: Mark Brown, linux-kernel, alsa-devel, Banajit Goswami, linux-arm-msm

On Wed, 19 May 2021 18:48:07 -0700, Stephen Boyd wrote:
> This driver spits out a warning for me at boot:
> 
>  sc7180-lpass-cpu 62f00000.lpass: asoc_qcom_lpass_cpu_platform_probe() error getting optional null: -2
> 
> but it looks like it is all an optional clk. Use the optional clk APIs
> here so that we don't see this message and everything else is the same.

Applied to

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

Thanks!

[1/1] ASoC: qcom: lpass-cpu: Use optional clk APIs
      commit: af2702549d68519ac78228e915d9b2c199056787

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] 3+ messages in thread

end of thread, other threads:[~2021-05-21 15:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20  1:48 [PATCH] ASoC: qcom: lpass-cpu: Use optional clk APIs Stephen Boyd
2021-05-21  9:34 ` Srinivas Kandagatla
2021-05-21 15:08 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).