Skip to content

Commit

Permalink
phy: qcom-qmp-pcie-msm8996: drop reset lane suffix
Browse files Browse the repository at this point in the history
The lane reset is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the reset name.

Update driver to support the new binding where the "lane" reset name has
been deprecated by instead requesting the reset by index.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220830112923.3725-30-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
  • Loading branch information
Johan Hovold authored and Vinod Koul committed Aug 30, 2022
1 parent 302db46 commit 5337b24
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,6 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
struct qcom_qmp *qmp = dev_get_drvdata(dev);
struct phy *generic_phy;
struct qmp_phy *qphy;
char prop_name[MAX_PROP_NAME];
int ret;

qphy = devm_kzalloc(dev, sizeof(*qphy), GFP_KERNEL);
Expand Down Expand Up @@ -898,9 +897,7 @@ int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
"failed to get lane%d pipe clock\n", id);
}

/* Get lane reset, if any */
snprintf(prop_name, sizeof(prop_name), "lane%d", id);
qphy->lane_rst = of_reset_control_get_exclusive(np, prop_name);
qphy->lane_rst = of_reset_control_get_exclusive_by_index(np, 0);
if (IS_ERR(qphy->lane_rst)) {
dev_err(dev, "failed to get lane%d reset\n", id);
return PTR_ERR(qphy->lane_rst);
Expand Down

0 comments on commit 5337b24

Please sign in to comment.