diff mbox series

[SRU,OEM-5.14,17/17] soundwire: bus: update Slave status in sdw_clear_slave_status

Message ID 20211119114605.19838-18-hui.wang@canonical.com
State New
Headers show
Series [SRU,OEM-5.14,01/17] ASoC: Intel: sof_sdw: Add support for SKU 0AF3 product | expand

Commit Message

Hui Wang Nov. 19, 2021, 11:45 a.m. UTC
From: Bard Liao <yung-chuan.liao@linux.intel.com>

BugLink: https://bugs.launchpad.net/bugs/1951563

Call to sdw_update_slave_status() needs to be added to sdw_clear_slave_
status() to ensure Slaves are informed of the new status via update_
status() callback.

This will enable codec drivers to reset their internal states and make
sure the register settings are properly restored on pm_runtime or
system resume

BugLink: https://github.com/thesofproject/linux/issues/2908
BugLink: https://github.com/thesofproject/linux/issues/2637
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
Link: https://lore.kernel.org/r/20210714033609.11963-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
(cherry picked from commit 899a750986bc4e62d554d4a5dd237c0ab25b698a linux-next)
Signed-off-by: Hui Wang <hui.wang@canonical.com>
---
 drivers/soundwire/bus.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index 3e6d4addac2f..dc385c3daf21 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -1853,6 +1853,7 @@  void sdw_clear_slave_status(struct sdw_bus *bus, u32 request)
 		if (slave->status != SDW_SLAVE_UNATTACHED) {
 			sdw_modify_slave_status(slave, SDW_SLAVE_UNATTACHED);
 			slave->first_interrupt_done = false;
+			sdw_update_slave_status(slave, SDW_SLAVE_UNATTACHED);
 		}
 
 		/* keep track of request, used in pm_runtime resume */