From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: vkoul@kernel.org
Cc: andersson@kernel.org, yung-chuan.liao@linux.intel.com,
pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com,
linux-arm-msm@vger.kernel.org, alsa-devel@alsa-project.org,
linux-kernel@vger.kernel.org,
Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [PATCH v2 4/4] soundwire: qcom: set clk stop need reset flag at runtime
Date: Thu, 25 May 2023 14:38:12 +0100 [thread overview]
Message-ID: <20230525133812.30841-5-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20230525133812.30841-1-srinivas.kandagatla@linaro.org>
WSA Soundwire controller needs an full reset if clock stop support
is not available in slave devices. WSA881x does not support clock stop
however WSA883x supports clock stop.
Make setting this flag at runtime to address above issue.
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
drivers/soundwire/qcom.c | 13 ++++---------
1 file changed, 4 insertions(+), 9 deletions(-)
diff --git a/drivers/soundwire/qcom.c b/drivers/soundwire/qcom.c
index 1d2a105cb77f..b6c3fadc9090 100644
--- a/drivers/soundwire/qcom.c
+++ b/drivers/soundwire/qcom.c
@@ -617,10 +617,14 @@ static int qcom_swrm_enumerate(struct sdw_bus *bus)
sdw_extract_slave_id(bus, addr, &id);
found = false;
+ ctrl->clock_stop_not_supported = false;
/* Now compare with entries */
list_for_each_entry_safe(slave, _s, &bus->slaves, node) {
if (sdw_compare_devid(slave, id) == 0) {
qcom_swrm_set_slave_dev_num(bus, slave, i);
+ if (slave->prop.clk_stop_mode1)
+ ctrl->clock_stop_not_supported = true;
+
found = true;
break;
}
@@ -1623,15 +1627,6 @@ static int qcom_swrm_probe(struct platform_device *pdev)
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
- /* Clk stop is not supported on WSA Soundwire masters */
- if (ctrl->version <= SWRM_VERSION_1_3_0) {
- ctrl->clock_stop_not_supported = true;
- } else {
- ctrl->reg_read(ctrl, SWRM_COMP_MASTER_ID, &val);
- if (val == MASTER_ID_WSA)
- ctrl->clock_stop_not_supported = true;
- }
-
#ifdef CONFIG_DEBUG_FS
ctrl->debugfs = debugfs_create_dir("qualcomm-sdw", ctrl->bus.debugfs);
debugfs_create_file("qualcomm-registers", 0400, ctrl->debugfs, ctrl,
--
2.21.0
next prev parent reply other threads:[~2023-05-25 13:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-25 13:38 [PATCH v2 0/4] soundwire: qcom: stablity fixes Srinivas Kandagatla
2023-05-25 13:38 ` [PATCH v2 1/4] soundwire: qcom: update status correctly with mask Srinivas Kandagatla
2023-07-10 8:17 ` Johan Hovold
2023-05-25 13:38 ` [PATCH v2 2/4] soundwire: qcom: wait for fifo to be empty before suspend Srinivas Kandagatla
2023-05-25 13:38 ` [PATCH v2 3/4] soundwire: qcom: add software workaround for bus clash interrupt assertion Srinivas Kandagatla
2023-05-25 13:38 ` Srinivas Kandagatla [this message]
2023-05-29 5:13 ` [PATCH v2 0/4] soundwire: qcom: stablity fixes Vinod Koul
2023-06-05 9:08 ` Johan Hovold
2023-06-07 9:36 ` Srinivas Kandagatla
2023-06-08 10:11 ` Johan Hovold
2023-06-08 12:40 ` Johan Hovold
2023-06-08 12:45 ` Srinivas Kandagatla
2023-06-08 13:05 ` Johan Hovold
2023-06-08 14:23 ` 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=20230525133812.30841-5-srinivas.kandagatla@linaro.org \
--to=srinivas.kandagatla@linaro.org \
--cc=alsa-devel@alsa-project.org \
--cc=andersson@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=sanyog.r.kale@intel.com \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.