[PATCH v3 7/8] net: phy: Add support to configure clock in Broadcom iProc mdio mux
From: andrew@lunn.ch (Andrew Lunn)
Date: 2018-08-01 20:07:24
Also in:
linux-devicetree, lkml, netdev
From: andrew@lunn.ch (Andrew Lunn)
Date: 2018-08-01 20:07:24
Also in:
linux-devicetree, lkml, netdev
My intention was to proceed with probe if the clock is not found in the DT. If the clock is specified in the DT, make use of it.
You might want to look at what phy_optional_get() does. If the phy does not exist in DT, it does not return an error, but a NULL phy. You can pass NULL to all the other calls generic phy_ calls. If there is a real error, it returns it. That makes the driver code much simpler. You might want to consider adding clk_optional_get() and devm_clk_optional_get(). Andrew