summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2020-03-20 16:33:01 +0100
committerMark Brown <broonie@kernel.org>2020-03-20 16:33:01 +0100
commit4fcf4b1a05efd592115e37bad81ffe4f02660099 (patch)
treee88b8a4ef1d62cecb2d183db2b9b5a5190551761 /drivers
parentMerge series "ASoC: stm32: manage rebind issue" from Olivier Moysan <olivier.... (diff)
parentsoundwire: stream: Add read_only_wordlength flag to port properties (diff)
downloadlinux-4fcf4b1a05efd592115e37bad81ffe4f02660099.tar.xz
linux-4fcf4b1a05efd592115e37bad81ffe4f02660099.zip
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')
-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 */