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

soundwire: bus: improve dynamic debug comments for enumeration

update comments to provide better understanding of enumeration flows.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20190806005522.22642-5-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 9b5884a0
...@@ -470,7 +470,8 @@ static int sdw_assign_device_num(struct sdw_slave *slave) ...@@ -470,7 +470,8 @@ static int sdw_assign_device_num(struct sdw_slave *slave)
ret = sdw_write(slave, SDW_SCP_DEVNUMBER, dev_num); ret = sdw_write(slave, SDW_SCP_DEVNUMBER, dev_num);
if (ret < 0) { if (ret < 0) {
dev_err(&slave->dev, "Program device_num failed: %d\n", ret); dev_err(&slave->dev, "Program device_num %d failed: %d\n",
dev_num, ret);
return ret; return ret;
} }
...@@ -527,6 +528,7 @@ static int sdw_program_device_num(struct sdw_bus *bus) ...@@ -527,6 +528,7 @@ static int sdw_program_device_num(struct sdw_bus *bus)
do { do {
ret = sdw_transfer(bus, &msg); ret = sdw_transfer(bus, &msg);
if (ret == -ENODATA) { /* end of device id reads */ if (ret == -ENODATA) { /* end of device id reads */
dev_dbg(bus->dev, "No more devices to enumerate\n");
ret = 0; ret = 0;
break; break;
} }
...@@ -969,6 +971,7 @@ int sdw_handle_slave_status(struct sdw_bus *bus, ...@@ -969,6 +971,7 @@ int sdw_handle_slave_status(struct sdw_bus *bus,
int i, ret = 0; int i, ret = 0;
if (status[0] == SDW_SLAVE_ATTACHED) { if (status[0] == SDW_SLAVE_ATTACHED) {
dev_dbg(bus->dev, "Slave attached, programming device number\n");
ret = sdw_program_device_num(bus); ret = sdw_program_device_num(bus);
if (ret) if (ret)
dev_err(bus->dev, "Slave attach failed: %d\n", ret); dev_err(bus->dev, "Slave attach failed: %d\n", 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