Skip to content

Commit c368dd5

Browse files
bardliaovinodkoul
authored andcommitted
soundwire: don't program SDW_SCP_BUSCLOCK_SCALE on a unattached Peripheral
The SDW_SCP_BUSCLOCK_SCALE register will be programmed when the Peripheral is attached. We can and should skip programming the SDW_SCP_BUSCLOCK_SCALE register when the Peripheral is unattached. Fixes: 645291c ("Soundwire: stream: program BUSCLOCK_SCALE") Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com> Reviewed-by: Simon Trimmer <simont@opensource.cirrus.com> Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com> Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com> Link: https://patch.msgid.link/20260428084612.322701-1-yung-chuan.liao@linux.intel.com Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 45c7bda commit c368dd5

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

drivers/soundwire/stream.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -697,6 +697,13 @@ static int sdw_program_params(struct sdw_bus *bus, bool prepare)
697697
if (scale_index < 0)
698698
return scale_index;
699699

700+
/* Skip the unattached Peripherals */
701+
if (!completion_done(&slave->enumeration_complete)) {
702+
dev_warn(&slave->dev,
703+
"Not enumerated, skip programming BUSCLOCK_SCALE\n");
704+
continue;
705+
}
706+
700707
ret = sdw_write_no_pm(slave, addr1, scale_index);
701708
if (ret < 0) {
702709
dev_err(&slave->dev, "SDW_SCP_BUSCLOCK_SCALE register write failed\n");

0 commit comments

Comments
 (0)