summaryrefslogtreecommitdiff
path: root/drivers/soundwire/bus.c
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2020-01-15 03:08:44 +0300
committerVinod Koul <vkoul@kernel.org>2020-02-25 13:27:02 +0300
commitdde73538c9a5f537fe1d6ae4a563507343ec6587 (patch)
tree3e7be3faf888705ddbc7650740afc3fb0bf46ee6 /drivers/soundwire/bus.c
parent0231453bc08f63584545dda1c05d61b19755d3a9 (diff)
downloadlinux-dde73538c9a5f537fe1d6ae4a563507343ec6587.tar.xz
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: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200115000844.14695-11-pierre-louis.bossart@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/bus.c')
-rw-r--r--drivers/soundwire/bus.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c
index 3395abd2ed39..13887713f311 100644
--- a/drivers/soundwire/bus.c
+++ b/drivers/soundwire/bus.c
@@ -922,8 +922,12 @@ int sdw_bus_clk_stop(struct sdw_bus *bus)
ret = sdw_bwrite_no_pm(bus, SDW_BROADCAST_DEV_NUM,
SDW_SCP_CTRL, SDW_SCP_CTRL_CLK_STP_NOW);
if (ret < 0) {
- dev_err(bus->dev,
- "ClockStopNow Broadcast message failed %d", ret);
+ if (ret == -ENODATA)
+ dev_dbg(bus->dev,
+ "ClockStopNow Broadcast msg ignored %d", ret);
+ else
+ dev_err(bus->dev,
+ "ClockStopNow Broadcast msg failed %d", ret);
return ret;
}