Re: [PATCH net-next v4 3/4] net: mdio: of: export part of of_mdiobus_register_phy()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 21, 2020 at 02:52:18PM +0200, Oleksij Rempel wrote:
> This function will be needed in tja11xx driver for secondary PHY
> support.
> 
> Signed-off-by: Oleksij Rempel <o.rempel@xxxxxxxxxxxxxx>
> ---
>  drivers/of/of_mdio.c    | 73 ++++++++++++++++++++++++-----------------
>  include/linux/of_mdio.h | 11 ++++++-
>  2 files changed, 52 insertions(+), 32 deletions(-)
> 
> diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
> index 8270bbf505fb..d9e637b624ce 100644
> --- a/drivers/of/of_mdio.c
> +++ b/drivers/of/of_mdio.c
> @@ -60,39 +60,15 @@ static struct mii_timestamper *of_find_mii_timestamper(struct device_node *node)
>  	return register_mii_timestamper(arg.np, arg.args[0]);
>  }
>  
> -static int of_mdiobus_register_phy(struct mii_bus *mdio,
> -				    struct device_node *child, u32 addr)
> +int __of_mdiobus_register_phy(struct mii_bus *mdio, struct phy_device *phy,
> +			      struct device_node *child, u32 addr)
>  {

Hi Oleksij

I would prefer a different name. __foo functions often indicate
locking is needed, or an internal API which should not be used except
internally. This is going to be an official API. Maybe call it
of_mdiobus_phy_device_register() ?

	 Andrew



[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux