Re: [RFC] net: qcom/emac: mdiobus-dev fwnode should point to emac-adev
From: Andrew Lunn <andrew@lunn.ch>
Date: 2018-01-25 16:00:01
On Thu, Jan 25, 2018 at 09:40:45AM -0600, Timur Tabi wrote:
On 01/25/2018 08:15 AM, Andrew Lunn wrote:quoted
If i'm reading your patch correctly, you are looking for the MDIO reset in the MAC node. This is wrong. It is an MDIO property, so should be in the MDIO device. Once we have figured out how to represent MDIO busses in ACPI, the reset will be in the MDIO node.Just FYI, the MDIO controller in the EMAC is integrated, so I can't see us creating a separate Device Tree or ACPI node/property for it. Granted, the code in emac-phy.c:emac_phy_config() that registers the MDIO bus is convoluted, so maybe there's an opportunity to replace some/all of that code with some generic API. Maybe we need something like acpi_mdiobus_register() like we have of_mdiobus_register().
Hi Timur I expect we will implement something like acpi_mdiobus_register(), and it will take a pointer to an ACPI node. And maybe on top of of_mdiobus_register() and of_mdiobus_register() we will add a device_mdiobus_register(). What i'm trying to avoid is drivers ending up with different ACPI bindings. If you don't want to add an ACPI node/property then no problems, just don't expect to be able to use any of the optional features of the MDIO core, like the GPIOs for reset. Andrew