mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	robh+dt@kernel.org, vkoul@kernel.org,
	yung-chuan.liao@linux.intel.com
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org, quic_srivasam@quicinc.com
Subject: Re: [PATCH 1/3] soundwire: qcom: add runtime pm support
Date: Wed, 23 Feb 2022 12:21:45 -0600	[thread overview]
Message-ID: <d0b57e7b-3591-ee7c-c77b-02e328dba752@linux.intel.com> (raw)
In-Reply-To: <1e532280-5388-157b-8e2d-2ca8b2619f37@linaro.org>


> There are two cases here.
> 
> 1> Controller Instance support ClockStop Mode0, we mostly use the
> generic core to do that except in resume path we make sure that we start
> the clock.
> 
> 2> Controller Instances which that do not support ClockStop, we do soft
> reset of controller along with hard resetting slaves.

both are fine. we have similar cases defined in sdw_intel.h



>>> +static int swrm_runtime_resume(struct device *dev)
>>> +{
>>> +    struct qcom_swrm_ctrl *ctrl = dev_get_drvdata(dev);
>>> +    int ret;
>>> +
>>> +    clk_prepare_enable(ctrl->hclk);
>>> +
>>> +    if (ctrl->clk_stop_bus_reset) {
>>> +        reinit_completion(&ctrl->enumeration);
>>> +        ctrl->reg_write(ctrl, SWRM_COMP_SW_RESET, 0x01);
>>> +        qcom_swrm_get_device_status(ctrl);
>>
>> don't you need some sort of delay before checking the controller and
>> device status? The bus reset sequence takes 4096 bits, that's a non-zero
>> time.
> 
> This is soft reset not full Bus Reset as WSA slaves have hard reset pins
> that will be toggled as part of suspend-resume.

Above you mentioned the peripherals go through a reset as well, in which
case they can only re-attach on the bus after 16 frames best case - they
need to observe a full cycle of the dynamic sync before changing status.

That's still a non-zero delay (0.3ms for a 48kHz frame rate)

>>
>>> +        sdw_handle_slave_status(&ctrl->bus, ctrl->status);
>>> +        qcom_swrm_init(ctrl);

  reply	other threads:[~2022-02-23 18:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-21 10:41 [PATCH 0/3] soundwire: qcom: add pm runtime support Srinivas Kandagatla
2022-02-21 10:41 ` [PATCH 1/3] soundwire: qcom: add runtime pm support Srinivas Kandagatla
2022-02-22 19:15   ` Pierre-Louis Bossart
2022-02-23 16:36     ` Srinivas Kandagatla
2022-02-23 18:21       ` Pierre-Louis Bossart [this message]
2022-02-21 10:41 ` [PATCH 2/3] dt-bindings: soundwire: qcom: document optional wake irq Srinivas Kandagatla
2022-02-21 10:41 ` [PATCH 3/3] soundwire: qcom: add wake up interrupt support Srinivas Kandagatla
2022-02-22 19:26   ` Pierre-Louis Bossart
2022-02-22 22:52     ` Srinivas Kandagatla
2022-02-23  0:31       ` Pierre-Louis Bossart
2022-02-23 16:22         ` Srinivas Kandagatla
2022-02-23 18:14           ` Pierre-Louis Bossart
2022-02-21 13:02 ` [PATCH 0/3] soundwire: qcom: add pm runtime support Srinivasa Rao Mandadapu (Temp)

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=d0b57e7b-3591-ee7c-c77b-02e328dba752@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_srivasam@quicinc.com \
    --cc=robh+dt@kernel.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=vkoul@kernel.org \
    --cc=yung-chuan.liao@linux.intel.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

all inboxes | Powered by JetHome®