Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

phy: qcom: qmp-usbc: Move reset config into PHY cfg

The original reset list only works for USB-only PHYs. USB3DP PHYs require
different reset names such as "dp_phy", so they need a separate list.

Moving reset configuration into qmp_phy_cfg allows per-PHY customization
without adding special-case logic in DT parsing. The legacy DT path keeps
using the old hardcoded list, while non-legacy paths use cfg->reset_list.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Xiangxu Yin <xiangxu.yin@oss.qualcomm.com>
Link: https://patch.msgid.link/20251215-add-displayport-support-for-qcs615-platform-v8-5-cbc72c88a44e@oss.qualcomm.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Xiangxu Yin and committed by
Vinod Koul
5b2dd084 3b193748

+11 -3
+11 -3
drivers/phy/qualcomm/phy-qcom-qmp-usbc.c
··· 335 335 int (*configure_dp_phy)(struct qmp_usbc *qmp); 336 336 int (*calibrate_dp_phy)(struct qmp_usbc *qmp); 337 337 338 - /* regulators to be requested */ 338 + const char * const *reset_list; 339 + int num_resets; 339 340 const struct regulator_bulk_data *vreg_list; 340 341 int num_vregs; 341 342 ··· 465 464 .rx_tbl_num = ARRAY_SIZE(msm8998_usb3_rx_tbl), 466 465 .pcs_tbl = msm8998_usb3_pcs_tbl, 467 466 .pcs_tbl_num = ARRAY_SIZE(msm8998_usb3_pcs_tbl), 467 + .reset_list = usb3phy_reset_l, 468 + .num_resets = ARRAY_SIZE(usb3phy_reset_l), 468 469 .vreg_list = qmp_phy_msm8998_vreg_l, 469 470 .num_vregs = ARRAY_SIZE(qmp_phy_msm8998_vreg_l), 470 471 .regs = qmp_v3_usb3phy_regs_layout, ··· 483 480 .rx_tbl_num = ARRAY_SIZE(qcm2290_usb3_rx_tbl), 484 481 .pcs_tbl = qcm2290_usb3_pcs_tbl, 485 482 .pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl), 483 + .reset_list = usb3phy_reset_l, 484 + .num_resets = ARRAY_SIZE(usb3phy_reset_l), 486 485 .vreg_list = qmp_phy_sm2290_vreg_l, 487 486 .num_vregs = ARRAY_SIZE(qmp_phy_sm2290_vreg_l), 488 487 .regs = qmp_v3_usb3phy_regs_layout_qcm2290, ··· 501 496 .rx_tbl_num = ARRAY_SIZE(sdm660_usb3_rx_tbl), 502 497 .pcs_tbl = qcm2290_usb3_pcs_tbl, 503 498 .pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl), 499 + .reset_list = usb3phy_reset_l, 500 + .num_resets = ARRAY_SIZE(usb3phy_reset_l), 504 501 .vreg_list = qmp_phy_msm8998_vreg_l, 505 502 .num_vregs = ARRAY_SIZE(qmp_phy_msm8998_vreg_l), 506 503 .regs = qmp_v3_usb3phy_regs_layout_qcm2290, ··· 519 512 .rx_tbl_num = ARRAY_SIZE(qcm2290_usb3_rx_tbl), 520 513 .pcs_tbl = qcm2290_usb3_pcs_tbl, 521 514 .pcs_tbl_num = ARRAY_SIZE(qcm2290_usb3_pcs_tbl), 515 + .reset_list = usb3phy_reset_l, 516 + .num_resets = ARRAY_SIZE(usb3phy_reset_l), 522 517 .vreg_list = qmp_phy_qcs615_vreg_l, 523 518 .num_vregs = ARRAY_SIZE(qmp_phy_qcs615_vreg_l), 524 519 .regs = qmp_v3_usb3phy_regs_layout_qcm2290, ··· 1060 1051 "failed to get pipe clock\n"); 1061 1052 } 1062 1053 1063 - ret = qmp_usbc_reset_init(qmp, usb3phy_reset_l, 1064 - ARRAY_SIZE(usb3phy_reset_l)); 1054 + ret = qmp_usbc_reset_init(qmp, cfg->reset_list, cfg->num_resets); 1065 1055 if (ret) 1066 1056 return ret; 1067 1057