diff mbox series

[v2,28/30] phy: qcom-qmp-pcie-msm8996: drop pipe clock lane suffix

Message ID 20220707134725.3512-29-johan+linaro@kernel.org (mailing list archive)
State Superseded
Headers show
Series phy: qcom,qmp: fix dt-bindings and deprecate lane suffix | expand

Commit Message

Johan Hovold July 7, 2022, 1:47 p.m. UTC
The pipe clock is defined in the "lane" node so there's no need to keep
adding a redundant lane-number suffix to the clock name.

Update driver to support the new binding where the pipe clock name has
been deprecated by instead requesting the clock by index.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Krzysztof Kozlowski July 14, 2022, 9:29 a.m. UTC | #1
On 07/07/2022 15:47, Johan Hovold wrote:
> The pipe clock is defined in the "lane" node so there's no need to keep
> adding a redundant lane-number suffix to the clock name.
> 
> Update driver to support the new binding where the pipe clock name has
> been deprecated by instead requesting the clock by index.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 4 +---


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof
Krzysztof Kozlowski July 14, 2022, 9:30 a.m. UTC | #2
On 07/07/2022 15:47, Johan Hovold wrote:
> The pipe clock is defined in the "lane" node so there's no need to keep
> adding a redundant lane-number suffix to the clock name.
> 
> Update driver to support the new binding where the pipe clock name has
> been deprecated by instead requesting the clock by index.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>  drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> index 812d14afb5ec..af2f14a53b38 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> @@ -872,7 +872,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];

Wait, it looks like your patchset is not bisectable. Be sure each commit
compiles cleanly.

Best regards,
Krzysztof
Johan Hovold July 14, 2022, 9:49 a.m. UTC | #3
On Thu, Jul 14, 2022 at 11:30:36AM +0200, Krzysztof Kozlowski wrote:
> On 07/07/2022 15:47, Johan Hovold wrote:
> > The pipe clock is defined in the "lane" node so there's no need to keep
> > adding a redundant lane-number suffix to the clock name.
> > 
> > Update driver to support the new binding where the pipe clock name has
> > been deprecated by instead requesting the clock by index.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >  drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 4 +---
> >  1 file changed, 1 insertion(+), 3 deletions(-)
> > 
> > diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> > index 812d14afb5ec..af2f14a53b38 100644
> > --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> > +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> > @@ -872,7 +872,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];
> 
> Wait, it looks like your patchset is not bisectable. Be sure each commit
> compiles cleanly.

Ah, crap. I apparently fixed up the wrong commit when I noticed the
unused prop_name variable.

Will fix in v3.

Johan
diff mbox series

Patch

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
index 812d14afb5ec..af2f14a53b38 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
@@ -872,7 +872,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);
@@ -904,8 +903,7 @@  int qcom_qmp_phy_pcie_msm8996_create(struct device *dev, struct device_node *np,
 	if (!qphy->pcs_misc)
 		dev_vdbg(dev, "PHY pcs_misc-reg not used\n");
 
-	snprintf(prop_name, sizeof(prop_name), "pipe%d", id);
-	qphy->pipe_clk = devm_get_clk_from_child(dev, np, prop_name);
+	qphy->pipe_clk = devm_get_clk_from_child(dev, np, NULL);
 	if (IS_ERR(qphy->pipe_clk)) {
 		return dev_err_probe(dev, PTR_ERR(qphy->pipe_clk),
 				     "failed to get lane%d pipe clock\n", id);