Re: [net-next PATCH v7 04/16] of: mdio: Refactor of_phy_find_device()

2021-03-22 Thread Calvin Johnson
On Fri, Mar 19, 2021 at 11:21:15AM +, Daniel Thompson wrote: > On Wed, Mar 17, 2021 at 02:15:20PM +0530, Calvin Johnson wrote: > > Hi Daniel, > > > > On Tue, Mar 16, 2021 at 07:17:19PM +, Daniel Thompson wrote: > > > On Thu, Mar 11, 2021 at 11:49:59

Re: [net-next PATCH v7 04/16] of: mdio: Refactor of_phy_find_device()

2021-03-17 Thread Calvin Johnson
Hi Daniel, On Tue, Mar 16, 2021 at 07:17:19PM +, Daniel Thompson wrote: > On Thu, Mar 11, 2021 at 11:49:59AM +0530, Calvin Johnson wrote: > > Refactor of_phy_find_device() to use fwnode_phy_find_device(). > > > > Signed-off-by: Calvin Johnson > > This patch

[PATCH] net: mdio: Alphabetically sort header inclusion

2021-03-15 Thread Calvin Johnson
Alphabetically sort header inclusion Signed-off-by: Calvin Johnson --- drivers/net/mdio/mdio-bcm-unimac.c | 16 +++- drivers/net/mdio/mdio-bitbang.c | 4 ++-- drivers/net/mdio/mdio-cavium.c | 2 +- drivers/net/mdio/mdio-gpio.c| 10

Re: [net-next PATCH v7 11/16] net: mdio: Add ACPI support code for mdio

2021-03-15 Thread Calvin Johnson
On Thu, Mar 11, 2021 at 02:14:37PM +0200, Andy Shevchenko wrote: > On Thu, Mar 11, 2021 at 8:22 AM Calvin Johnson > wrote: > > > > Define acpi_mdiobus_register() to Register mii_bus and create PHYs for > > each ACPI child node. > > > > Signed-off-by: Calvin Jo

Re: [net-next PATCH v7 08/16] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

2021-03-11 Thread Calvin Johnson
On Thu, Mar 11, 2021 at 02:09:37PM +0200, Andy Shevchenko wrote: > On Thu, Mar 11, 2021 at 8:21 AM 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 v7 07/16] net: mii_timestamper: check NULL in unregister_mii_timestamper()

2021-03-11 Thread Calvin Johnson
On Thu, Mar 11, 2021 at 02:04:48PM +0200, Andy Shevchenko wrote: > On Thu, Mar 11, 2021 at 8:21 AM Calvin Johnson > wrote: > > > > Callers of unregister_mii_timestamper() currently check for NULL > > value of mii_ts before calling it. > > > > Place the NULL che

Re: [net-next PATCH v7 02/16] net: phy: Introduce fwnode_mdio_find_device()

2021-03-11 Thread Calvin Johnson
On Wed, Mar 10, 2021 at 10:50:57PM -0800, Saravana Kannan wrote: > On Wed, Mar 10, 2021 at 10:21 PM Calvin Johnson > wrote: > > > > Define fwnode_mdio_find_device() to get a pointer to the > > mdio_device from fwnode passed to the function. > > > > R

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

2021-03-10 Thread Calvin Johnson
-off-by: Calvin Johnson --- Changes in v7: - remove unnecassary checks Changes in v6: - use dev_fwnode() - remove useless else - replace of_device_is_available() to fwnode_device_is_available() Changes in v5: - replace fwnode_get_id() with OF and ACPI function calls Changes in v4: None Changes

[net-next PATCH v7 14/16] net: phylink: introduce phylink_fwnode_phy_connect()

2021-03-10 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 v7: None Changes in v6: - remove OF check for fixed-link Changes in v5: None Changes in v4: - call phy_device_free() before returning Changes in v3

[net-next PATCH v7 15/16] net: phylink: Refactor phylink_of_phy_connect()

2021-03-10 Thread Calvin Johnson
Refactor phylink_of_phy_connect() to use phylink_fwnode_phy_connect(). Signed-off-by: Calvin Johnson --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/phy/phylink.c | 39

[net-next PATCH v7 13/16] net/fsl: Use fwnode_mdiobus_register()

2021-03-10 Thread Calvin Johnson
Signed-off-by: Calvin Johnson --- Changes in v7: - Include fwnode_mdio.h - Alphabetically sort header inclusions Changes in v6: None Changes in v5: None Changes in v4: - Cleanup xgmac_mdio_probe() Changes in v3: - Avoid unnecessary line removal - Remove unused inclusion of acpi.h Changes i

[net-next PATCH v7 12/16] net: mdiobus: Introduce fwnode_mdiobus_register()

2021-03-10 Thread Calvin Johnson
Introduce fwnode_mdiobus_register() to register PHYs on the mdiobus. If the fwnode is DT node, then call of_mdiobus_register(). If it is an ACPI node, then call acpi_mdiobus_register(). Signed-off-by: Calvin Johnson --- Changes in v7: - Move fwnode_mdiobus_register() to fwnode_mdio.c Changes

[net-next PATCH v7 11/16] net: mdio: Add ACPI support code for mdio

2021-03-10 Thread Calvin Johnson
Define acpi_mdiobus_register() to Register mii_bus and create PHYs for each ACPI child node. Signed-off-by: Calvin Johnson --- Changes in v7: - Include headers directly used in acpi_mdio.c Changes in v6: - use GENMASK() and ACPI_COMPANION_SET() - some cleanup - remove unwanted header inclusion

[net-next PATCH v7 09/16] of: mdio: Refactor of_mdiobus_register_phy()

2021-03-10 Thread Calvin Johnson
Refactor of_mdiobus_register_phy() to use fwnode_mdiobus_register_phy(). Signed-off-by: Calvin Johnson --- Changes in v7: - include fwnode_mdio.h Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 39

[net-next PATCH v7 10/16] ACPI: utils: Introduce acpi_get_local_address()

2021-03-10 Thread Calvin Johnson
Introduce a wrapper around the _ADR evaluation. Signed-off-by: Calvin Johnson --- Changes in v7: None Changes in v6: None Changes in v5: - Replace fwnode_get_id() with acpi_get_local_address() Changes in v4: - Improve code structure to handle all cases Changes in v3: - Modified to retrieve

[net-next PATCH v7 08/16] net: mdiobus: Introduce fwnode_mdiobus_register_phy()

2021-03-10 Thread Calvin Johnson
Carpenter Signed-off-by: Calvin Johnson --- Changes in v7: - Call unregister_mii_timestamper() without NULL check - Create fwnode_mdio.c and move fwnode_mdiobus_register_phy() Changes in v6: - Initialize mii_ts to NULL Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2

[net-next PATCH v7 06/16] of: mdio: Refactor of_get_phy_id()

2021-03-10 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 v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 12

[net-next PATCH v7 07/16] net: mii_timestamper: check NULL in unregister_mii_timestamper()

2021-03-10 Thread Calvin Johnson
Callers of unregister_mii_timestamper() currently check for NULL value of mii_ts before calling it. Place the NULL check inside unregister_mii_timestamper() and update the callers accordingly. Signed-off-by: Calvin Johnson --- Changes in v7: - check NULL in unregister_mii_timestamper

[net-next PATCH v7 02/16] net: phy: Introduce fwnode_mdio_find_device()

2021-03-10 Thread Calvin Johnson
Define fwnode_mdio_find_device() to get a pointer to the mdio_device from fwnode passed to the function. Refactor of_mdio_find_device() to use fwnode_mdio_find_device(). Signed-off-by: Calvin Johnson --- Changes in v7: - correct fwnode_mdio_find_device() description Changes in v6: - fix

[net-next PATCH v7 05/16] net: phy: Introduce fwnode_get_phy_id()

2021-03-10 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 v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: - Use traditional comparison pattern

[net-next PATCH v7 04/16] of: mdio: Refactor of_phy_find_device()

2021-03-10 Thread Calvin Johnson
Refactor of_phy_find_device() to use fwnode_phy_find_device(). Signed-off-by: Calvin Johnson --- Changes in v7: None Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 13 + 1 file changed, 1 insertion

[net-next PATCH v7 00/16] ACPI support for dpaa2 driver

2021-03-10 Thread Calvin Johnson
n - Added more info into documentation - Use acpi_mdiobus_register() - Avoid unnecessary line 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

[net-next PATCH v7 03/16] net: phy: Introduce phy related fwnode functions

2021-03-10 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 v7 01/16] Documentation: ACPI: DSD: Document MDIO PHY

2021-03-10 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 v7: None Changes in v6: - Minor cleanup Changes in v5: - More cleanup C

Re: [net-next PATCH v6 10/15] net: mdio: Add ACPI support code for mdio

2021-03-08 Thread Calvin Johnson
On Mon, Mar 08, 2021 at 04:57:35PM +0200, Andy Shevchenko wrote: > On Mon, Mar 8, 2021 at 4:11 PM Calvin Johnson > wrote: > > On Thu, Feb 18, 2021 at 05:08:05PM +0200, Andy Shevchenko wrote: > > > On Thu, Feb 18, 2021 at 7:28 AM Calvin Johnson > > > wrote: > >

Re: [net-next PATCH v6 10/15] net: mdio: Add ACPI support code for mdio

2021-03-08 Thread Calvin Johnson
On Thu, Feb 18, 2021 at 05:08:05PM +0200, Andy Shevchenko wrote: > On Thu, Feb 18, 2021 at 7:28 AM Calvin Johnson > wrote: > > > > Define acpi_mdiobus_register() to Register mii_bus and create PHYs for > > each ACPI child node. > > > +#include > > +#inclu

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

2021-02-17 Thread Calvin Johnson
-off-by: Calvin Johnson --- Changes in v6: - use dev_fwnode() - remove useless else - replace of_device_is_available() to fwnode_device_is_available() Changes in v5: - replace fwnode_get_id() with OF and ACPI function calls Changes in v4: None Changes in v3: None Changes in v2: - Refactor

[net-next PATCH v6 14/15] net: phylink: Refactor phylink_of_phy_connect()

2021-02-17 Thread Calvin Johnson
Refactor phylink_of_phy_connect() to use phylink_fwnode_phy_connect(). Signed-off-by: Calvin Johnson --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/phy/phylink.c | 39 +-- 1 file changed

[net-next PATCH v6 13/15] net: phylink: introduce phylink_fwnode_phy_connect()

2021-02-17 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 v6: - remove OF check for fixed-link Changes in v5: None Changes in v4: - call phy_device_free() before returning Changes in v3: None Changes in v2

[net-next PATCH v6 12/15] net/fsl: Use fwnode_mdiobus_register()

2021-02-17 Thread Calvin Johnson
Signed-off-by: Calvin Johnson --- Changes in v6: None Changes in v5: None Changes in v4: - Cleanup xgmac_mdio_probe() Changes in v3: - Avoid unnecessary line removal - Remove unused inclusion of acpi.h Changes in v2: None drivers/net/ethernet/freescale/xgmac_mdio.c | 11 +++ 1 file

[net-next PATCH v6 09/15] ACPI: utils: Introduce acpi_get_local_address()

2021-02-17 Thread Calvin Johnson
Introduce a wrapper around the _ADR evaluation. Signed-off-by: Calvin Johnson --- Changes in v6: None Changes in v5: - Replace fwnode_get_id() with acpi_get_local_address() Changes in v4: - Improve code structure to handle all cases Changes in v3: - Modified to retrieve reg property value

[net-next PATCH v6 11/15] net: mdiobus: Introduce fwnode_mdiobus_register()

2021-02-17 Thread Calvin Johnson
Introduce fwnode_mdiobus_register() to register PHYs on the mdiobus. If the fwnode is DT node, then call of_mdiobus_register(). If it is an ACPI node, then call acpi_mdiobus_register(). Signed-off-by: Calvin Johnson --- Changes in v6: None Changes in v5: None Changes in v4: - Remove redundant

[net-next PATCH v6 10/15] net: mdio: Add ACPI support code for mdio

2021-02-17 Thread Calvin Johnson
Define acpi_mdiobus_register() to Register mii_bus and create PHYs for each ACPI child node. Signed-off-by: Calvin Johnson --- Changes in v6: - use GENMASK() and ACPI_COMPANION_SET() - some cleanup - remove unwanted header inclusion Changes in v5: - add missing MODULE_LICENSE() - replace

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

2021-02-17 Thread Calvin Johnson
Carpenter Signed-off-by: Calvin Johnson --- Changes in v6: - Initialize mii_ts to NULL Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 3 +- drivers/net/phy/mdio_bus.c | 65 ++ include/linux/mdio.h

[net-next PATCH v6 05/15] net: phy: Introduce fwnode_get_phy_id()

2021-02-17 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 v6: None Changes in v5: None Changes in v4: None Changes in v3: - Use traditional comparison pattern - Use GENMASK

[net-next PATCH v6 04/15] of: mdio: Refactor of_phy_find_device()

2021-02-17 Thread Calvin Johnson
Refactor of_phy_find_device() to use fwnode_phy_find_device(). Signed-off-by: Calvin Johnson --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 13 + 1 file changed, 1 insertion(+), 12 deletions

[net-next PATCH v6 08/15] of: mdio: Refactor of_mdiobus_register_phy()

2021-02-17 Thread Calvin Johnson
Refactor of_mdiobus_register_phy() to use fwnode_mdiobus_register_phy(). Signed-off-by: Calvin Johnson --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 40 +- 1 file changed

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

2021-02-17 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 v6 06/15] of: mdio: Refactor of_get_phy_id()

2021-02-17 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 v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 12 +--- 1 file changed

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

2021-02-17 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 v6: - Minor cleanup Changes in v5: - More cleanup Changes in v4: - More cl

[net-next PATCH v6 02/15] net: phy: Introduce fwnode_mdio_find_device()

2021-02-17 Thread Calvin Johnson
Define fwnode_mdio_find_device() to get a pointer to the mdio_device from fwnode passed to the function. Refactor of_mdio_find_device() to use fwnode_mdio_find_device(). Signed-off-by: Calvin Johnson --- Changes in v6: None Changes in v5: None Changes in v4: None Changes in v3: None Changes

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

2021-02-17 Thread Calvin Johnson
on 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 net: phy: Introduce fwnode_mdio_find_device() net: phy: Introduce phy related fwnode functions

Re: [net-next PATCH v5 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

2021-02-16 Thread Calvin Johnson
On Mon, Feb 15, 2021 at 05:15:36PM +0200, Andy Shevchenko wrote: > On Mon, Feb 15, 2021 at 5:13 PM Andy Shevchenko > wrote: > > > > On Mon, Feb 15, 2021 at 2:33 PM Calvin Johnson > > wrote: > > > On Mon, Feb 08, 2021 at 04:28:31PM +, Russell Ki

Re: [net-next PATCH v5 15/15] net: dpaa2-mac: Add ACPI support for DPAA2 MAC driver

2021-02-15 Thread Calvin Johnson
On Mon, Feb 08, 2021 at 04:28:31PM +, Russell King - ARM Linux admin wrote: > On Mon, Feb 08, 2021 at 08:42:44PM +0530, 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

Re: [net-next PATCH v5 13/15] phylink: introduce phylink_fwnode_phy_connect()

2021-02-14 Thread Calvin Johnson
On Mon, Feb 08, 2021 at 03:31:11PM +, Russell King - ARM Linux admin wrote: > On Mon, Feb 08, 2021 at 08:42:42PM +0530, Calvin Johnson wrote: > > +int phylink_fwnode_phy_connect(struct phylink *pl, > > + struct fwnode_handle *fwnode, > > +

Re: [net-next PATCH v5 13/15] phylink: introduce phylink_fwnode_phy_connect()

2021-02-14 Thread Calvin Johnson

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

2021-02-09 Thread Calvin Johnson
On Mon, Feb 08, 2021 at 05:40:13PM +, Russell King - ARM Linux admin wrote: > On Mon, Feb 08, 2021 at 08:42:36PM +0530, Calvin Johnson wrote: > > +int fwnode_mdiobus_register_phy(struct mii_bus *bus, > > + struct fwnode_handle *child, u32 addr) > &

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

2021-02-09 Thread Calvin Johnson
On Mon, Feb 08, 2021 at 12:01:57PM -0800, Randy Dunlap wrote: > Hi, > Just a couple of nits below: > > On 2/8/21 7:12 AM, Calvin Johnson wrote: > > Introduce ACPI mechanism to get PHYs registered on a MDIO bus and > > provide them to be connected to MAC. > > >

[net-next PATCH v5 11/15] net: mdiobus: Introduce fwnode_mdiobus_register()

2021-02-08 Thread Calvin Johnson
Introduce fwnode_mdiobus_register() to register PHYs on the mdiobus. If the fwnode is DT node, then call of_mdiobus_register(). If it is an ACPI node, then call acpi_mdiobus_register(). Signed-off-by: Calvin Johnson --- Changes in v5: None Changes in v4: - Remove redundant else from

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

2021-02-08 Thread Calvin Johnson
to mac->phylink. Signed-off-by: Calvin Johnson --- Changes in v5: - replace fwnode_get_id() with OF and ACPI function calls Changes in v4: None Changes in v3: None Changes in v2: - Refactor OF functions to use fwnode functions .../net/ethernet/freescale/dpaa2/dpaa2-mac.c |

[net-next PATCH v5 14/15] net: phylink: Refactor phylink_of_phy_connect()

2021-02-08 Thread Calvin Johnson
Refactor phylink_of_phy_connect() to use phylink_fwnode_phy_connect(). Signed-off-by: Calvin Johnson --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/phy/phylink.c | 39 +-- 1 file changed, 1 insertion(+), 38

[net-next PATCH v5 10/15] net: mdio: Add ACPI support code for mdio

2021-02-08 Thread Calvin Johnson
Define acpi_mdiobus_register() to Register mii_bus and create PHYs for each ACPI child node. Signed-off-by: Calvin Johnson --- Changes in v5: - add missing MODULE_LICENSE() - replace fwnode_get_id() with OF and ACPI function calls Changes in v4: None Changes in v3: None Changes in v2: None

[net-next PATCH v5 12/15] net/fsl: Use fwnode_mdiobus_register()

2021-02-08 Thread Calvin Johnson
Signed-off-by: Calvin Johnson --- Changes in v5: None Changes in v4: - Cleanup xgmac_mdio_probe() Changes in v3: - Avoid unnecessary line removal - Remove unused inclusion of acpi.h Changes in v2: None drivers/net/ethernet/freescale/xgmac_mdio.c | 11 +++ 1 file changed, 7 insert

[net-next PATCH v5 08/15] of: mdio: Refactor of_mdiobus_register_phy()

2021-02-08 Thread Calvin Johnson
Refactor of_mdiobus_register_phy() to use fwnode_mdiobus_register_phy(). Signed-off-by: Calvin Johnson --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 40 +- 1 file changed, 1 insertion(+), 39

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

2021-02-08 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 v5: None Changes in v4: None

[net-next PATCH v5 09/15] ACPI: utils: Introduce acpi_get_local_address()

2021-02-08 Thread Calvin Johnson
Introduce a wrapper around the _ADR evaluation. Signed-off-by: Calvin Johnson --- Changes in v5: - Replace fwnode_get_id() with acpi_get_local_address() Changes in v4: - Improve code structure to handle all cases Changes in v3: - Modified to retrieve reg property value for ACPI as well

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

2021-02-08 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 v5 04/15] of: mdio: Refactor of_phy_find_device()

2021-02-08 Thread Calvin Johnson
Refactor of_phy_find_device() to use fwnode_phy_find_device(). Signed-off-by: Calvin Johnson --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 13 + 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers

[net-next PATCH v5 13/15] phylink: introduce phylink_fwnode_phy_connect()

2021-02-08 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 v5: None Changes in v4: - call phy_device_free() before returning Changes in v3: None Changes in v2: None drivers/net/phy/phylink.c | 56

[net-next PATCH v5 02/15] net: phy: Introduce fwnode_mdio_find_device()

2021-02-08 Thread Calvin Johnson
Define fwnode_mdio_find_device() to get a pointer to the mdio_device from fwnode passed to the function. Refactor of_mdio_find_device() to use fwnode_mdio_find_device(). Signed-off-by: Calvin Johnson --- Changes in v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers

[net-next PATCH v5 06/15] of: mdio: Refactor of_get_phy_id()

2021-02-08 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 v5: None Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 12 +--- 1 file changed, 1 insertion(+), 11

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

2021-02-08 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 v5: - More cleanup Changes in v4: - More cleanup Changes in v3: None Chan

[net-next PATCH v5 05/15] net: phy: Introduce fwnode_get_phy_id()

2021-02-08 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 v5: None Changes in v4: None Changes in v3: - Use traditional comparison pattern - Use GENMASK Changes in v2: None

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

2021-02-08 Thread Calvin Johnson
ith 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 net: phy: Introduce fwnode_mdio_find_device() net: phy: Introduce phy related fwnode functions

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

2021-02-06 Thread Calvin Johnson
On Fri, Feb 05, 2021 at 08:58:06PM +0200, Andy Shevchenko wrote: > On Fri, Feb 5, 2021 at 8:41 PM Andy Shevchenko > wrote: > > On Fri, Feb 5, 2021 at 8:25 PM Andy Shevchenko > > wrote: > > > On Fri, Feb 5, 2021 at 7:25 PM Calvin Johnson > > > wrote: > &

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

2021-02-05 Thread Calvin Johnson
On Fri, Jan 22, 2021 at 09:12:52PM +0530, Calvin Johnson wrote: > 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

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

2021-01-28 Thread Calvin Johnson
On Thu, Jan 28, 2021 at 02:27:00PM +0100, Rafael J. Wysocki wrote: > On Thu, Jan 28, 2021 at 2:12 PM Calvin Johnson > wrote: > > > > On Thu, Jan 28, 2021 at 01:00:40PM +0100, Rafael J. Wysocki wrote: > > > On Thu, Jan 28, 2021 at 12:27 PM Calvin Johnson > > &g

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

2021-01-28 Thread Calvin Johnson
On Thu, Jan 28, 2021 at 01:00:40PM +0100, Rafael J. Wysocki wrote: > On Thu, Jan 28, 2021 at 12:27 PM Calvin Johnson > wrote: > > > > Hi Rafael, > > > > Thanks for the review. I'll work on all the comments. > > > > On Fri, Jan 22, 2021 at 08:22:21PM +0

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

2021-01-28 Thread Calvin Johnson
Hi Rafael, Thanks for the review. I'll work on all the comments. On Fri, Jan 22, 2021 at 08:22:21PM +0100, Rafael J. Wysocki wrote: > On Fri, Jan 22, 2021 at 4:43 PM Calvin Johnson > wrote: > > > > Introduce ACPI mechanism to get PHYs registered on a MDIO bus an

[net-next PATCH v4 05/15] net: phy: Introduce fwnode_get_phy_id()

2021-01-22 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 v4: None Changes in v3: - Use traditional comparison pattern - Use GENMASK Changes in v2: None drivers/net/phy

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

2021-01-22 Thread Calvin Johnson
- 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 net: phy: Introduce fwnode_mdio_find_device() net: phy: Introduce phy related fwnode

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

2021-01-22 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 v4 04/15] of: mdio: Refactor of_phy_find_device()

2021-01-22 Thread Calvin Johnson
Refactor of_phy_find_device() to use fwnode_phy_find_device(). Signed-off-by: Calvin Johnson --- Changes in v4: None Changes in v3: None 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

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

2021-01-22 Thread Calvin Johnson
to mac->phylink. Signed-off-by: Calvin Johnson --- Changes in v4: None Changes in v3: None Changes in v2: - Refactor OF functions to use fwnode functions .../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 87 +++ 1 file changed, 50 insertions(+), 37 deletions(-) diff --git a/driv

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

2021-01-22 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 v4: None Changes in v3: None

[net-next PATCH v4 12/15] net/fsl: Use fwnode_mdiobus_register()

2021-01-22 Thread Calvin Johnson
Signed-off-by: Calvin Johnson --- Changes in v4: - Cleanup xgmac_mdio_probe() Changes in v3: - Avoid unnecessary line removal - Remove unused inclusion of acpi.h Changes in v2: None drivers/net/ethernet/freescale/xgmac_mdio.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-)

[net-next PATCH v4 11/15] net: mdiobus: Introduce fwnode_mdiobus_register()

2021-01-22 Thread Calvin Johnson
Introduce fwnode_mdiobus_register() to register PHYs on the mdiobus. If the fwnode is DT node, then call of_mdiobus_register(). If it is an ACPI node, then call acpi_mdiobus_register(). Signed-off-by: Calvin Johnson --- Changes in v4: - Remove redundant else from fwnode_mdiobus_register

[net-next PATCH v4 08/15] of: mdio: Refactor of_mdiobus_register_phy()

2021-01-22 Thread Calvin Johnson
Refactor of_mdiobus_register_phy() to use fwnode_mdiobus_register_phy(). Signed-off-by: Calvin Johnson --- Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 40 +- 1 file changed, 1 insertion(+), 39 deletions(-) diff

[net-next PATCH v4 10/15] net: mdio: Add ACPI support code for mdio

2021-01-22 Thread Calvin Johnson
Define acpi_mdiobus_register() to Register mii_bus and create PHYs for each ACPI child node. Signed-off-by: Calvin Johnson --- Changes in v4: None Changes in v3: None Changes in v2: None MAINTAINERS | 1 + drivers/net/mdio/Kconfig | 7 ++ drivers/net/mdio/Makefile

[net-next PATCH v4 13/15] phylink: introduce phylink_fwnode_phy_connect()

2021-01-22 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 v4: - call phy_device_free() before returning Changes in v3: None Changes in v2: None drivers/net/phy/phylink.c | 56

[net-next PATCH v4 14/15] net: phylink: Refactor phylink_of_phy_connect()

2021-01-22 Thread Calvin Johnson
Refactor phylink_of_phy_connect() to use phylink_fwnode_phy_connect(). Signed-off-by: Calvin Johnson --- Changes in v4: None Changes in v3: None Changes in v2: None drivers/net/phy/phylink.c | 39 +-- 1 file changed, 1 insertion(+), 38 deletions(-) diff

[net-next PATCH v4 09/15] device property: Introduce fwnode_get_id()

2021-01-22 Thread Calvin Johnson
Using fwnode_get_id(), get the reg property value for DT node or get the _ADR object value for ACPI node. Signed-off-by: Calvin Johnson --- Changes in v4: - Improve code structure to handle all cases Changes in v3: - Modified to retrieve reg property value for ACPI as well - Resolved

[net-next PATCH v4 06/15] of: mdio: Refactor of_get_phy_id()

2021-01-22 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 v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff

[net-next PATCH v4 02/15] net: phy: Introduce fwnode_mdio_find_device()

2021-01-22 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 v4: None Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 11 +-- drivers/net/phy/phy_device.c | 23

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

2021-01-22 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 v4: - More cleanup Changes in v3: None Changes in v2: - Updated w

Re: [net-next PATCH v3 14/15] net: phylink: Refactor phylink_of_phy_connect()

2021-01-18 Thread Calvin Johnson
On Tue, Jan 12, 2021 at 05:57:01PM +0200, Andy Shevchenko wrote: > On Tue, Jan 12, 2021 at 3:43 PM Calvin Johnson > wrote: > > > > Refactor phylink_of_phy_connect() to use phylink_fwnode_phy_connect(). > > Same Q as per previous patch. If it's indeed a bug in the existing

Re: [net-next PATCH v3 13/15] phylink: introduce phylink_fwnode_phy_connect()

2021-01-18 Thread Calvin Johnson
On Tue, Jan 12, 2021 at 05:55:54PM +0200, Andy Shevchenko wrote: > On Tue, Jan 12, 2021 at 3:43 PM Calvin Johnson > wrote: > > > > Define phylink_fwnode_phy_connect() to connect phy specified by > > a fwnode to a phylink instance. > > ... > > > +

Re: [net-next PATCH v3 09/15] device property: Introduce fwnode_get_id()

2021-01-15 Thread Calvin Johnson
Hi, On Tue, Jan 12, 2021 at 09:30:31AM -0800, Saravana Kannan wrote: > On Tue, Jan 12, 2021 at 5:42 AM Calvin Johnson > wrote: > > > > Using fwnode_get_id(), get the reg property value for DT node > > or get the _ADR object value for ACPI node. > > >

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

2021-01-12 Thread Calvin Johnson
to mac->phylink. Signed-off-by: Calvin Johnson --- Changes in v3: None Changes in v2: - Refactor OF functions to use fwnode functions .../net/ethernet/freescale/dpaa2/dpaa2-mac.c | 87 +++ 1 file changed, 50 insertions(+), 37 deletions(-) diff --git a/drivers/net/ether

[net-next PATCH v3 14/15] net: phylink: Refactor phylink_of_phy_connect()

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

[net-next PATCH v3 13/15] phylink: introduce phylink_fwnode_phy_connect()

2021-01-12 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: None Changes in v2: None drivers/net/phy/phylink.c | 54 +++ include/linux/phylink.h | 3 +++ 2 files changed

[net-next PATCH v3 11/15] net: mdiobus: Introduce fwnode_mdiobus_register()

2021-01-12 Thread Calvin Johnson
Introduce fwnode_mdiobus_register() to register PHYs on the mdiobus. If the fwnode is DT node, then call of_mdiobus_register(). If it is an ACPI node, then call acpi_mdiobus_register(). Signed-off-by: Calvin Johnson --- Changes in v3: - Use acpi_mdiobus_register() Changes in v2: None

[net-next PATCH v3 12/15] net/fsl: Use fwnode_mdiobus_register()

2021-01-12 Thread Calvin Johnson
Signed-off-by: Calvin Johnson --- Changes in v3: - Avoid unnecessary line removal - Remove unused inclusion of acpi.h Changes in v2: None drivers/net/ethernet/freescale/xgmac_mdio.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/freescale/xg

[net-next PATCH v3 10/15] net: mdio: Add ACPI support code for mdio

2021-01-12 Thread Calvin Johnson
Define acpi_mdiobus_register() to Register mii_bus and create PHYs for each ACPI child node. Signed-off-by: Calvin Johnson --- Changes in v3: None Changes in v2: None MAINTAINERS | 1 + drivers/net/mdio/Kconfig | 7 ++ drivers/net/mdio/Makefile| 1 + drivers

[net-next PATCH v3 09/15] device property: Introduce fwnode_get_id()

2021-01-12 Thread Calvin Johnson
Using fwnode_get_id(), get the reg property value for DT node or get the _ADR object value for ACPI node. Signed-off-by: Calvin Johnson --- Changes in v3: - Modified to retrieve reg property value for ACPI as well - Resolved compilation issue with CONFIG_ACPI = n - Added more info

[net-next PATCH v3 04/15] of: mdio: Refactor of_phy_find_device()

2021-01-12 Thread Calvin Johnson
Refactor of_phy_find_device() to use fwnode_phy_find_device(). Signed-off-by: Calvin Johnson --- Changes in v3: None 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

[net-next PATCH v3 05/15] net: phy: Introduce fwnode_get_phy_id()

2021-01-12 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: - Use traditional comparison pattern - Use GENMASK Changes in v2: None drivers/net/phy/phy_device.c | 21

[net-next PATCH v3 08/15] of: mdio: Refactor of_mdiobus_register_phy()

2021-01-12 Thread Calvin Johnson
Refactor of_mdiobus_register_phy() to use fwnode_mdiobus_register_phy(). Signed-off-by: Calvin Johnson --- Changes in v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 40 +- 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/drivers/net

[net-next PATCH v3 02/15] net: phy: Introduce fwnode_mdio_find_device()

2021-01-12 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 v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 11 +-- drivers/net/phy/phy_device.c | 23 +++ include

[net-next PATCH v3 06/15] of: mdio: Refactor of_get_phy_id()

2021-01-12 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 v3: None Changes in v2: None drivers/net/mdio/of_mdio.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/net

  1   2   >