Commit f1b69026 authored by Pierre-Louis Bossart's avatar Pierre-Louis Bossart Committed by Vinod Koul

soundwire: bus: add better dev_dbg to track complete() calls

Add a dev_dbg() log for both enumeration and initialization completion
to better track suspend-resume issues.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: default avatarRander Wang <rander.wang@intel.com>
Reviewed-by: default avatarChao Song <chao.song@intel.com>
Signed-off-by: default avatarBard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20210126085402.4264-1-yung-chuan.liao@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 9a0c798c
......@@ -784,7 +784,7 @@ static void sdw_modify_slave_status(struct sdw_slave *slave,
if (status == SDW_SLAVE_UNATTACHED) {
dev_dbg(&slave->dev,
"%s: initializing completion for Slave %d\n",
"%s: initializing enumeration and init completion for Slave %d\n",
__func__, slave->dev_num);
init_completion(&slave->enumeration_complete);
......@@ -793,7 +793,7 @@ static void sdw_modify_slave_status(struct sdw_slave *slave,
} else if ((status == SDW_SLAVE_ATTACHED) &&
(slave->status == SDW_SLAVE_UNATTACHED)) {
dev_dbg(&slave->dev,
"%s: signaling completion for Slave %d\n",
"%s: signaling enumeration completion for Slave %d\n",
__func__, slave->dev_num);
complete(&slave->enumeration_complete);
......@@ -1758,8 +1758,13 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
if (ret)
dev_err(slave->bus->dev,
"Update Slave status failed:%d\n", ret);
if (attached_initializing)
if (attached_initializing) {
dev_dbg(&slave->dev,
"%s: signaling initialization completion for Slave %d\n",
__func__, slave->dev_num);
complete(&slave->initialization_complete);
}
}
return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment