Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1391091

Re: [PATCH v2] net: macb: do not scan PHYs manually

From Andrew Lunn <andrew@lunn.ch>
Newsgroups linux.kernel
Subject Re: [PATCH v2] net: macb: do not scan PHYs manually
Date 2016-04-29 15:00 +0200
Message-ID <rtgbw-69i-19@gated-at.bofh.it> (permalink)
References (5 earlier) <rt1ma-2o0-3@gated-at.bofh.it> <rt1Fw-2Aw-17@gated-at.bofh.it> <rt4Dn-52y-1@gated-at.bofh.it> <rtfIt-5Wt-11@gated-at.bofh.it> <rtg1S-657-35@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


> > +static int macb_mii_of_init(struct macb *bp, struct device_node *np)
> > +{
> > +	struct device_node *mdio;
> > +	int err, i;
> > +
> > +	mdio = of_get_child_by_name(np, "mdio");
> > +	if (mdio)
> > +		return of_mdiobus_register(bp->mii_bus, mdio);
> > +
> > +	dev_warn(&bp->pdev->dev,
> > +		 "using deprecated PHY probing mechanism.  Please update device tree.");
> 
> Do we need to warn here?
> 
> Too bad I was not aware of that earlier, I even updated some of my DTs
> recently with only a phy node without the "mdio" one as parents :-\

It is messy. Unfortunately, there is no binding documentation (yet)
suggesting the right way to do this. And as a result, we have
drivers/device trees doing different things, leading to workarounds
like manually scanning the bus, not listing PHYs in the device tree
and so or falling back to the old methods, etc.

We need to document how we expect this to be done, and then add
warnings in various places to encourage developers to migrate their
device trees to what has been documented.

       Andrew

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2] net: macb: do not scan PHYs manually Nathan Sullivan <nathan.sullivan@ni.com> - 2016-04-28 16:50 +0200
  Re: [PATCH v2] net: macb: do not scan PHYs manually Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-04-28 17:50 +0200
    Re: [PATCH v2] net: macb: do not scan PHYs manually Nathan Sullivan <nathan.sullivan@ni.com> - 2016-04-28 18:00 +0200
      Re: [PATCH v2] net: macb: do not scan PHYs manually Andrew Lunn <andrew@lunn.ch> - 2016-04-28 18:40 +0200
        Re: [PATCH v2] net: macb: do not scan PHYs manually Nathan Sullivan <nathan.sullivan@ni.com> - 2016-04-28 20:00 +0200
          Re: [PATCH v2] net: macb: do not scan PHYs manually Andrew Lunn <andrew@lunn.ch> - 2016-04-28 20:50 +0200
            Re: [PATCH v2] net: macb: do not scan PHYs manually Nathan Sullivan <nathan.sullivan@ni.com> - 2016-04-28 21:00 +0200
              Re: [PATCH v2] net: macb: do not scan PHYs manually Andrew Lunn <andrew@lunn.ch> - 2016-04-28 21:00 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Florian Fainelli <f.fainelli@gmail.com> - 2016-04-28 22:10 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Andrew Lunn <andrew@lunn.ch> - 2016-04-28 22:20 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Josh Cartwright <joshc@ni.com> - 2016-04-28 23:10 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Andrew Lunn <andrew@lunn.ch> - 2016-04-28 23:30 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Josh Cartwright <joshc@ni.com> - 2016-04-29 02:40 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Josh Cartwright <joshc@ni.com> - 2016-04-29 14:30 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Andrew Lunn <andrew@lunn.ch> - 2016-04-29 14:50 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Nicolas Ferre <nicolas.ferre@atmel.com> - 2016-04-29 14:50 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Andrew Lunn <andrew@lunn.ch> - 2016-04-29 15:00 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Josh Cartwright <joshc@ni.com> - 2016-05-02 21:00 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Florian Fainelli <f.fainelli@gmail.com> - 2016-05-02 21:10 +0200
                Re: [PATCH v2] net: macb: do not scan PHYs manually Josh Cartwright <joshc@ni.com> - 2016-05-02 21:40 +0200

csiph-web