diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-03-17 17:33:16 +0100 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-03-19 08:13:03 +0100 |
commit | 9bc87cce9426964aa0cc406419bd6f70e8393ed0 (patch) | |
tree | fc6dfc2ce6b090d2040a74fc04a28f4b30042f32 /drivers/soundwire/cadence_master.c | |
parent | soundwire: cadence: add interface to check clock status (diff) | |
download | linux-9bc87cce9426964aa0cc406419bd6f70e8393ed0.tar.xz linux-9bc87cce9426964aa0cc406419bd6f70e8393ed0.zip |
soundwire: cadence: handle error cases with CONFIG_UPDATE
config_update() may time out or cannot be use in ClockStopMode
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200317163329.25501-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Diffstat (limited to 'drivers/soundwire/cadence_master.c')
-rw-r--r-- | drivers/soundwire/cadence_master.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 1bfdc1d4fcb1..d7f01d39767b 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -239,6 +239,11 @@ static int cdns_config_update(struct sdw_cdns *cdns) { int ret; + if (sdw_cdns_is_clock_stop(cdns)) { + dev_err(cdns->dev, "Cannot program MCP_CONFIG_UPDATE in ClockStopMode\n"); + return -EINVAL; + } + ret = cdns_clear_bit(cdns, CDNS_MCP_CONFIG_UPDATE, CDNS_MCP_CONFIG_UPDATE_BIT); if (ret < 0) |