Skip to content

Commit 4830bfa

Browse files
Srinivas-Kandagatlavinodkoul
authored andcommitted
soundwire: qcom: set clk stop need reset flag at runtime
WSA Soundwire controller needs an full reset if clock stop support is not available in slave devices. WSA881x does not support clock stop however WSA883x supports clock stop. Make setting this flag at runtime to address above issue. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20230525133812.30841-5-srinivas.kandagatla@linaro.org Signed-off-by: Vinod Koul <vkoul@kernel.org>
1 parent 671ca2e commit 4830bfa

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

drivers/soundwire/qcom.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -614,10 +614,14 @@ static int qcom_swrm_enumerate(struct sdw_bus *bus)
614614

615615
sdw_extract_slave_id(bus, addr, &id);
616616
found = false;
617+
ctrl->clock_stop_not_supported = false;
617618
/* Now compare with entries */
618619
list_for_each_entry_safe(slave, _s, &bus->slaves, node) {
619620
if (sdw_compare_devid(slave, id) == 0) {
620621
qcom_swrm_set_slave_dev_num(bus, slave, i);
622+
if (slave->prop.clk_stop_mode1)
623+
ctrl->clock_stop_not_supported = true;
624+
621625
found = true;
622626
break;
623627
}
@@ -1620,15 +1624,6 @@ static int qcom_swrm_probe(struct platform_device *pdev)
16201624
pm_runtime_set_active(dev);
16211625
pm_runtime_enable(dev);
16221626

1623-
/* Clk stop is not supported on WSA Soundwire masters */
1624-
if (ctrl->version <= SWRM_VERSION_1_3_0) {
1625-
ctrl->clock_stop_not_supported = true;
1626-
} else {
1627-
ctrl->reg_read(ctrl, SWRM_COMP_MASTER_ID, &val);
1628-
if (val == MASTER_ID_WSA)
1629-
ctrl->clock_stop_not_supported = true;
1630-
}
1631-
16321627
#ifdef CONFIG_DEBUG_FS
16331628
ctrl->debugfs = debugfs_create_dir("qualcomm-sdw", ctrl->bus.debugfs);
16341629
debugfs_create_file("qualcomm-registers", 0400, ctrl->debugfs, ctrl,

0 commit comments

Comments
 (0)