Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-12 Thread Andrew Lunn
> So the plan to fix this warning is, when device_bind_driver() is called: > 1. Delete all device links from the device (in this case, the PHY) to > suppliers that haven't probed yet because there's no probe function > that can defer at this point. Just because it currently does not happen, does n

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-11 Thread Saravana Kannan
On Thu, Feb 11, 2021 at 5:57 AM Andrew Lunn wrote: > > > Yeah, I plan to fix this. So I have a few more questions. In the > > example I gave, what should happen if the gpios listed in the phy's DT > > node aren't ready yet? > > There are four different use cases for GPIO. > > 1) The GPIO is used t

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-11 Thread Andrew Lunn
On Thu, Feb 11, 2021 at 10:21:03AM +, Jon Hunter wrote: > > On 10/02/2021 22:56, Andrew Lunn wrote: > > On Wed, Feb 10, 2021 at 02:13:48PM -0800, Saravana Kannan wrote: > >> Hi, > >> > >> This email was triggered by this other email[1]. > > > > And it appears the Tegra194 Jetson Xavier uses t

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-11 Thread Andrew Lunn
> Yeah, I plan to fix this. So I have a few more questions. In the > example I gave, what should happen if the gpios listed in the phy's DT > node aren't ready yet? There are four different use cases for GPIO. 1) The GPIO is used to reset all devices on the MDIO bus. When the bus is registered wi

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-11 Thread Jon Hunter
On 10/02/2021 22:56, Andrew Lunn wrote: > On Wed, Feb 10, 2021 at 02:13:48PM -0800, Saravana Kannan wrote: >> Hi, >> >> This email was triggered by this other email[1]. > > And it appears the Tegra194 Jetson Xavier uses the Marvell 88E1512 > PHY. So ensure the Marvell driver is available, and it

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-11 Thread Heiner Kallweit
On 11.02.2021 09:57, Saravana Kannan wrote: > On Wed, Feb 10, 2021 at 11:31 PM Heiner Kallweit wrote: >> >> On 11.02.2021 00:29, Saravana Kannan wrote: >>> On Wed, Feb 10, 2021 at 2:52 PM Andrew Lunn wrote: On Wed, Feb 10, 2021 at 02:13:48PM -0800, Saravana Kannan wrote: > Hi, >

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-11 Thread Saravana Kannan
On Wed, Feb 10, 2021 at 11:31 PM Heiner Kallweit wrote: > > On 11.02.2021 00:29, Saravana Kannan wrote: > > On Wed, Feb 10, 2021 at 2:52 PM Andrew Lunn wrote: > >> > >> On Wed, Feb 10, 2021 at 02:13:48PM -0800, Saravana Kannan wrote: > >>> Hi, > >>> > >>> This email was triggered by this other em

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-10 Thread Heiner Kallweit
On 11.02.2021 00:29, Saravana Kannan wrote: > On Wed, Feb 10, 2021 at 2:52 PM Andrew Lunn wrote: >> >> On Wed, Feb 10, 2021 at 02:13:48PM -0800, Saravana Kannan wrote: >>> Hi, >>> >>> This email was triggered by this other email[1]. >>> >>> Why is phy_attach_direct() directly calling device_bind_d

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-10 Thread Saravana Kannan
On Wed, Feb 10, 2021 at 2:52 PM Andrew Lunn wrote: > > On Wed, Feb 10, 2021 at 02:13:48PM -0800, Saravana Kannan wrote: > > Hi, > > > > This email was triggered by this other email[1]. > > > > Why is phy_attach_direct() directly calling device_bind_driver() > > instead of using bus_probe_device()?

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-10 Thread Andrew Lunn
On Wed, Feb 10, 2021 at 02:13:48PM -0800, Saravana Kannan wrote: > Hi, > > This email was triggered by this other email[1]. And it appears the Tegra194 Jetson Xavier uses the Marvell 88E1512 PHY. So ensure the Marvell driver is available, and it should get probed in the usual way, the fallback dr

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-10 Thread Andrew Lunn
On Wed, Feb 10, 2021 at 02:13:48PM -0800, Saravana Kannan wrote: > Hi, > > This email was triggered by this other email[1]. > > Why is phy_attach_direct() directly calling device_bind_driver() > instead of using bus_probe_device()? Hi Saravana So this is to do with the generic PHY, which is a s

Re: phy_attach_direct()'s use of device_bind_driver()

2021-02-10 Thread Heiner Kallweit
On 10.02.2021 23:13, Saravana Kannan wrote: > Hi, > > This email was triggered by this other email[1]. > > Why is phy_attach_direct() directly calling device_bind_driver() > instead of using bus_probe_device()? I'm asking because this is > causing device links status to not get updated correctly

phy_attach_direct()'s use of device_bind_driver()

2021-02-10 Thread Saravana Kannan
Hi, This email was triggered by this other email[1]. Why is phy_attach_direct() directly calling device_bind_driver() instead of using bus_probe_device()? I'm asking because this is causing device links status to not get updated correctly and causes this[2] warning. We can fix the device links i