diff mbox series

[2/4] drivers: pci: dwc: pci-imx6: update binding to generic name

Message ID 20200410004738.19668-3-ansuelsmth@gmail.com
State New
Headers show
Series Move tx-deempth and tx swing to pci.txt | expand

Commit Message

Ansuel Smith April 10, 2020, 12:47 a.m. UTC
Rename specific bindings to generic name.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
---
 drivers/pci/controller/dwc/pci-imx6.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Comments

Fabio Estevam April 10, 2020, 2:24 a.m. UTC | #1
Hi Ansuel,

On Thu, Apr 9, 2020 at 9:47 PM Ansuel Smith <ansuelsmth@gmail.com> wrote:
>
> Rename specific bindings to generic name.
>
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
>  drivers/pci/controller/dwc/pci-imx6.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index acfbd34032a8..4ac140e007b4 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1146,28 +1146,28 @@ static int imx6_pcie_probe(struct platform_device *pdev)
>         }
>
>         /* Grab PCIe PHY Tx Settings */
> -       if (of_property_read_u32(node, "fsl,tx-deemph-gen1",
> +       if (of_property_read_u32(node, "tx-deemph-gen1",

This breaks compatibility with older dtbs.
Ansuel Smith April 10, 2020, 11:07 a.m. UTC | #2
> Hi Ansuel,
> 
> On Thu, Apr 9, 2020 at 9:47 PM Ansuel Smith <ansuelsmth@gmail.com>
> wrote:
> >
> > Rename specific bindings to generic name.
> >
> > Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> > ---
> >  drivers/pci/controller/dwc/pci-imx6.c | 12 ++++++------
> >  1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/drivers/pci/controller/dwc/pci-imx6.c
> b/drivers/pci/controller/dwc/pci-imx6.c
> > index acfbd34032a8..4ac140e007b4 100644
> > --- a/drivers/pci/controller/dwc/pci-imx6.c
> > +++ b/drivers/pci/controller/dwc/pci-imx6.c
> > @@ -1146,28 +1146,28 @@ static int imx6_pcie_probe(struct
> platform_device *pdev)
> >         }
> >
> >         /* Grab PCIe PHY Tx Settings */
> > -       if (of_property_read_u32(node, "fsl,tx-deemph-gen1",
> > +       if (of_property_read_u32(node, "tx-deemph-gen1",
> 
> This breaks compatibility with older dtbs.

so no chance of changing this?
Fabio Estevam April 10, 2020, 12:31 p.m. UTC | #3
Hi Ansuel,

On Fri, Apr 10, 2020 at 8:07 AM <ansuelsmth@gmail.com> wrote:

> so no chance of changing this?

Reading the commit log I don't see any explanation as to why you need
to change the current bindings.

What is the motivation for doing this? Is this really worth it?
Ansuel Smith April 10, 2020, 12:40 p.m. UTC | #4
> Hi Ansuel,
> 
> On Fri, Apr 10, 2020 at 8:07 AM <ansuelsmth@gmail.com> wrote:
> 
> > so no chance of changing this?
> 
> Reading the commit log I don't see any explanation as to why you need
> to change the current bindings.
> 
> What is the motivation for doing this? Is this really worth it?

It's really to not have the same exact binding to 2 different driver.
If this would cause problem I will use qcom,tx-deemph...... but still it looks
wrong to me having this. How should I proceed?
Fabio Estevam April 10, 2020, 12:57 p.m. UTC | #5
On Fri, Apr 10, 2020 at 9:40 AM <ansuelsmth@gmail.com> wrote:

> It's really to not have the same exact binding to 2 different driver.
> If this would cause problem I will use qcom,tx-deemph...... but still it looks
> wrong to me having this. How should I proceed?

You could make the imx6 PCI driver to accept both the new and old
binding versions.

This way we can keep compatibility with old dtb's.

Also, if you respin this, please state the motivation that you
explained here in the commit log.
Bjorn Helgaas April 13, 2020, 8:25 p.m. UTC | #6
If/when you repost this, please update the subject to match the
convention:

  $ git log --oneline drivers/pci/controller/dwc/pci-imx6.c
  2170a09fb4b0 PCI: imx6: Propagate errors for optional regulators
  075af61c19cd PCI: imx6: Limit DBI register length
  1b8df7aa7874 PCI: imx6: Allow asynchronous probing
  87cb312777b5 PCI: imx6: Use usleep_range() in imx6_pcie_enable_ref_clk()

As Fabio pointed out, we can't break backward compatibility without a
good reason.

On Fri, Apr 10, 2020 at 02:47:36AM +0200, Ansuel Smith wrote:
> Rename specific bindings to generic name.
> 
> Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
> ---
>  drivers/pci/controller/dwc/pci-imx6.c | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
> index acfbd34032a8..4ac140e007b4 100644
> --- a/drivers/pci/controller/dwc/pci-imx6.c
> +++ b/drivers/pci/controller/dwc/pci-imx6.c
> @@ -1146,28 +1146,28 @@ static int imx6_pcie_probe(struct platform_device *pdev)
>  	}
>  
>  	/* Grab PCIe PHY Tx Settings */
> -	if (of_property_read_u32(node, "fsl,tx-deemph-gen1",
> +	if (of_property_read_u32(node, "tx-deemph-gen1",
>  				 &imx6_pcie->tx_deemph_gen1))
>  		imx6_pcie->tx_deemph_gen1 = 0;
>  
> -	if (of_property_read_u32(node, "fsl,tx-deemph-gen2-3p5db",
> +	if (of_property_read_u32(node, "tx-deemph-gen2-3p5db",
>  				 &imx6_pcie->tx_deemph_gen2_3p5db))
>  		imx6_pcie->tx_deemph_gen2_3p5db = 0;
>  
> -	if (of_property_read_u32(node, "fsl,tx-deemph-gen2-6db",
> +	if (of_property_read_u32(node, "tx-deemph-gen2-6db",
>  				 &imx6_pcie->tx_deemph_gen2_6db))
>  		imx6_pcie->tx_deemph_gen2_6db = 20;
>  
> -	if (of_property_read_u32(node, "fsl,tx-swing-full",
> +	if (of_property_read_u32(node, "tx-swing-full",
>  				 &imx6_pcie->tx_swing_full))
>  		imx6_pcie->tx_swing_full = 127;
>  
> -	if (of_property_read_u32(node, "fsl,tx-swing-low",
> +	if (of_property_read_u32(node, "tx-swing-low",
>  				 &imx6_pcie->tx_swing_low))
>  		imx6_pcie->tx_swing_low = 127;
>  
>  	/* Limit link speed */
> -	ret = of_property_read_u32(node, "fsl,max-link-speed",
> +	ret = of_property_read_u32(node, "max-link-speed",
>  				   &imx6_pcie->link_gen);
>  	if (ret)
>  		imx6_pcie->link_gen = 1;
> -- 
> 2.25.1
>
diff mbox series

Patch

diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c
index acfbd34032a8..4ac140e007b4 100644
--- a/drivers/pci/controller/dwc/pci-imx6.c
+++ b/drivers/pci/controller/dwc/pci-imx6.c
@@ -1146,28 +1146,28 @@  static int imx6_pcie_probe(struct platform_device *pdev)
 	}
 
 	/* Grab PCIe PHY Tx Settings */
-	if (of_property_read_u32(node, "fsl,tx-deemph-gen1",
+	if (of_property_read_u32(node, "tx-deemph-gen1",
 				 &imx6_pcie->tx_deemph_gen1))
 		imx6_pcie->tx_deemph_gen1 = 0;
 
-	if (of_property_read_u32(node, "fsl,tx-deemph-gen2-3p5db",
+	if (of_property_read_u32(node, "tx-deemph-gen2-3p5db",
 				 &imx6_pcie->tx_deemph_gen2_3p5db))
 		imx6_pcie->tx_deemph_gen2_3p5db = 0;
 
-	if (of_property_read_u32(node, "fsl,tx-deemph-gen2-6db",
+	if (of_property_read_u32(node, "tx-deemph-gen2-6db",
 				 &imx6_pcie->tx_deemph_gen2_6db))
 		imx6_pcie->tx_deemph_gen2_6db = 20;
 
-	if (of_property_read_u32(node, "fsl,tx-swing-full",
+	if (of_property_read_u32(node, "tx-swing-full",
 				 &imx6_pcie->tx_swing_full))
 		imx6_pcie->tx_swing_full = 127;
 
-	if (of_property_read_u32(node, "fsl,tx-swing-low",
+	if (of_property_read_u32(node, "tx-swing-low",
 				 &imx6_pcie->tx_swing_low))
 		imx6_pcie->tx_swing_low = 127;
 
 	/* Limit link speed */
-	ret = of_property_read_u32(node, "fsl,max-link-speed",
+	ret = of_property_read_u32(node, "max-link-speed",
 				   &imx6_pcie->link_gen);
 	if (ret)
 		imx6_pcie->link_gen = 1;