From: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
<agross@kernel.org>, <bjorn.andersson@linaro.org>,
<lgirdwood@gmail.com>, <broonie@kernel.org>, <robh+dt@kernel.org>,
<quic_plai@quicinc.com>, <bgoswami@quicinc.com>, <perex@perex.cz>,
<tiwai@suse.com>, <srinivas.kandagatla@linaro.org>,
<quic_rohkumar@quicinc.com>, <linux-arm-msm@vger.kernel.org>,
<alsa-devel@alsa-project.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <swboyd@chromium.org>,
<judyhsiao@chromium.org>, <vkoul@kernel.org>
Subject: Re: [PATCH v4 1/2] soundwire: qcom: Add flag for software clock gating check
Date: Fri, 10 Jun 2022 15:34:39 +0530 [thread overview]
Message-ID: <70631864-ff95-5c73-64ed-602774eb0de7@quicinc.com> (raw)
In-Reply-To: <97757ee1-2525-4e97-855e-da6fb66f01ae@linux.intel.com>
On 6/9/2022 8:52 PM, Pierre-Louis Bossart wrote:
Thanks for your time Pierre-Louis!!!
>
> On 6/9/22 09:30, Srinivasa Rao Mandadapu wrote:
>> Validate software clock gating required or not and do software
>> clock gating on hclk if soundwire is operational and keep it
>> running by adding flag in private data structure.
>> This is to avoid conflict between older architectures,
>> where software clock gating is not required and on latest
>> architectues, where software clock gating is mandatory.
> architectures.
Okay. Will fix it.
>
>> Signed-off-by: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>
>> Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>> ---
>> drivers/soundwire/qcom.c | 14 ++++++++++----
>> 1 file changed, 10 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
>> index a3fccf0..8e163da 100644
>> --- a/drivers/soundwire/qcom.c
>> +++ b/drivers/soundwire/qcom.c
>> @@ -181,6 +181,7 @@ struct qcom_swrm_ctrl {
>> struct qcom_swrm_data {
>> u32 default_cols;
>> u32 default_rows;
>> + bool sw_clk_gate_required;
>> };
>>
>> static const struct qcom_swrm_data swrm_v1_3_data = {
>> @@ -1311,6 +1312,15 @@ static int qcom_swrm_probe(struct platform_device *pdev)
>> return PTR_ERR(ctrl->mmio);
>> }
>>
>> + if (data->sw_clk_gate_required) {
>> + ctrl->audio_cgcr = devm_reset_control_get_exclusive(dev, "swr_audio_cgcr");
>> + if (IS_ERR(ctrl->audio_cgcr)) {
> You need to handle the NULL case, devm_reset_control_get_exclusive() can
> return ERR_OR_NULL
>
> https://elixir.bootlin.com/linux/latest/source/drivers/reset/core.c#L1045
Okay. Will change accordingly.
>
>> + dev_err(dev, "Failed to get cgcr reset ctrl required for SW gating\n");
>> + ret = PTR_ERR(ctrl->audio_cgcr);
>> + goto err_init;
>> + }
>> + }
>> +
>> ctrl->irq = of_irq_get(dev->of_node, 0);
>> if (ctrl->irq < 0) {
>> ret = ctrl->irq;
>> @@ -1336,10 +1346,6 @@ static int qcom_swrm_probe(struct platform_device *pdev)
>> ctrl->bus.compute_params = &qcom_swrm_compute_params;
>> ctrl->bus.clk_stop_timeout = 300;
>>
>> - ctrl->audio_cgcr = devm_reset_control_get_exclusive(dev, "swr_audio_cgcr");
>> - if (IS_ERR(ctrl->audio_cgcr))
>> - dev_err(dev, "Failed to get audio_cgcr reset required for soundwire-v1.6.0\n");
>> -
>> ret = qcom_swrm_get_port_config(ctrl);
>> if (ret)
>> goto err_clk;
next prev parent reply other threads:[~2022-06-10 10:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-09 14:30 [PATCH v4 0/2] Add software clock gating requirement check Srinivasa Rao Mandadapu
2022-06-09 14:30 ` [PATCH v4 1/2] soundwire: qcom: Add flag for software clock gating check Srinivasa Rao Mandadapu
2022-06-09 15:22 ` Pierre-Louis Bossart
2022-06-10 10:04 ` Srinivasa Rao Mandadapu [this message]
2022-06-09 14:30 ` [PATCH v4 2/2] ASoC: qcom: soundwire: Enable software clock gating requirement flag Srinivasa Rao Mandadapu
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=70631864-ff95-5c73-64ed-602774eb0de7@quicinc.com \
--to=quic_srivasam@quicinc.com \
--cc=agross@kernel.org \
--cc=alsa-devel@alsa-project.org \
--cc=bgoswami@quicinc.com \
--cc=bjorn.andersson@linaro.org \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=judyhsiao@chromium.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=quic_plai@quicinc.com \
--cc=quic_rohkumar@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=swboyd@chromium.org \
--cc=tiwai@suse.com \
--cc=vkoul@kernel.org \
/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
all inboxes | Powered by JetHome®