[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20191114181702.22254-11-pierre-louis.bossart@linux.intel.com>
Date: Thu, 14 Nov 2019 12:16:50 -0600
From: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
To: alsa-devel@...a-project.org
Cc: linux-kernel@...r.kernel.org, tiwai@...e.de, broonie@...nel.org,
vkoul@...nel.org, gregkh@...uxfoundation.org, jank@...ence.com,
srinivas.kandagatla@...aro.org, slawomir.blauciak@...el.com,
Bard liao <yung-chuan.liao@...ux.intel.com>,
Rander Wang <rander.wang@...ux.intel.com>,
Ranjani Sridharan <ranjani.sridharan@...ux.intel.com>,
Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
Sanyog Kale <sanyog.r.kale@...el.com>
Subject: [PATCH v3 10/22] soundwire: intel: call helper to reset Slave states on resume
This helps make sure they are all UNATTACHED and reset the state
machines.
At the moment we perform a bus reset both for resume and pm_resume,
this will be modified when clock-stop mode is supported
Signed-off-by: Bard Liao <yung-chuan.liao@...ux.intel.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>
---
drivers/soundwire/intel.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c
index b2bc99970245..e3741c3afe1c 100644
--- a/drivers/soundwire/intel.c
+++ b/drivers/soundwire/intel.c
@@ -1402,6 +1402,9 @@ static int intel_resume(struct device *dev)
return ret;
}
+ /* make sure all Slaves are tagged as UNATTACHED */
+ sdw_clear_slave_status(&sdw->cdns.bus);
+
ret = sdw_cdns_enable_interrupt(cdns, true);
if (ret < 0) {
dev_err(dev, "cannot enable interrupts during resume\n");
@@ -1435,6 +1438,9 @@ static int intel_resume_runtime(struct device *dev)
return ret;
}
+ /* make sure all Slaves are tagged as UNATTACHED */
+ sdw_clear_slave_status(&sdw->cdns.bus);
+
ret = sdw_cdns_enable_interrupt(cdns, true);
if (ret < 0) {
dev_err(dev, "cannot enable interrupts during resume\n");
--
2.20.1
Powered by blists - more mailing lists