From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: Srinivasa Rao Mandadapu <quic_srivasam@quicinc.com>,
Matthias Kaehlcke <mka@chromium.org>
Cc: Stephen Boyd <swboyd@chromium.org>,
agross@kernel.org, alsa-devel@alsa-project.org,
bgoswami@quicinc.com, bjorn.andersson@linaro.org,
broonie@kernel.org, devicetree@vger.kernel.org,
judyhsiao@chromium.org, lgirdwood@gmail.com,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
perex@perex.cz, quic_plai@quicinc.com, quic_rohkumar@quicinc.com,
robh+dt@kernel.org, tiwai@suse.com, vkoul@kernel.org
Subject: Re: [PATCH v2] ASoC: qcom: soundwire: Add support for controlling audio CGCR from HLOS
Date: Wed, 1 Jun 2022 14:06:43 +0100 [thread overview]
Message-ID: <1ec64a99-cfcf-c903-935b-d1bb0617c284@linaro.org> (raw)
In-Reply-To: <7c74868d-624b-c18e-b377-026e70813fcc@quicinc.com>
On 01/06/2022 13:57, Srinivasa Rao Mandadapu wrote:
>
> On 6/1/2022 4:02 AM, Matthias Kaehlcke wrote:
> Thanks for Your Time Matthias!!!
>> On Tue, May 24, 2022 at 04:19:47PM +0530, Srinivasa Rao Mandadapu wrote:
>>> On 5/21/2022 8:43 AM, Stephen Boyd wrote:
>>> Thanks for your time Stephen!!!
>>>> Quoting Srinivasa Rao Mandadapu (2022-05-18 05:42:35)
>>>>> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
>>>>> index da1ad7e..445e481 100644
>>>>> --- a/drivers/soundwire/qcom.c
>>>>> +++ b/drivers/soundwire/qcom.c
>>>>> @@ -1333,6 +1337,10 @@ 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");
>>>> Why is there no return on error here? Is the reset optional?
>>> Yes it's optional. For older platforms this is not required.
>> If it's optional then either there should be no error message, or the
>> error message should only be logged when the version is >= 1.6.0. There
>> are few things worse than a kernel log riddled with misleading error
>> messages.
>
> In that case, it can be done like below. Kindly let me know your opinion
> on this.
>
> if (ctrl->version >= 0x01060000) {
This is not true 1.7+ variants do not require anything as such.
Why not add a flag in struct qcom_swrm_data and pass it as part of
of_match data specific to this version?
--srini
> 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 = PTR_ERR(ctrl->audio_cgcr);
> goto err_clk;
> }
> }
>
next prev parent reply other threads:[~2022-06-01 13:06 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 12:42 [PATCH v2] ASoC: qcom: soundwire: Add support for controlling audio CGCR from HLOS Srinivasa Rao Mandadapu
2022-05-21 3:13 ` Stephen Boyd
2022-05-24 10:49 ` Srinivasa Rao Mandadapu
2022-05-31 22:32 ` Matthias Kaehlcke
2022-06-01 12:57 ` Srinivasa Rao Mandadapu
2022-06-01 13:06 ` Srinivas Kandagatla [this message]
[not found] ` <61c151e2-c44c-3b84-9fed-a83abef83c17@quicinc.com>
2022-06-01 13:42 ` Srinivas Kandagatla
2022-06-01 16:55 ` Matthias Kaehlcke
2022-06-07 10:45 ` Mark Brown
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=1ec64a99-cfcf-c903-935b-d1bb0617c284@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--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=mka@chromium.org \
--cc=perex@perex.cz \
--cc=quic_plai@quicinc.com \
--cc=quic_rohkumar@quicinc.com \
--cc=quic_srivasam@quicinc.com \
--cc=robh+dt@kernel.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;
as well as URLs for NNTP newsgroup(s).