[linux-sunxi] Re: [PATCH v4 2/3] phy: handle optional regulator for PHY

2022-11-15 Thread Andrew Lunn
On Tue, Nov 15, 2022 at 07:36:02AM +, Corentin Labbe wrote: > Add handling of optional regulators for PHY. > Regulators need to be enabled before PHY scanning, so MDIO bus > initiate this task. > > Signed-off-by: Corentin Labbe > --- > drivers/net/mdio/fwnode_mdio.c | 31

[linux-sunxi] Re: [PATCH v4 0/3] arm64: add ethernet to orange pi 3

2022-11-15 Thread Andrew Lunn
> But this way could have some problem, a netdev driver could handle > already its PHY (like dwmac-sun8i already do) and so both phy-core and > the netdev will use both. > It is why phy-supply was renamed in ephy-supply in patch #3. A MAC driver will put its DT properties in the MAC node. A PHY

[linux-sunxi] Re: [PATCH v4 2/3] phy: handle optional regulator for PHY

2022-11-15 Thread Andrew Lunn
> + reg_cnt = of_regulator_bulk_get_all(>dev, nchild, > ); This allocates memory for consumers? I don't see it being freed. I think you need to add to phy_remove. Plus the error patch should also free it. Andrew -- You received this message because you are subscribed

[linux-sunxi] Re: [PATCH v4 1/3] regulator: Add of_regulator_bulk_get_all

2022-11-15 Thread Mark Brown
On Tue, Nov 15, 2022 at 11:18:50AM +0100, Corentin LABBE wrote: > Le Tue, Nov 15, 2022 at 10:03:14AM +, Mark Brown a écrit : > > What's the use case - why would a device not know which supplies > > it requires? This just looks like an invitation to badly written > > consumers TBH. > The

[linux-sunxi] Re: [PATCH v4 1/3] regulator: Add of_regulator_bulk_get_all

2022-11-15 Thread Mark Brown
On Tue, Nov 15, 2022 at 07:36:01AM +, Corentin Labbe wrote: > It work exactly like regulator_bulk_get() but instead of working on a > provided list of names, it seek all consumers properties matching > xxx-supply. What's the use case - why would a device not know which supplies it requires?

[linux-sunxi] Re: [PATCH v4 1/3] regulator: Add of_regulator_bulk_get_all

2022-11-15 Thread Mark Brown
On Tue, Nov 15, 2022 at 10:42:50AM +, Russell King (Oracle) wrote: > On Tue, Nov 15, 2022 at 10:34:41AM +, Mark Brown wrote: > > Well, it's not making this maintainer happy :/ If we know what > > PHY is there why not just look up the set of supplies based on > > the compatible of the

[linux-sunxi] Re: [PATCH v4 1/3] regulator: Add of_regulator_bulk_get_all

2022-11-15 Thread Andrew Lunn
On Tue, Nov 15, 2022 at 11:16:53AM +, Mark Brown wrote: > On Tue, Nov 15, 2022 at 10:42:50AM +, Russell King (Oracle) wrote: > > On Tue, Nov 15, 2022 at 10:34:41AM +, Mark Brown wrote: > > > > Well, it's not making this maintainer happy :/ If we know what > > > PHY is there why not