diff options
author | Vinod Koul <vkoul@kernel.org> | 2020-03-20 19:25:14 +0530 |
---|---|---|
committer | Vinod Koul <vkoul@kernel.org> | 2020-03-20 19:25:14 +0530 |
commit | 1ce7139436603dda9e155df0c3e275c87a725761 (patch) | |
tree | 044be412bde0c4db608c4949940cb488229f8b8d /drivers/soundwire/stream.c | |
parent | b468a785bd3e0a0591c84cbde5787f58be38c3e4 (diff) | |
parent | a9107de4b03604ce0d279315c91b31b8065ee4ea (diff) | |
download | linux-1ce7139436603dda9e155df0c3e275c87a725761.tar.bz2 |
Merge branch 'topic/ro_wordlength' into next
Diffstat (limited to 'drivers/soundwire/stream.c')
-rw-r--r-- | drivers/soundwire/stream.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 1b43d03c79ea..a9a72574b34a 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -167,13 +167,15 @@ static int sdw_program_slave_port_params(struct sdw_bus *bus, return ret; } - /* Program DPN_BlockCtrl1 register */ - ret = sdw_write(s_rt->slave, addr2, (p_params->bps - 1)); - if (ret < 0) { - dev_err(&s_rt->slave->dev, - "DPN_BlockCtrl1 register write failed for port %d\n", - t_params->port_num); - return ret; + if (!dpn_prop->read_only_wordlength) { + /* Program DPN_BlockCtrl1 register */ + ret = sdw_write(s_rt->slave, addr2, (p_params->bps - 1)); + if (ret < 0) { + dev_err(&s_rt->slave->dev, + "DPN_BlockCtrl1 register write failed for port %d\n", + t_params->port_num); + return ret; + } } /* Program DPN_SampleCtrl1 register */ |