linux/drivers/soundwire
Pierre-Louis Bossart 3ab2ca405a soundwire: bus: add helper to clear Slave status to UNATTACHED
When resuming with a bus reset, we need to re-enumerate and restart
from UNATTACHED. The helper added in this patch helps implement a more
robust state machine avoiding race conditions on resume.

The unattach request is stored and will be used by Slave drivers, if
needed: Intel validation exposed a corner case where the Slave device
may transition to D3 when streaming stops, but streaming restarts
before the Master transitions to D3. In that case, the Slave status
was not cleared as UNATTACHED by the Master resuming, and the
wait_for_completion will time out.

When the slave resumes, it can check if a Master-initiated
re-enumeration and initialization took place and skip the
wait_for_completion() if there is no reason to wait.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200115000844.14695-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
2020-02-25 15:57:02 +05:30
..
bus_type.c soundwire: bus: fix race condition with probe_complete signaling 2020-02-25 15:57:01 +05:30
bus.c soundwire: bus: add helper to clear Slave status to UNATTACHED 2020-02-25 15:57:02 +05:30
bus.h soundwire: bus: add helper to clear Slave status to UNATTACHED 2020-02-25 15:57:02 +05:30
cadence_master.c soundwire: cadence: fix kernel-doc parameter descriptions 2020-01-16 17:34:38 +05:30
cadence_master.h soundwire: cadence_master: make clock stop exit configurable on init 2019-10-24 17:22:01 +05:30
debugfs.c soundwire: add debugfs support 2019-08-23 12:01:02 +05:30
intel_init.c soundwire: intel: update stream callbacks for hwparams/free stream operations 2019-12-12 09:17:06 +05:30
intel.c soundwire: intel: free all resources on hw_free() 2020-02-18 14:09:52 +05:30
intel.h soundwire: intel: update stream callbacks for hwparams/free stream operations 2019-12-12 09:17:06 +05:30
Kconfig soundwire: qcom: add support for SoundWire controller 2020-01-14 11:57:47 +05:30
Makefile soundwire: qcom: add support for SoundWire controller 2020-01-14 11:57:47 +05:30
mipi_disco.c soundwire: mipi_disco: Switch to use fwnode_property_count_uXX() 2019-08-02 17:15:13 +05:30
qcom.c soundwire: qcom: add support for SoundWire controller 2020-01-14 11:57:47 +05:30
slave.c soundwire: bus: fix race condition with initialization_complete signaling 2020-02-25 15:57:02 +05:30
stream.c soundwire: stream: don't program ports when a stream that has not been prepared 2020-02-13 15:57:37 +05:30