Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-10-03 Thread Calvin Johnson
Hi Russell and Florian, On Fri, Oct 02, 2020 at 04:50:26PM +0100, Russell King - ARM Linux admin wrote: > On Fri, Oct 02, 2020 at 08:14:07AM -0700, Florian Fainelli wrote: > > On 10/2/2020 4:05 AM, Grant Likely wrote: > > > On 30/09/2020 17:04, Calvin Johnson wrote: > > > > Extract phy_id from com

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-10-03 Thread Calvin Johnson
On Fri, Oct 02, 2020 at 12:05:14PM +0100, Grant Likely wrote: > > > On 30/09/2020 17:04, Calvin Johnson wrote: > > Extract phy_id from compatible string. This will be used by > > fwnode_mdiobus_register_phy() to create phy device using the > > phy_id. > > > > Signed-off-by: Calvin Johnson > > -

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-10-02 Thread Russell King - ARM Linux admin
On Fri, Oct 02, 2020 at 08:14:07AM -0700, Florian Fainelli wrote: > On 10/2/2020 4:05 AM, Grant Likely wrote: > > On 30/09/2020 17:04, Calvin Johnson wrote: > > > Extract phy_id from compatible string. This will be used by > > > fwnode_mdiobus_register_phy() to create phy device using the > > > phy

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-10-02 Thread Florian Fainelli
On 10/2/2020 4:05 AM, Grant Likely wrote: On 30/09/2020 17:04, Calvin Johnson wrote: Extract phy_id from compatible string. This will be used by fwnode_mdiobus_register_phy() to create phy device using the phy_id. Signed-off-by: Calvin Johnson ---   drivers/net/phy/phy_device.c | 32

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-10-02 Thread Grant Likely
On 30/09/2020 17:04, Calvin Johnson wrote: Extract phy_id from compatible string. This will be used by fwnode_mdiobus_register_phy() to create phy device using the phy_id. Signed-off-by: Calvin Johnson --- drivers/net/phy/phy_device.c | 32 +++- include/linux/

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-10-02 Thread Grant Likely
On 01/10/2020 05:00, Calvin Johnson wrote: On Wed, Sep 30, 2020 at 08:19:02PM +0200, Andrew Lunn wrote: On Wed, Sep 30, 2020 at 07:07:25PM +0100, Russell King - ARM Linux admin wrote: On Wed, Sep 30, 2020 at 06:34:40PM +0200, Andrew Lunn wrote: @@ -2866,7 +2888,15 @@ EXPORT_SYMBOL_GPL(devic

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-09-30 Thread Calvin Johnson
On Wed, Sep 30, 2020 at 08:19:02PM +0200, Andrew Lunn wrote: > On Wed, Sep 30, 2020 at 07:07:25PM +0100, Russell King - ARM Linux admin > wrote: > > On Wed, Sep 30, 2020 at 06:34:40PM +0200, Andrew Lunn wrote: > > > > @@ -2866,7 +2888,15 @@ EXPORT_SYMBOL_GPL(device_phy_find_device); > > > > */ >

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-09-30 Thread Andrew Lunn
On Wed, Sep 30, 2020 at 07:07:25PM +0100, Russell King - ARM Linux admin wrote: > On Wed, Sep 30, 2020 at 06:34:40PM +0200, Andrew Lunn wrote: > > > @@ -2866,7 +2888,15 @@ EXPORT_SYMBOL_GPL(device_phy_find_device); > > > */ > > > struct fwnode_handle *fwnode_get_phy_node(struct fwnode_handle *fw

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-09-30 Thread Russell King - ARM Linux admin
On Wed, Sep 30, 2020 at 06:34:40PM +0200, Andrew Lunn wrote: > > @@ -2866,7 +2888,15 @@ EXPORT_SYMBOL_GPL(device_phy_find_device); > > */ > > struct fwnode_handle *fwnode_get_phy_node(struct fwnode_handle *fwnode) > > { > > - return fwnode_find_reference(fwnode, "phy-handle", 0); > > + stru

Re: [net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-09-30 Thread Andrew Lunn
> +/* Extract the phy ID from the compatible string of the form > + * ethernet-phy-id.. > + */ > +int fwnode_get_phy_id(struct fwnode_handle *fwnode, u32 *phy_id) > +{ > + unsigned int upper, lower; > + const char *cp; > + int ret; > + > + ret = fwnode_property_read_string(f

[net-next PATCH v1 3/7] net: phy: Introduce fwnode_get_phy_id()

2020-09-30 Thread Calvin Johnson
Extract phy_id from compatible string. This will be used by fwnode_mdiobus_register_phy() to create phy device using the phy_id. Signed-off-by: Calvin Johnson --- drivers/net/phy/phy_device.c | 32 +++- include/linux/phy.h | 5 + 2 files changed, 36 ins