diff options
Diffstat (limited to 'drivers/soundwire/bus.c')
-rw-r--r-- | drivers/soundwire/bus.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index 3e6d4addac2f..1b115734a8f6 100644 --- a/drivers/soundwire/bus.c +++ b/drivers/soundwire/bus.c @@ -390,7 +390,10 @@ sdw_nread_no_pm(struct sdw_slave *slave, u32 addr, size_t count, u8 *val) if (ret < 0) return ret; - return sdw_transfer(slave->bus, &msg); + ret = sdw_transfer(slave->bus, &msg); + if (slave->is_mockup_device) + ret = 0; + return ret; } static int @@ -404,7 +407,10 @@ sdw_nwrite_no_pm(struct sdw_slave *slave, u32 addr, size_t count, const u8 *val) if (ret < 0) return ret; - return sdw_transfer(slave->bus, &msg); + ret = sdw_transfer(slave->bus, &msg); + if (slave->is_mockup_device) + ret = 0; + return ret; } int sdw_write_no_pm(struct sdw_slave *slave, u32 addr, u8 value) @@ -896,7 +902,8 @@ static int sdw_bus_wait_for_clk_prep_deprep(struct sdw_bus *bus, u16 dev_num) do { val = sdw_bread_no_pm(bus, dev_num, SDW_SCP_STAT); if (val < 0) { - dev_err(bus->dev, "SDW_SCP_STAT bread failed:%d\n", val); + if (val != -ENODATA) + dev_err(bus->dev, "SDW_SCP_STAT bread failed:%d\n", val); return val; } val &= SDW_SCP_STAT_CLK_STP_NF; @@ -1853,6 +1860,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 */ |