Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Vinod Koul <vkoul@kernel.org>,
	Bard Liao <yung-chuan.liao@linux.intel.com>,
	Sanyog Kale <sanyog.r.kale@intel.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>,
	linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org, Patrick Lai <quic_plai@quicinc.com>
Subject: Re: [PATCH] soundwire: qcom: Fix enumeration of second device on the bus
Date: Wed, 5 Apr 2023 10:01:56 -0500	[thread overview]
Message-ID: <ecc13046-1a4f-77e7-c4dc-a5a4c1248572@linux.intel.com> (raw)
In-Reply-To: <20230405142926.842173-1-krzysztof.kozlowski@linaro.org>



On 4/5/23 09:29, Krzysztof Kozlowski wrote:
> Some Soundwire buses (like &swr0 on Qualcomm HDK8450) have two devices,
> which can be brought from powerdown state one after another.  We need to
> keep enumerating them on each slave attached interrupt, otherwise only
> first will appear.
> 
> Cc: <stable@vger.kernel.org>
> Fixes: a6e6581942ca ("soundwire: qcom: add auto enumeration support")
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> 
> ---
> 
> Cc: Patrick Lai <quic_plai@quicinc.com>
> ---
>  drivers/soundwire/qcom.c | 11 +++--------
>  1 file changed, 3 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
> index c296e0bf897b..1e5077d91f59 100644
> --- a/drivers/soundwire/qcom.c
> +++ b/drivers/soundwire/qcom.c
> @@ -587,14 +587,9 @@ static irqreturn_t qcom_swrm_irq_handler(int irq, void *dev_id)
>  			case SWRM_INTERRUPT_STATUS_CHANGE_ENUM_SLAVE_STATUS:
>  				dev_dbg_ratelimited(swrm->dev, "SWR new slave attached\n");
>  				swrm->reg_read(swrm, SWRM_MCP_SLV_STATUS, &slave_status);
> -				if (swrm->slave_status == slave_status) {
> -					dev_dbg(swrm->dev, "Slave status not changed %x\n",
> -						slave_status);

it's not clear to me how removing this test helps with the two-device
configuration?

Or is this a case where the status for both devices changes at the same
time but the interrupt status remains set, so the next iteration of the
loop is ignored?

> -				} else {
> -					qcom_swrm_get_device_status(swrm);
> -					qcom_swrm_enumerate(&swrm->bus);
> -					sdw_handle_slave_status(&swrm->bus, swrm->status);
> -				}
> +				qcom_swrm_get_device_status(swrm);
> +				qcom_swrm_enumerate(&swrm->bus);
> +				sdw_handle_slave_status(&swrm->bus, swrm->status);
>  				break;
>  			case SWRM_INTERRUPT_STATUS_MASTER_CLASH_DET:
>  				dev_err_ratelimited(swrm->dev,

  reply	other threads:[~2023-04-05 15:02 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-05 14:29 [PATCH] soundwire: qcom: Fix enumeration of second device on the bus Krzysztof Kozlowski
2023-04-05 15:01 ` Pierre-Louis Bossart [this message]
2023-04-06  7:03   ` Krzysztof Kozlowski

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=ecc13046-1a4f-77e7-c4dc-a5a4c1248572@linux.intel.com \
    --to=pierre-louis.bossart@linux.intel.com \
    --cc=agross@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=andersson@kernel.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=quic_plai@quicinc.com \
    --cc=sanyog.r.kale@intel.com \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=stable@vger.kernel.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