[net-next PATCH v3 07/15] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

2021-01-12 Thread Calvin Johnson
Introduce fwnode_mdiobus_register_phy() to register PHYs on the mdiobus. From the compatible string, identify whether the PHY is c45 and based on this create a PHY device instance which is registered on the mdiobus. Signed-off-by: Calvin Johnson --- Changes in v3: None Changes in v2: None

[net-next PATCH v3 03/15] net: phy: Introduce phy related fwnode functions

2021-01-12 Thread Calvin Johnson
Define fwnode_phy_find_device() to iterate an mdiobus and find the phy device of the provided phy fwnode. Additionally define device_phy_find_device() to find phy device of provided device. Define fwnode_get_phy_node() to get phy_node using named reference. Signed-off-by: Calvin Johnson

[net-next PATCH v3 01/15] Documentation: ACPI: DSD: Document MDIO PHY

2021-01-12 Thread Calvin Johnson
Introduce ACPI mechanism to get PHYs registered on a MDIO bus and provide them to be connected to MAC. Describe properties "phy-handle" and "phy-mode". Signed-off-by: Calvin Johnson --- Changes in v3: None Changes in v2: - Updated with more description in document Do

[net-next PATCH v3 00/15] ACPI support for dpaa2 driver

2021-01-12 Thread Calvin Johnson
ine removal - Remove unused inclusion of acpi.h Changes in v2: - Updated with more description in document - use reverse christmas tree ordering for local variables - Refactor OF functions to use fwnode functions Calvin Johnson (15): Documentation: ACPI: DSD: Document MDIO PHY

Re: [net-next PATCH v2 10/14] device property: Introduce fwnode_get_id()

2020-12-17 Thread Calvin Johnson
On Tue, Dec 15, 2020 at 07:45:16PM +0200, Andy Shevchenko wrote: > On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson > wrote: > > > > Using fwnode_get_id(), get the reg property value for DT node > > and get the _ADR ob

Re: [net-next PATCH v2 10/14] device property: Introduce fwnode_get_id()

2020-12-17 Thread Calvin Johnson
Hi Laurent, Thanks for reviewing. On Tue, Dec 15, 2020 at 07:00:28PM +0200, Laurent Pinchart wrote: > Hi Calvin, > > Thank you for the patch. > > On Tue, Dec 15, 2020 at 10:13:11PM +0530, Calvin Johnson wrote: > > Using fwnode_get_id(), get the reg property value fo

Re: [net-next PATCH v2 09/14] net/fsl: Use fwnode_mdiobus_register()

2020-12-17 Thread Calvin Johnson
On Tue, Dec 15, 2020 at 07:55:01PM +0200, Andy Shevchenko wrote: > On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson > wrote: > > > > fwnode_mdiobus_register() internally takes care of both DT > > and ACPI cases to register mdiobus. Replace existing

Re: [net-next PATCH v2 08/14] net: mdiobus: Introduce fwnode_mdiobus_register()

2020-12-17 Thread Calvin Johnson
On Tue, Dec 15, 2020 at 07:53:26PM +0200, Andy Shevchenko wrote: > On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson > wrote: > > > > Introduce fwnode_mdiobus_register() to register PHYs on the mdiobus. > > If the fwnode is DT node, then call of_mdiobus_register(). &

Re: [net-next PATCH v2 06/14] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

2020-12-17 Thread Calvin Johnson
On Tue, Dec 15, 2020 at 07:33:40PM +0200, Andy Shevchenko wrote: > On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson > wrote: > > > > Introduce fwnode_mdiobus_register_phy() to register PHYs on the > > mdiobus. From the compatible string, identify whether the PHY is > >

Re: [net-next PATCH v2 04/14] net: phy: Introduce fwnode_get_phy_id()

2020-12-17 Thread Calvin Johnson
On Tue, Dec 15, 2020 at 07:28:10PM +0200, Andy Shevchenko wrote: > On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson > wrote: > > > > Extract phy_id from compatible string. This will be used by > > fwnode_mdiobus_register_phy() to create phy dev

Re: [net-next PATCH v2 02/14] net: phy: Introduce phy related fwnode functions

2020-12-16 Thread Calvin Johnson
On Tue, Dec 15, 2020 at 07:23:26PM +0200, Andy Shevchenko wrote: > On Tue, Dec 15, 2020 at 6:44 PM Calvin Johnson > wrote: > > > > Define fwnode_phy_find_device() to iterate an mdiobus and find the > > phy device of the provided phy fwnode. Additionally define > > de

[net-next PATCH v2 01/14] Documentation: ACPI: DSD: Document MDIO PHY

2020-12-15 Thread Calvin Johnson
Introduce ACPI mechanism to get PHYs registered on a MDIO bus and provide them to be connected to MAC. Describe properties "phy-handle" and "phy-mode". Signed-off-by: Calvin Johnson --- Changes in v2: - Updated with more description in document Documentation/firmware-gu

[net-next PATCH v2 05/14] of: mdio: Refactor of_get_phy_id()

2020-12-15 Thread Calvin Johnson
With the introduction of fwnode_get_phy_id(), refactor of_get_phy_id() to use fwnode equivalent. Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/net/mdio/of_mdio.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/net/mdio/of_mdio.c b

[net-next PATCH v2 07/14] of: mdio: Refactor of_mdiobus_register_phy()

2020-12-15 Thread Calvin Johnson
Refactor of_mdiobus_register_phy() to use fwnode_mdiobus_register_phy(). Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/net/mdio/of_mdio.c | 43 +++--- include/linux/of_mdio.h| 6 +- 2 files changed, 8 insertions(+), 41 deletions

[net-next PATCH v2 03/14] of: mdio: Refactor of_phy_find_device()

2020-12-15 Thread Calvin Johnson
Refactor of_phy_find_device() to use fwnode_phy_find_device(). Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/net/mdio/of_mdio.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c index

[net-next PATCH v2 06/14] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

2020-12-15 Thread Calvin Johnson
Introduce fwnode_mdiobus_register_phy() to register PHYs on the mdiobus. From the compatible string, identify whether the PHY is c45 and based on this create a PHY device instance which is registered on the mdiobus. Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/net/phy

[net-next PATCH v2 09/14] net/fsl: Use fwnode_mdiobus_register()

2020-12-15 Thread Calvin Johnson
Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/net/ethernet/freescale/xgmac_mdio.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale/xgmac_mdio.c index bfa2826c5545..ae

[net-next PATCH v2 13/14] net: phy: Introduce fwnode_mdio_find_device()

2020-12-15 Thread Calvin Johnson
Define fwnode_mdio_find_device() to get a pointer to the mdio_device from fwnode passed to the function. Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/net/mdio/of_mdio.c | 11 +-- drivers/net/phy/phy_device.c | 23 +++ include/linux/phy.h

[net-next PATCH v2 11/14] phylink: introduce phylink_fwnode_phy_connect()

2020-12-15 Thread Calvin Johnson
Define phylink_fwnode_phy_connect() to connect phy specified by a fwnode to a phylink instance. Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/net/phy/phylink.c | 54 +++ include/linux/phylink.h | 3 +++ 2 files changed, 57 insertions

[net-next PATCH v2 12/14] net: phylink: Refactor phylink_of_phy_connect()

2020-12-15 Thread Calvin Johnson
Refactor phylink_of_phy_connect() to use phylink_fwnode_phy_connect(). Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/net/phy/phylink.c | 39 +-- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/drivers/net/phy/phylink.c b

[net-next PATCH v2 14/14] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

2020-12-15 Thread Calvin Johnson
to mac->phylink. Signed-off-by: Calvin Johnson --- Changes in v2: - Refactor OF functions to use fwnode functions .../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 86 +++ 1 file changed, 50 insertions(+), 36 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dp

[net-next PATCH v2 08/14] net: mdiobus: Introduce fwnode_mdiobus_register()

2020-12-15 Thread Calvin Johnson
& register a phy_device for each PHY Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/net/phy/mdio_bus.c | 50 ++ include/linux/phy.h| 1 + 2 files changed, 51 insertions(+) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net

[net-next PATCH v2 10/14] device property: Introduce fwnode_get_id()

2020-12-15 Thread Calvin Johnson
Using fwnode_get_id(), get the reg property value for DT node and get the _ADR object value for ACPI node. Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/base/property.c | 26 ++ include/linux/property.h | 1 + 2 files changed, 27 insertions(+) diff

[net-next PATCH v2 04/14] net: phy: Introduce fwnode_get_phy_id()

2020-12-15 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 --- Changes in v2: None drivers/net/phy/phy_device.c | 21 + include/linux/phy.h | 5 + 2 files

[net-next PATCH v2 02/14] net: phy: Introduce phy related fwnode functions

2020-12-15 Thread Calvin Johnson
Define fwnode_phy_find_device() to iterate an mdiobus and find the phy device of the provided phy fwnode. Additionally define device_phy_find_device() to find phy device of provided device. Define fwnode_get_phy_node() to get phy_node using named reference. Signed-off-by: Calvin Johnson

[net-next PATCH v2 00/14] ACPI support for dpaa2 driver

2020-12-15 Thread Calvin Johnson
- Refactor OF functions to use fwnode functions Calvin Johnson (14): Documentation: ACPI: DSD: Document MDIO PHY net: phy: Introduce phy related fwnode functions of: mdio: Refactor of_phy_find_device() net: phy: Introduce fwnode_get_phy_id() of: mdio: Refactor of_get_phy_id() net

Re: [net-next PATCH v1] net: phy: Move of_mdio from drivers/of to drivers/net/mdio

2020-10-09 Thread Calvin Johnson
Hi Florian, On Thu, Oct 08, 2020 at 07:26:44PM -0700, Florian Fainelli wrote: > > > On 10/8/2020 7:20 PM, Calvin Johnson wrote: > > Hi Rob, > > > > On Thu, Oct 08, 2020 at 11:35:07AM -0500, Rob Herring wrote: > > > On Thu, Oct 8, 2020 at

Re: [net-next PATCH v1] net: phy: Move of_mdio from drivers/of to drivers/net/mdio

2020-10-08 Thread Calvin Johnson
Hi Rob, On Thu, Oct 08, 2020 at 11:35:07AM -0500, Rob Herring wrote: > On Thu, Oct 8, 2020 at 9:47 AM Calvin Johnson > wrote: > > > > Better place for of_mdio.c is drivers/net/mdio. > > Move of_mdio.c from drivers/of to drivers/net/mdio > > One thing off my todo l

[net-next PATCH v1] net: phy: Move of_mdio from drivers/of to drivers/net/mdio

2020-10-08 Thread Calvin Johnson
Better place for of_mdio.c is drivers/net/mdio. Move of_mdio.c from drivers/of to drivers/net/mdio Signed-off-by: Calvin Johnson --- MAINTAINERS| 2 +- drivers/net/mdio/Kconfig | 8 drivers/net/mdio/Makefile | 2 ++ drivers/{of => net/m

Re: [net-next PATCH v1 6/7] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

2020-10-07 Thread Calvin Johnson
On Sat, Oct 03, 2020 at 11:09:49PM +0530, Calvin Johnson wrote: > Hi Grant, > > On Fri, Oct 02, 2020 at 12:22:37PM +0100, Grant Likely wrote: > > > > > > > -static int dpaa2_mac_get_if_mode(struct device_node *node, > > > +static int dpaa2_mac_get_i

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: > >

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. > >

Re: [net-next PATCH v1 6/7] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

2020-10-03 Thread Calvin Johnson
Hi Grant, On Fri, Oct 02, 2020 at 12:22:37PM +0100, Grant Likely wrote: > > > On 30/09/2020 17:04, Calvin Johnson wrote: > > Modify dpaa2_mac_connect() to support ACPI along with DT. > > Modify dpaa2_mac_get_node() to get the dpmac fwnode from either > > D

Re: [net-next PATCH v1 6/7] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

2020-10-03 Thread Calvin Johnson
Hi Andy, On Thu, Oct 01, 2020 at 06:36:06PM +0300, Andy Shevchenko wrote: > On Wed, Sep 30, 2020 at 7:06 PM Calvin Johnson > wrote: > > > > Modify dpaa2_mac_connect() to support ACPI along with DT. > > Modify dpaa2_mac_get_node() to get the dpmac fwnode fr

Re: [net-next PATCH v1 1/7] Documentation: ACPI: DSD: Document MDIO PHY

2020-10-01 Thread Calvin Johnson
Hi Rafael, On Wed, Sep 30, 2020 at 06:37:09PM +0200, Rafael J. Wysocki wrote: > On Wed, Sep 30, 2020 at 6:05 PM Calvin Johnson > wrote: > > > > Introduce ACPI mechanism to get PHYs registered on a MDIO bus and > > provide them to be connected to MAC. > > >

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 2/7] net: phy: Introduce phy related fwnode functions

2020-09-30 Thread Calvin Johnson
On Wed, Sep 30, 2020 at 03:03:49PM -0700, David Miller wrote: > From: Calvin Johnson > Date: Wed, 30 Sep 2020 21:34:25 +0530 > > > +struct phy_device *fwnode_phy_find_device(struct fwnode_handle *phy_fwnode) > > +{ > > + struct device *d; > > + struct mdio

[net-next PATCH v1 6/7] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

2020-09-30 Thread Calvin Johnson
to mac->phylink. Signed-off-by: Calvin Johnson --- .../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 79 --- 1 file changed, 50 insertions(+), 29 deletions(-) diff --git a/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c b/drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c in

[net-next PATCH v1 7/7] net/fsl: Use _ADR ACPI object to register PHYs

2020-09-30 Thread Calvin Johnson
} // end of MDI0 - Signed-off-by: Calvin Johnson --- drivers/net/ethernet/freescale/xgmac_mdio.c | 48 +++-- 1 file changed, 44 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/freescale/xgmac_mdio.c b/drivers/net/ethernet/freescale

[net-next PATCH v1 5/7] phylink: introduce phylink_fwnode_phy_connect()

2020-09-30 Thread Calvin Johnson
Define phylink_fwnode_phy_connect() to connect phy specified by a fwnode to a phylink instance. Signed-off-by: Calvin Johnson --- drivers/net/phy/phylink.c | 51 +++ include/linux/phylink.h | 3 +++ 2 files changed, 54 insertions(+) diff --git a/drivers

[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

[net-next PATCH v1 2/7] net: phy: Introduce phy related fwnode functions

2020-09-30 Thread Calvin Johnson
Define fwnode_phy_find_device() to iterate an mdiobus and find the phy device of the provided phy fwnode. Additionally define device_phy_find_device() to find phy device of provided device. Define fwnode_get_phy_node() to get phy_node using named reference. Signed-off-by: Calvin Johnson

[net-next PATCH v1 0/7] ACPI support for dpaa2 driver

2020-09-30 Thread Calvin Johnson
() device_phy_find_device() fwnode_get_phy_node() First one helps in connecting phy to phylink instance. Next two helps in getting phy_id and registering phy to mdiobus Next two help in finding a phy on a mdiobus. Next one helps in getting phy_node from a fwnode. Calvin Johnson (7): Documentation: ACPI

[net-next PATCH v1 1/7] Documentation: ACPI: DSD: Document MDIO PHY

2020-09-30 Thread Calvin Johnson
Introduce ACPI mechanism to get PHYs registered on a MDIO bus and provide them to be connected to MAC. Describe properties "phy-handle" and "phy-mode". Signed-off-by: Calvin Johnson --- Documentation/firmware-guide/acpi/dsd/phy.rst | 78 +++ 1 file ch

[net-next PATCH v1 4/7] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

2020-09-30 Thread Calvin Johnson
Introduce fwnode_mdiobus_register_phy() to register PHYs on the mdiobus. From the compatible string, identify whether the PHY is c45 and based on this create a PHY device instance which is registered on the mdiobus. Signed-off-by: Calvin Johnson --- drivers/net/phy/mdio_bus.c | 40

Re: [net-next PATCH v2 2/3] Documentation: ACPI: DSD: Document MDIO PHY

2020-07-03 Thread Calvin Johnson
On Wed, Jul 01, 2020 at 01:27:43PM +0300, Andy Shevchenko wrote: > On Wed, Jul 1, 2020 at 9:13 AM Calvin Johnson > wrote: > > > > Introduce ACPI mechanism to get PHYs registered on a MDIO bus and > > provide them to be connected to MAC. > > > > An ACPI node

[net-next PATCH v2 2/3] Documentation: ACPI: DSD: Document MDIO PHY

2020-07-01 Thread Calvin Johnson
Introduce ACPI mechanism to get PHYs registered on a MDIO bus and provide them to be connected to MAC. An ACPI node property "mdio-handle" is introduced to reference the MDIO bus on which PHYs are registered with autoprobing method used by mdiobus_register(). Signed-off-by: Calv

[net-next PATCH v2 3/3] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

2020-07-01 Thread Calvin Johnson
connected to mac->phylink. Signed-off-by: Calvin Johnson --- Changes in v2: - clean up dpaa2_mac_get_node() - introduce find_phy_device() - use acpi_find_child_device() .../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 79 --- 1 file changed, 50 insertions(+),

[net-next PATCH v2 1/3] net: phy: introduce find_phy_device()

2020-07-01 Thread Calvin Johnson
On getting hold of the MDIO bus, use find_phy_device() to get the PHY connected to the MAC. Signed-off-by: Calvin Johnson --- Changes in v2: None drivers/net/phy/phy_device.c | 25 + include/linux/phy.h | 1 + 2 files changed, 26 insertions(+) diff --git a/drive

[net-next PATCH v2 0/3] ACPI support for dpaa2 MAC driver.

2020-07-01 Thread Calvin Johnson
() - use acpi_find_child_device() Calvin Johnson (3): net: phy: introduce find_phy_device() Documentation: ACPI: DSD: Document MDIO PHY net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver Documentation/firmware-guide/acpi/dsd/phy.rst | 40 ++ .../net/ethernet/freescale/dpaa2/dpaa2

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-11 Thread Calvin Johnson
On Mon, May 11, 2020 at 03:04:57PM +0200, Andrew Lunn wrote: > > NXP's LX2160ARDB platform currently has the following MDIO-PHY connection. > > > > MDIO-1 ==> one 40G PHY, two 1G PHYs(C45), two 10G PHYs(C22) > > MDIO-2 ==> one 25G PHY > > It has been suggested that ACPI only support a one to one

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-11 Thread Calvin Johnson
On Mon, May 11, 2020 at 11:48:17AM +0100, Russell King - ARM Linux admin wrote: > On Mon, May 11, 2020 at 03:59:30PM +0530, Calvin Johnson wrote: > > On Mon, May 11, 2020 at 10:38:49AM +0100, Russell King - ARM Linux admin > > wrote: > > > On Mon, May 11, 2020 at 01:30:40

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-11 Thread Calvin Johnson
On Mon, May 11, 2020 at 10:38:49AM +0100, Russell King - ARM Linux admin wrote: > On Mon, May 11, 2020 at 01:30:40PM +0530, Calvin Johnson wrote: > > On Sat, May 09, 2020 at 01:42:57AM +0200, Andrew Lunn wrote: > > > On Fri, May 08, 2020 at 05:48:33PM -0500, Jeremy Linton

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-11 Thread Calvin Johnson
On Sat, May 09, 2020 at 01:42:57AM +0200, Andrew Lunn wrote: > On Fri, May 08, 2020 at 05:48:33PM -0500, Jeremy Linton wrote: > > Hi, > > > > On 5/8/20 3:27 PM, Andrew Lunn wrote: > > > > > There is a very small number of devices where the vendor messed up, > > > > > and did not put valid

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-11 Thread Calvin Johnson
On Fri, May 08, 2020 at 05:48:33PM -0500, Jeremy Linton wrote: > Hi, > > On 5/8/20 3:27 PM, Andrew Lunn wrote: > > > > There is a very small number of devices where the vendor messed up, > > > > and did not put valid contents in the ID registers. In such cases, we > > > > can read the IDs from

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-10 Thread Calvin Johnson
Thanks Andrew and Jeremy for the detailed discussion! On Fri, May 08, 2020 at 08:13:01PM +0200, Andrew Lunn wrote: > > > It does have a numeric version defined for EISA types. OTOH I suspect that > > > your right. If there were a "PHY\VEN_ID_" definition, it may > > > not > > > be ideal

Re: [net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-08 Thread Calvin Johnson
On Thu, May 07, 2020 at 02:54:09PM -0500, Jeremy Linton wrote: > Hi, > > On 5/7/20 12:27 PM, Andy Shevchenko wrote: > > On Thu, May 7, 2020 at 4:26 PM Jeremy Linton wrote: > > > On 5/5/20 8:29 AM, Calvin Johnson wrote: > > > > > > +

Re: [net-next PATCH v3 5/5] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

2020-05-07 Thread Calvin Johnson
On Tue, May 05, 2020 at 05:22:00PM +0300, Andy Shevchenko wrote: > On Tue, May 5, 2020 at 4:30 PM Calvin Johnson > wrote: > > > > Introduce fwnode_mdiobus_register_phy() to register PHYs on the > > mdiobus. From the compatible string, identify whether the PHY is > >

[PATCH] coresight: cti: remove incorrect NULL return check

2020-05-06 Thread Calvin Johnson
fwnode_find_reference() doesn't return NULL and hence that check should be avoided. Signed-off-by: Calvin Johnson Reviewed-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-cti-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing

Re: [net-next PATCH v2 0/3] Introduce new APIs to support phylink and phy layers

2020-05-06 Thread Calvin Johnson
Hi Rafael, On Wed, Apr 29, 2020 at 12:26:12PM +0200, Rafael J. Wysocki wrote: > On Wed, Apr 29, 2020 at 7:38 AM Calvin Johnson > wrote: > > > > > So, yes, there's another driver using it, but the ACPI folk probably > > > never got a look-in on that instance.

[PATCH] coresight: cti: remove incorrect NULL return check

2020-05-05 Thread Calvin Johnson
fwnode_find_reference() doesn't return NULL and hence that check should be avoided. Signed-off-by: Calvin Johnson --- drivers/hwtracing/coresight/coresight-cti-platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/hwtracing/coresight/coresight-cti

[net-next PATCH v3 5/5] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

2020-05-05 Thread Calvin Johnson
Introduce fwnode_mdiobus_register_phy() to register PHYs on the mdiobus. From the compatible string, identify whether the PHY is c45 and based on this create a PHY device instance which is registered on the mdiobus. Signed-off-by: Calvin Johnson --- Changes in v3: Introduce two functions

[net-next PATCH v3 3/5] phylink: Introduce phylink_fwnode_phy_connect()

2020-05-05 Thread Calvin Johnson
Define phylink_fwnode_phy_connect() to connect phy specified by a fwnode to a phylink instance. Signed-off-by: Calvin Johnson --- Changes in v3: remove NULL return check as it is invalid remove unused phylink_device_phy_connect() Changes in v2: replace of_ and acpi_ code with generic

[net-next PATCH v3 1/5] net: phy: Introduce phy related fwnode functions

2020-05-05 Thread Calvin Johnson
Define fwnode_phy_find_device() to iterate an mdiobus and find the phy device of the provided phy fwnode. Additionally define device_phy_find_device() to find phy device of provided device. Define fwnode_get_phy_node() to get phy_node using named reference. Signed-off-by: Calvin Johnson

[net-next PATCH v3 2/5] net: phy: alphabetically sort header includes

2020-05-05 Thread Calvin Johnson
Header includes are not sorted. Alphabetically sort them. Signed-off-by: Calvin Johnson --- Changes in v3: None Changes in v2: None drivers/net/phy/phy_device.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/net/phy/phy_device.c b

[net-next PATCH v3 0/5] Introduce new fwnode based APIs to support phylink and phy layers

2020-05-05 Thread Calvin Johnson
eric fwnode to get phy-handle. Calvin Johnson (5): net: phy: Introduce phy related fwnode functions net: phy: alphabetically sort header includes phylink: Introduce phylink_fwnode_phy_connect() net: phy: Introduce fwnode_get_phy_id() net: mdiobus: Introduce fwnode_mdiobus_register

[net-next PATCH v3 4/5] net: phy: Introduce fwnode_get_phy_id()

2020-05-05 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 --- Changes in v3: None Changes in v2: None drivers/net/phy/phy_device.c | 21 + include/linux/phy.h | 5

Re: [net-next PATCH v2 0/3] Introduce new APIs to support phylink and phy layers

2020-04-30 Thread Calvin Johnson
On Mon, Apr 27, 2020 at 06:54:06PM +0530, Calvin Johnson wrote: Hi Russell, others, > Following functions are defined: > phylink_fwnode_phy_connect() > phylink_device_phy_connect() > fwnode_phy_find_device() > device_phy_find_device() > fwnode_get_phy_node() &

Re: [net-next PATCH v2 0/3] Introduce new APIs to support phylink and phy layers

2020-04-28 Thread Calvin Johnson
On Mon, Apr 27, 2020 at 03:48:07PM +0100, Russell King - ARM Linux admin wrote: > On Mon, Apr 27, 2020 at 08:02:38PM +0530, Calvin Johnson wrote: > > On Mon, Apr 27, 2020 at 02:58:20PM +0100, Russell King - ARM Linux admin > > wrote: > > > On Mon, Apr 27, 2020 at 06:54:06

<    1   2