Re: [PATCH v3 7/8] net: phy: Add support to configure clock in Broadcom iProc mdio mux

From: Andrew Lunn
Date: Wed Aug 01 2018 - 16:07:24 EST


> 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