[4/4] net: ethernet: ravb: Name the AVB functional clock fck
diff mbox series

Message ID 20201228213121.2331449-4-aford173@gmail.com
State New, archived
Headers show
Series
  • [1/4] dt-bindings: net: renesas,etheravb: Add additional clocks
Related show

Commit Message

Adam Ford Dec. 28, 2020, 9:31 p.m. UTC
The bindings have been updated to support two clocks, but the
original clock now requires the name fck to distinguish it
from the other.

Signed-off-by: Adam Ford <aford173@gmail.com>
---
 drivers/net/ethernet/renesas/ravb_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sergei Shtylyov Dec. 29, 2020, 8:22 a.m. UTC | #1
On 29.12.2020 0:31, Adam Ford wrote:

> The bindings have been updated to support two clocks, but the
> original clock now requires the name fck to distinguish it
> from the other.
> 
> Signed-off-by: Adam Ford <aford173@gmail.com>

Reviewed-by: Sergei Shtylyov <sergei.shtylyov@gmail.com>

MBR, Sergei
Geert Uytterhoeven Jan. 4, 2021, 10:41 a.m. UTC | #2
Hi Adam,

On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <aford173@gmail.com> wrote:
> The bindings have been updated to support two clocks, but the
> original clock now requires the name fck to distinguish it
> from the other.
>
> Signed-off-by: Adam Ford <aford173@gmail.com>

Thanks for your patch!

> --- a/drivers/net/ethernet/renesas/ravb_main.c
> +++ b/drivers/net/ethernet/renesas/ravb_main.c
> @@ -2142,7 +2142,7 @@ static int ravb_probe(struct platform_device *pdev)
>
>         priv->chip_id = chip_id;
>
> -       priv->clk = devm_clk_get(&pdev->dev, NULL);
> +       priv->clk = devm_clk_get(&pdev->dev, "fck");

This change is not backwards compatible, as existing DTB files do not
have the "fck" clock.  So the driver has to keep on assuming the first
clock is the functional clock, and this patch is thus not needed nor
desired.

>         if (IS_ERR(priv->clk)) {
>                 error = PTR_ERR(priv->clk);
>                 goto out_release;

Gr{oetje,eeting}s,

                        Geert
Adam Ford Jan. 5, 2021, 12:53 p.m. UTC | #3
On Mon, Jan 4, 2021 at 4:41 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Adam,
>
> On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <aford173@gmail.com> wrote:
> > The bindings have been updated to support two clocks, but the
> > original clock now requires the name fck to distinguish it
> > from the other.
> >
> > Signed-off-by: Adam Ford <aford173@gmail.com>
>
> Thanks for your patch!
>
> > --- a/drivers/net/ethernet/renesas/ravb_main.c
> > +++ b/drivers/net/ethernet/renesas/ravb_main.c
> > @@ -2142,7 +2142,7 @@ static int ravb_probe(struct platform_device *pdev)
> >
> >         priv->chip_id = chip_id;
> >
> > -       priv->clk = devm_clk_get(&pdev->dev, NULL);
> > +       priv->clk = devm_clk_get(&pdev->dev, "fck");
>
> This change is not backwards compatible, as existing DTB files do not
> have the "fck" clock.  So the driver has to keep on assuming the first
> clock is the functional clock, and this patch is thus not needed nor
> desired.

Should I post a V2 with this removed, or can this patch just be excluded?

adam
>
> >         if (IS_ERR(priv->clk)) {
> >                 error = PTR_ERR(priv->clk);
> >                 goto out_release;
>
> Gr{oetje,eeting}s,
>
>                         Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
>
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds
Geert Uytterhoeven Jan. 8, 2021, 2:13 p.m. UTC | #4
Hi Adam,

On Tue, Jan 5, 2021 at 1:53 PM Adam Ford <aford173@gmail.com> wrote:
> On Mon, Jan 4, 2021 at 4:41 AM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Mon, Dec 28, 2020 at 10:32 PM Adam Ford <aford173@gmail.com> wrote:
> > > The bindings have been updated to support two clocks, but the
> > > original clock now requires the name fck to distinguish it
> > > from the other.
> > >
> > > Signed-off-by: Adam Ford <aford173@gmail.com>
> >
> > Thanks for your patch!
> >
> > > --- a/drivers/net/ethernet/renesas/ravb_main.c
> > > +++ b/drivers/net/ethernet/renesas/ravb_main.c
> > > @@ -2142,7 +2142,7 @@ static int ravb_probe(struct platform_device *pdev)
> > >
> > >         priv->chip_id = chip_id;
> > >
> > > -       priv->clk = devm_clk_get(&pdev->dev, NULL);
> > > +       priv->clk = devm_clk_get(&pdev->dev, "fck");
> >
> > This change is not backwards compatible, as existing DTB files do not
> > have the "fck" clock.  So the driver has to keep on assuming the first
> > clock is the functional clock, and this patch is thus not needed nor
> > desired.
>
> Should I post a V2 with this removed, or can this patch just be excluded?

As far as I am concerned, it can just be excluded.
Patches 1 and 2+3 have to follow different maintainer paths anyway.

Gr{oetje,eeting}s,

                        Geert

Patch
diff mbox series

diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c
index bd30505fbc57..99a6ef9c15c1 100644
--- a/drivers/net/ethernet/renesas/ravb_main.c
+++ b/drivers/net/ethernet/renesas/ravb_main.c
@@ -2142,7 +2142,7 @@  static int ravb_probe(struct platform_device *pdev)
 
 	priv->chip_id = chip_id;
 
-	priv->clk = devm_clk_get(&pdev->dev, NULL);
+	priv->clk = devm_clk_get(&pdev->dev, "fck");
 	if (IS_ERR(priv->clk)) {
 		error = PTR_ERR(priv->clk);
 		goto out_release;