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

soundwire: bus: don't treat CMD_IGNORED as error on ClockStop

If a SoundWire link is enabled, but there are no Slave devices exposed
in firmware tables for this link, or no Slaves in ATTACHED or ALERT
mode, the CMD_IGNORED/-ENODATA error code on a broadcast write is
perfectly legit.

Filter this case to report errors and let the caller deal with the
CMD_IGNORED case.
Signed-off-by: default avatarPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200115000844.14695-11-pierre-louis.bossart@linux.intel.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent 0231453b
...@@ -922,8 +922,12 @@ int sdw_bus_clk_stop(struct sdw_bus *bus) ...@@ -922,8 +922,12 @@ int sdw_bus_clk_stop(struct sdw_bus *bus)
ret = sdw_bwrite_no_pm(bus, SDW_BROADCAST_DEV_NUM, ret = sdw_bwrite_no_pm(bus, SDW_BROADCAST_DEV_NUM,
SDW_SCP_CTRL, SDW_SCP_CTRL_CLK_STP_NOW); SDW_SCP_CTRL, SDW_SCP_CTRL_CLK_STP_NOW);
if (ret < 0) { if (ret < 0) {
dev_err(bus->dev, if (ret == -ENODATA)
"ClockStopNow Broadcast message failed %d", ret); dev_dbg(bus->dev,
"ClockStopNow Broadcast msg ignored %d", ret);
else
dev_err(bus->dev,
"ClockStopNow Broadcast msg failed %d", ret);
return ret; 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