summaryrefslogtreecommitdiff
path: root/drivers/soundwire
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-03-20 15:33:01 +0000
committerMark Brown <broonie@kernel.org>2020-03-20 15:33:01 +0000
commit4fcf4b1a05efd592115e37bad81ffe4f02660099 (patch)
treee88b8a4ef1d62cecb2d183db2b9b5a5190551761 /drivers/soundwire
parentb4a56753344633d466a38d610d69eb156a5f40e9 (diff)
parenta9107de4b03604ce0d279315c91b31b8065ee4ea (diff)
Merge branch 'topic/ro_wordlength' of git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/soundwire into asoc-5.7
Diffstat (limited to 'drivers/soundwire')
-rw-r--r--drivers/soundwire/stream.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c
index 178ae92b8cc1..7fb89a94d9c0 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 */