From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Ajit Pandey <ajitp@codeaurora.org>,
alsa-devel@alsa-project.org, broonie@kernel.org,
devicetree@vger.kernel.org, plai@codeaurora.org,
bgoswami@codeaurora.org
Cc: linux-kernel@vger.kernel.org, tiwai@suse.com
Subject: Re: [PATCH 04/11] ASoC: qcom: lpass-cpu: Make "ahbix-clk" an optional clock.
Date: Thu, 16 Apr 2020 08:56:26 +0100 [thread overview]
Message-ID: <090b1b81-3c33-7d37-e0bb-a5f73ab76ad0@linaro.org> (raw)
In-Reply-To: <1586592171-31644-5-git-send-email-ajitp@codeaurora.org>
On 11/04/2020 09:02, Ajit Pandey wrote:
> AHB-I/X bus clocks inside LPASS coreis not a mandatory clocks for
s/coreis/core is/
> newer lpass variants, hence make it an optional one.
>
Can you add more detail on which version of IP would not have this clk.
> Signed-off-by: Ajit Pandey <ajitp@codeaurora.org>
> ---
> sound/soc/qcom/lpass-cpu.c | 31 ++++++++++++++++++-------------
> 1 file changed, 18 insertions(+), 13 deletions(-)
>
> diff --git a/sound/soc/qcom/lpass-cpu.c b/sound/soc/qcom/lpass-cpu.c
> index 492f27b..f177932 100644
> --- a/sound/soc/qcom/lpass-cpu.c
> +++ b/sound/soc/qcom/lpass-cpu.c
> @@ -504,26 +504,31 @@ int asoc_qcom_lpass_cpu_platform_probe(struct platform_device *pdev)
> return ret;
> }
>
> - drvdata->ahbix_clk = devm_clk_get(&pdev->dev, "ahbix-clk");
> + drvdata->ahbix_clk = devm_clk_get_optional(&pdev->dev, "ahbix-clk");
> if (IS_ERR(drvdata->ahbix_clk)) {
> dev_err(&pdev->dev, "error getting ahbix-clk: %ld\n",
> PTR_ERR(drvdata->ahbix_clk));
> return PTR_ERR(drvdata->ahbix_clk);
> }
>
> - ret = clk_set_rate(drvdata->ahbix_clk, LPASS_AHBIX_CLOCK_FREQUENCY);
> - if (ret) {
> - dev_err(&pdev->dev, "error setting rate on ahbix_clk: %d\n",
> - ret);
> - return ret;
> - }
> - dev_dbg(&pdev->dev, "set ahbix_clk rate to %lu\n",
> - clk_get_rate(drvdata->ahbix_clk));
> + if (drvdata->ahbix_clk != NULL) {
No need for NULL checks here, clk apis already have checks.
--srini
> + ret = clk_set_rate(drvdata->ahbix_clk,
> + LPASS_AHBIX_CLOCK_FREQUENCY);
> + if (ret) {
> + dev_err(&pdev->dev,
> + "error setting rate on ahbix_clk: %d\n", ret);
> + return ret;
> + }
>
> - ret = clk_prepare_enable(drvdata->ahbix_clk);
> - if (ret) {
> - dev_err(&pdev->dev, "error enabling ahbix_clk: %d\n", ret);
> - return ret;
> + dev_dbg(&pdev->dev, "set ahbix_clk rate to %lu\n",
> + clk_get_rate(drvdata->ahbix_clk));
> +
> + ret = clk_prepare_enable(drvdata->ahbix_clk);
> + if (ret) {
> + dev_err(&pdev->dev,
> + "error enabling ahbix_clk: %d\n", ret);
> + return ret;
> + }
> }
>
> ret = devm_snd_soc_register_component(&pdev->dev,
>
next prev parent reply other threads:[~2020-04-16 7:56 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-11 8:02 [PATCH 00/11] ASoC: QCOM: Add support for SC7180 lpass variant Ajit Pandey
2020-04-11 8:02 ` [PATCH 01/11] Documentation: device-tree: sound: Update lpass-cpu driver binding Ajit Pandey
2020-04-16 7:53 ` Srinivas Kandagatla
2020-04-25 14:05 ` Ajit Pandey
2020-04-11 8:02 ` [PATCH 02/11] ASoC: qcom: lpass: Add struct lpass_dai to store dai clocks pointer Ajit Pandey
2020-04-16 7:56 ` Srinivas Kandagatla
2020-04-25 14:11 ` Ajit Pandey
2020-04-11 8:02 ` [PATCH 03/11] ASoC: qcom: Add common array to initialize soc based core clocks Ajit Pandey
2020-04-11 8:02 ` [PATCH 04/11] ASoC: qcom: lpass-cpu: Make "ahbix-clk" an optional clock Ajit Pandey
2020-04-16 7:56 ` Srinivas Kandagatla [this message]
2020-04-11 8:02 ` [PATCH 05/11] ASoC: qcom: lpass: Add support for newer lpass version Ajit Pandey
2020-04-16 7:56 ` Srinivas Kandagatla
2020-04-25 14:14 ` Ajit Pandey
2020-04-11 8:02 ` [PATCH 06/11] dt-bindings: sound: Add bindings related to lpass-cpu configuration Ajit Pandey
2020-04-11 8:02 ` [PATCH 07/11] Documentation: dt-bindings: sound: Add details for new dai properties Ajit Pandey
2020-04-16 7:56 ` Srinivas Kandagatla
2020-04-11 8:02 ` [PATCH 08/11] ASoC: qcom : lpass: Add support to configure dai's connection mode Ajit Pandey
2020-04-11 8:02 ` [PATCH 09/11] device-tree: bindings: sound: lpass-cpu: Add new compatible soc Ajit Pandey
2020-04-11 8:02 ` [PATCH 10/11] ASoC: qcom: lpass-sc7180: Add platform driver for lpass audio Ajit Pandey
2020-04-11 8:02 ` [PATCH 11/11] ASoC: qcom: lpass-platform: Replace card->dev with component->dev Ajit Pandey
2020-04-16 7:56 ` Srinivas Kandagatla
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=090b1b81-3c33-7d37-e0bb-a5f73ab76ad0@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=ajitp@codeaurora.org \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@codeaurora.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=plai@codeaurora.org \
--cc=tiwai@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).