Skip to content

Commit 4b23096

Browse files
plbossartvinodkoul
authored andcommitted
soundwire: mipi-disco: add support for peripheral channelprepare timeout
The DisCo for SoundWire 2.0 spec renamed the 'mipi-sdw-slave-channelprepare-timeout', add support for the new definition in backwards-compatible ways. Signed-off-by: Pierre-Louis Bossart <[email protected]> Signed-off-by: Bard Liao <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 89e95be commit 4b23096

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

drivers/soundwire/mipi_disco.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,7 @@ int sdw_slave_read_prop(struct sdw_slave *slave)
344344
struct device *dev = &slave->dev;
345345
struct fwnode_handle *port;
346346
int nval;
347+
int ret;
347348

348349
device_property_read_u32(dev, "mipi-sdw-sw-interface-revision",
349350
&prop->mipi_revision);
@@ -366,8 +367,11 @@ int sdw_slave_read_prop(struct sdw_slave *slave)
366367
device_property_read_u32(dev, "mipi-sdw-clockstopprepare-timeout",
367368
&prop->clk_stop_timeout);
368369

369-
device_property_read_u32(dev, "mipi-sdw-slave-channelprepare-timeout",
370-
&prop->ch_prep_timeout);
370+
ret = device_property_read_u32(dev, "mipi-sdw-peripheral-channelprepare-timeout",
371+
&prop->ch_prep_timeout);
372+
if (ret < 0)
373+
device_property_read_u32(dev, "mipi-sdw-slave-channelprepare-timeout",
374+
&prop->ch_prep_timeout);
371375

372376
device_property_read_u32(dev,
373377
"mipi-sdw-clockstopprepare-hard-reset-behavior",

0 commit comments

Comments
 (0)