Skip to content

Commit da096fb

Browse files
Srinivas-Kandagatlavinodkoul
authored andcommitted
soundwire: qcom: fix handling of qcom,ports-block-pack-mode
Support to "qcom,ports-block-pack-mode" was added at later stages to support a variant of Qualcomm SoundWire controllers available on Apps processor. However the older versions of the SoundWire controller which are embedded in WCD Codecs do not need this property. So returning on error for those cases will break boards like DragonBoard DB845c and Lenovo Yoga C630. This patch fixes error handling on this property considering older usecases. Fixes: a5943e4 ("soundwire: qcom: check of_property_read status") Reported-by: Amit Pundir <[email protected]> Signed-off-by: Srinivas Kandagatla <[email protected]> Tested-by: Amit Pundir <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Vinod Koul <[email protected]>
1 parent 6efb943 commit da096fb

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

drivers/soundwire/qcom.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1150,8 +1150,16 @@ static int qcom_swrm_get_port_config(struct qcom_swrm_ctrl *ctrl)
11501150

11511151
ret = of_property_read_u8_array(np, "qcom,ports-block-pack-mode",
11521152
bp_mode, nports);
1153-
if (ret)
1154-
return ret;
1153+
if (ret) {
1154+
u32 version;
1155+
1156+
ctrl->reg_read(ctrl, SWRM_COMP_HW_VERSION, &version);
1157+
1158+
if (version <= 0x01030000)
1159+
memset(bp_mode, SWR_INVALID_PARAM, QCOM_SDW_MAX_PORTS);
1160+
else
1161+
return ret;
1162+
}
11551163

11561164
memset(hstart, SWR_INVALID_PARAM, QCOM_SDW_MAX_PORTS);
11571165
of_property_read_u8_array(np, "qcom,ports-hstart", hstart, nports);

0 commit comments

Comments
 (0)