Skip to contentSkip to conversation

phy: add a NO-OP phy driver

PATCH New Jean-Jacques Hiblot 4 participants 6 messages Jul 21, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: add a NO-OP phy driver

The no-op phy driver is useful when a driver uses the phy framework but no PHY driver is available for the hardware (or the hardware has no PHY).

---

Following the email thread '[PATCH 1/1] dm: phy: add missing #ifdef CONFIG_PHY', here is a patch to add support for a no-op phy.

Jean-Jacques

 Documentation/devicetree/bindings/phy/no-op.txt | 16 +++++++++++++++
 drivers/phy/Kconfig                             | 18 +++++++++++++++++
 drivers/phy/Makefile                            |  1 +
 drivers/phy/noop-phy.c                          | 26 +++++++++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/no-op.txt
 create mode 100644 drivers/phy/noop-phy.c
Documentation/devicetree/bindings/phy/no-op.txt new file +16 -0
new file mode 100644
index 0000000..eb1a562
@@ -0,0 +1,16 @@
+NO-OP Phy driver
+
+The driver is used to stub PHY opeartions in a driver (USB, SATA).
+This is useful when the PHY driver for a particular hardware doesn't exist yet
+(the hardware is initialized by the platform code).
+
+Required properties:
+- compatible     : must contain "noop-phy"
+- #phy-cells     : must contain <0>
+
+Example:
+
+noop_phy {
+	compatible = "noop-phy";
+	#phy-cells = <0>;
+};
drivers/phy/Kconfig +18 -0
index 7841554..68dced7 100644
@@ -41,6 +41,24 @@ config PHY_SANDBOX
 	  This select a dummy sandbox PHY driver. It used only to implement
 	  the unit tests for the phy framework
 
+config NOOP_PHY
+	bool "no-op phy"
+	depends on PHY
+	help
+	  Support for a no-op PHY
+
+	  This is useful when a driver uses the PHY framework but no driver
+	  has yet been written for the PHY (or if there is no hardware PHY).
+
+config SPL_NOOP_PHY
+	bool "no-op phy in SPL"
+	depends on SPL_PHY
+	help
+	  Support for a no-op PHY in SPL
+
+	  This is useful when a driver uses the PHY framework but no driver
+	  has yet been written for the PHY (or if there is no hardware PHY).
+
 config PIPE3_PHY
 	bool "Support omap's PIPE3 PHY"
 	depends on PHY && ARCH_OMAP2PLUS
drivers/phy/Makefile +1 -0
index 6ce96d2..f129b5c 100644
@@ -6,5 +6,6 @@
 #
 
 obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o
+obj-$(CONFIG_$(SPL_)NOOP_PHY) += noop-phy.o
 obj-$(CONFIG_PHY_SANDBOX) += sandbox-phy.o
 obj-$(CONFIG_$(SPL_)PIPE3_PHY) += ti-pipe3-phy.o
drivers/phy/noop-phy.c new file +26 -0
new file mode 100644
index 0000000..14ccf86
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ * Written by Jean-Jacques Hiblot  <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <dm/device.h>
+#include <generic-phy.h>
+
+static const struct udevice_id noop_phy_ids[] = {
+	{ .compatible = "noop-phy" },
+	{ }
+};
+
+static struct phy_ops noop_phy_ops = {
+};
+
+U_BOOT_DRIVER(noop_phy) = {
+	.name	= "noop_phy",
+	.id	= UCLASS_PHY,
+	.of_match = noop_phy_ids,
+	.ops = &noop_phy_ops,
+};
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 phy: add a NO-OP phy driver

Quoted 27 lines · Jean-Jacques Hiblot

The no-op phy driver is useful when a driver uses the phy framework but no PHY driver is available for the hardware (or the hardware has no PHY).

---

Following the email thread '[PATCH 1/1] dm: phy: add missing #ifdef CONFIG_PHY', here is a patch to add support for a no-op phy.

Jean-Jacques

 Documentation/devicetree/bindings/phy/no-op.txt | 16 +++++++++++++++
 drivers/phy/Kconfig                             | 18 +++++++++++++++++
 drivers/phy/Makefile                            |  1 +
 drivers/phy/noop-phy.c                          | 26 +++++++++++++++++++++++++
 4 files changed, 61 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/no-op.txt
 create mode 100644 drivers/phy/noop-phy.c
Documentation/devicetree/bindings/phy/no-op.txt new file +0 -0
new file mode 100644
index 0000000..eb1a562

Documentation/devicetree/bindings/phy/no-op.txt line 3

Quoted 3 lines
Documentation/devicetree/bindings/phy/no-op.txt new file +3 -0
@@ -0,0 +1,16 @@
+NO-OP Phy driver
+
+The driver is used to stub PHY opeartions in a driver (USB, SATA).

operations

Quoted 18 lines
Documentation/devicetree/bindings/phy/no-op.txt new file +13 -0
+This is useful when the PHY driver for a particular hardware doesn't exist yet
+(the hardware is initialized by the platform code).
+
+Required properties:
+- compatible     : must contain "noop-phy"
+- #phy-cells     : must contain <0>
+
+Example:
+
+noop_phy {
+	compatible = "noop-phy";
+	#phy-cells = <0>;
+};
drivers/phy/Kconfig +0 -0
index 7841554..68dced7 100644

drivers/phy/Kconfig config PHY_SANDBOX · line 45

Quoted 5 lines
drivers/phy/Kconfig +2 -0
@@ -41,6 +41,24 @@ config PHY_SANDBOX
 	  This select a dummy sandbox PHY driver. It used only to implement
 	  the unit tests for the phy framework
 
+config NOOP_PHY
+	bool "no-op phy"

Please fix the option description, this is quite sloppy.

drivers/phy/Kconfig config PHY_SANDBOX · line 51

Quoted 6 lines
drivers/phy/Kconfig +6 -0
+	depends on PHY
+	help
+	  Support for a no-op PHY
+
+	  This is useful when a driver uses the PHY framework but no driver
+	  has yet been written for the PHY (or if there is no hardware PHY).

This really is only useful if there is no dedicated PHY.

drivers/phy/Kconfig config PHY_SANDBOX · line 54

Quoted 2 lines
drivers/phy/Kconfig +2 -0
+config SPL_NOOP_PHY
+	bool "no-op phy in SPL"

DTTO

Quoted 54 lines
drivers/phy/Kconfig +7 -0
+	depends on SPL_PHY
+	help
+	  Support for a no-op PHY in SPL
+
+	  This is useful when a driver uses the PHY framework but no driver
+	  has yet been written for the PHY (or if there is no hardware PHY).
+
 config PIPE3_PHY
 	bool "Support omap's PIPE3 PHY"
 	depends on PHY && ARCH_OMAP2PLUS
drivers/phy/Makefile +1 -0
index 6ce96d2..f129b5c 100644
@@ -6,5 +6,6 @@
 #
 
 obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o
+obj-$(CONFIG_$(SPL_)NOOP_PHY) += noop-phy.o
 obj-$(CONFIG_PHY_SANDBOX) += sandbox-phy.o
 obj-$(CONFIG_$(SPL_)PIPE3_PHY) += ti-pipe3-phy.o
drivers/phy/noop-phy.c new file +26 -0
new file mode 100644
index 0000000..14ccf86
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ * Written by Jean-Jacques Hiblot  <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <dm/device.h>
+#include <generic-phy.h>
+
+static const struct udevice_id noop_phy_ids[] = {
+	{ .compatible = "noop-phy" },
+	{ }
+};
+
+static struct phy_ops noop_phy_ops = {
+};
+
+U_BOOT_DRIVER(noop_phy) = {
+	.name	= "noop_phy",
+	.id	= UCLASS_PHY,
+	.of_match = noop_phy_ids,
+	.ops = &noop_phy_ops,
+};
Signature · 2 lines
Best regards,
Marek Vasut
#2 lore raw

PATCH 1/1 phy: add a NO-OP phy driver

Hi Marek and Jean-Jacques,

-----Original Message-----
From: U-Boot [mailto:u-boot-bounces at lists.denx.de] On Behalf Of Marek Vasut
Sent: vendredi 21 juillet 2017 11:03
To: Jean-Jacques Hiblot <[email protected]>; Patrice CHOTARD <[email protected]>; u-boot at lists.denx.de; sjg at chromium.org
Cc: ran.wang_1 at nxp.com; Christophe KERELLO <[email protected]>
Subject: Re: [U-Boot] [PATCH] phy: add a NO-OP phy driver

Quoted 5 lines · Jean-Jacques Hiblot

The no-op phy driver is useful when a driver uses the phy framework but no PHY driver is available for the hardware (or the hardware has no PHY).

So with this patch we have noop PHY driver
But that don't solve all the issues:

1/ compilation issue

=> dependency need to be added to avoid to modify all defconfig

In drivers/usb/host/Kconfig
Add select PHY

For USB_EHCI_GENERIC and USB_OHCI_GENERIC

PS: I don't sure that solve issue for all the case (is USB is activated in SPL for boards)

2/ execution need to be protected

In all driver, we have de sequence

	err = generic_phy_get_by_index(dev, 0, &priv->phy);
	if (err) {
		if (err != -ENOENT) {
			error("failed to get usb phy\n");
			goto reset_err;
		}
	}

	err = generic_phy_init(&priv->phy);
	if (err) {
		error("failed to init usb phy\n");
		goto reset_err;
	}

=> the priv->phy can be invalid (if ENOENT error)

int generic_phy_init(struct phy *phy) int generic_phy_reset(struct phy *phy) int generic_phy_exit(struct phy *phy) int generic_phy_power_on(struct phy *phy) int generic_phy_power_off(struct phy *phy)

need to be protected for invalid phy

Regards

Patrick

#3 lore raw

PATCH 1/1 phy: add a NO-OP phy driver

In reply to Marek Vasut
Quoted 54 lines · Marek Vasut
Quoted 27 lines · Jean-Jacques Hiblot

The no-op phy driver is useful when a driver uses the phy framework but no PHY driver is available for the hardware (or the hardware has no PHY).

---

Following the email thread '[PATCH 1/1] dm: phy: add missing #ifdef CONFIG_PHY', here is a patch to add support for a no-op phy.

Jean-Jacques

  Documentation/devicetree/bindings/phy/no-op.txt | 16 +++++++++++++++
  drivers/phy/Kconfig                             | 18 +++++++++++++++++
  drivers/phy/Makefile                            |  1 +
  drivers/phy/noop-phy.c                          | 26 +++++++++++++++++++++++++
  4 files changed, 61 insertions(+)

create mode 100644 Documentation/devicetree/bindings/phy/no-op.txt create mode 100644 drivers/phy/noop-phy.c

Documentation/devicetree/bindings/phy/no-op.txt new file +0 -0
new file mode 100644
index 0000000..eb1a562

Documentation/devicetree/bindings/phy/no-op.txt line 3

Quoted 3 lines
Documentation/devicetree/bindings/phy/no-op.txt new file +3 -0
@@ -0,0 +1,16 @@
+NO-OP Phy driver
+
+The driver is used to stub PHY opeartions in a driver (USB, SATA).

operations

Quoted 21 lines
Documentation/devicetree/bindings/phy/no-op.txt new file +13 -0
+This is useful when the PHY driver for a particular hardware doesn't exist yet
+(the hardware is initialized by the platform code).
+
+Required properties:
+- compatible     : must contain "noop-phy"
+- #phy-cells     : must contain <0>
+
+Example:
+
+noop_phy {
+	compatible = "noop-phy";
+	#phy-cells = <0>;
+};
drivers/phy/Kconfig +0 -0
index 7841554..68dced7 100644
@@ -41,6 +41,24 @@ config PHY_SANDBOX
  	  This select a dummy sandbox PHY driver. It used only to implement
  	  the unit tests for the phy framework
 
Quoted 3 lines

drivers/phy/Kconfig config PHY_SANDBOX · line 45

Quoted 2 lines
drivers/phy/Kconfig +2 -0
+config NOOP_PHY
+	bool "no-op phy"

Please fix the option description, this is quite sloppy.

It's not that I want to induce in sloppiness, but I can't come up with a better description.
Suggestions are welcome.

Quoted 8 lines

drivers/phy/Kconfig config PHY_SANDBOX · line 51

Quoted 7 lines
drivers/phy/Kconfig +6 -0
+	depends on PHY
+	help
+	  Support for a no-op PHY
+
+	  This is useful when a driver uses the PHY framework but no driver
+	  has yet been written for the PHY (or if there is no hardware PHY).

This really is only useful if there is no dedicated PHY.

Also during the transition from platform code to DM code for the PHY. It allows setting up the 'client' driver first, and then the PHY driver.

Quoted 60 lines

drivers/phy/Kconfig config PHY_SANDBOX · line 54

Quoted 3 lines
drivers/phy/Kconfig +2 -0
+config SPL_NOOP_PHY
+	bool "no-op phy in SPL"

DTTO

Quoted 54 lines
drivers/phy/Kconfig +7 -0
+	depends on SPL_PHY
+	help
+	  Support for a no-op PHY in SPL
+
+	  This is useful when a driver uses the PHY framework but no driver
+	  has yet been written for the PHY (or if there is no hardware PHY).
+
  config PIPE3_PHY
  	bool "Support omap's PIPE3 PHY"
  	depends on PHY && ARCH_OMAP2PLUS
drivers/phy/Makefile +1 -0
index 6ce96d2..f129b5c 100644
@@ -6,5 +6,6 @@
  #
 
  obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o
+obj-$(CONFIG_$(SPL_)NOOP_PHY) += noop-phy.o
  obj-$(CONFIG_PHY_SANDBOX) += sandbox-phy.o
  obj-$(CONFIG_$(SPL_)PIPE3_PHY) += ti-pipe3-phy.o
drivers/phy/noop-phy.c new file +26 -0
new file mode 100644
index 0000000..14ccf86
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ * Written by Jean-Jacques Hiblot  <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <dm/device.h>
+#include <generic-phy.h>
+
+static const struct udevice_id noop_phy_ids[] = {
+	{ .compatible = "noop-phy" },
+	{ }
+};
+
+static struct phy_ops noop_phy_ops = {
+};
+
+U_BOOT_DRIVER(noop_phy) = {
+	.name	= "noop_phy",
+	.id	= UCLASS_PHY,
+	.of_match = noop_phy_ids,
+	.ops = &noop_phy_ops,
+};
#4 lore raw

PATCH 1/1 phy: add a NO-OP phy driver

Quoted 64 lines · Jean-Jacques Hiblot
Quoted 53 lines · Marek Vasut
Quoted 30 lines · Jean-Jacques Hiblot

The no-op phy driver is useful when a driver uses the phy framework but no PHY driver is available for the hardware (or the hardware has no PHY).

---

Following the email thread '[PATCH 1/1] dm: phy: add missing #ifdef CONFIG_PHY',
here is a patch to add support for a no-op phy.

Jean-Jacques

  Documentation/devicetree/bindings/phy/no-op.txt | 16 +++++++++++++++
  drivers/phy/Kconfig                             | 18 +++++++++++++++++
  drivers/phy/Makefile                            |  1 +
  drivers/phy/noop-phy.c                          | 26
+++++++++++++++++++++++++
  4 files changed, 61 insertions(+)

create mode 100644 Documentation/devicetree/bindings/phy/no-op.txt create mode 100644 drivers/phy/noop-phy.c

Documentation/devicetree/bindings/phy/no-op.txt new file +0 -0
new file mode 100644
index 0000000..eb1a562

Documentation/devicetree/bindings/phy/no-op.txt line 3

Quoted 3 lines
Documentation/devicetree/bindings/phy/no-op.txt new file +3 -0
@@ -0,0 +1,16 @@
+NO-OP Phy driver
+
+The driver is used to stub PHY opeartions in a driver (USB, SATA).

operations

Quoted 17 lines
Documentation/devicetree/bindings/phy/no-op.txt new file +1 -0
+This is useful when the PHY driver for a particular hardware doesn't

exist yet

Documentation/devicetree/bindings/phy/no-op.txt new file +12 -0
+(the hardware is initialized by the platform code).
+
+Required properties:
+- compatible     : must contain "noop-phy"
+- #phy-cells     : must contain <0>
+
+Example:
+
+noop_phy {
+    compatible = "noop-phy";
+    #phy-cells = <0>;
+};
drivers/phy/Kconfig +0 -1
index 7841554..68dced7 100644
--- a/drivers/phy/Kconfig
Quoted 8 lines
Quoted 7 lines

+++ b/drivers/phy/Kconfig

drivers/phy/Kconfig +0 -0
@@ -41,6 +41,24 @@ config PHY_SANDBOX
        This select a dummy sandbox PHY driver. It used only to

implement
the unit tests for the phy framework
+config NOOP_PHY
+ bool "no-op phy"

Please fix the option description, this is quite sloppy.

Quoted 3 lines

It's not that I want to induce in sloppiness, but I can't come up with a better description.
Suggestions are welcome.

NOP USB PHY driver or something ?

Quoted 10 lines
Quoted 8 lines
Quoted 7 lines
drivers/phy/Kconfig +6 -0
+    depends on PHY
+    help
+      Support for a no-op PHY
+
+      This is useful when a driver uses the PHY framework but no driver
+      has yet been written for the PHY (or if there is no hardware

PHY).

This really is only useful if there is no dedicated PHY.

Also during the transition from platform code to DM code for the PHY. It allows setting up the 'client' driver first, and then the PHY driver.

You should implement a proper driver, we should not advertise this possibility.

Quoted 61 lines
Quoted 60 lines

drivers/phy/Kconfig config PHY_SANDBOX · line 54

Quoted 2 lines
drivers/phy/Kconfig +2 -0
+config SPL_NOOP_PHY
+    bool "no-op phy in SPL"

DTTO

Quoted 55 lines
drivers/phy/Kconfig +6 -0
+    depends on SPL_PHY
+    help
+      Support for a no-op PHY in SPL
+
+      This is useful when a driver uses the PHY framework but no driver
+      has yet been written for the PHY (or if there is no hardware

PHY).

drivers/phy/Kconfig +1 -0
+
  config PIPE3_PHY
      bool "Support omap's PIPE3 PHY"
      depends on PHY && ARCH_OMAP2PLUS
drivers/phy/Makefile +1 -0
index 6ce96d2..f129b5c 100644
@@ -6,5 +6,6 @@
  #
    obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o
+obj-$(CONFIG_$(SPL_)NOOP_PHY) += noop-phy.o
  obj-$(CONFIG_PHY_SANDBOX) += sandbox-phy.o
  obj-$(CONFIG_$(SPL_)PIPE3_PHY) += ti-pipe3-phy.o
drivers/phy/noop-phy.c new file +2 -0
new file mode 100644
index 0000000..14ccf86
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated -

http://www.ti.com/
+ * Written by Jean-Jacques Hiblot <[email protected]>
+ *
+ * SPDX-License-Identifier: GPL-2.0+
+ */

drivers/phy/noop-phy.c new file +20 -0
+
+#include <common.h>
+#include <dm.h>
+#include <dm/device.h>
+#include <generic-phy.h>
+
+static const struct udevice_id noop_phy_ids[] = {
+    { .compatible = "noop-phy" },
+    { }
+};
+
+static struct phy_ops noop_phy_ops = {
+};
+
+U_BOOT_DRIVER(noop_phy) = {
+    .name    = "noop_phy",
+    .id    = UCLASS_PHY,
+    .of_match = noop_phy_ids,
+    .ops = &noop_phy_ops,
+};
Signature · 2 lines
Best regards,
Marek Vasut
#5 lore raw

PATCH 1/1 phy: add a NO-OP phy driver

In reply to Jean-Jacques Hiblot

Hi Jean Jacques

Quoted 27 lines · Jean-Jacques Hiblot

The no-op phy driver is useful when a driver uses the phy framework but no PHY driver is available for the hardware (or the hardware has no PHY).

---

Following the email thread '[PATCH 1/1] dm: phy: add missing #ifdef CONFIG_PHY', here is a patch to add support for a no-op phy.

Jean-Jacques

  Documentation/devicetree/bindings/phy/no-op.txt | 16 +++++++++++++++
  drivers/phy/Kconfig                             | 18 +++++++++++++++++
  drivers/phy/Makefile                            |  1 +
  drivers/phy/noop-phy.c                          | 26 +++++++++++++++++++++++++
  4 files changed, 61 insertions(+)

create mode 100644 Documentation/devicetree/bindings/phy/no-op.txt create mode 100644 drivers/phy/noop-phy.c

Documentation/devicetree/bindings/phy/no-op.txt new file +0 -0
new file mode 100644
index 0000000..eb1a562

Documentation/devicetree/bindings/phy/no-op.txt line 3

Quoted 3 lines
Documentation/devicetree/bindings/phy/no-op.txt new file +3 -0
@@ -0,0 +1,16 @@
+NO-OP Phy driver
+
+The driver is used to stub PHY opeartions in a driver (USB, SATA).

typo opeartions

Quoted 76 lines
Documentation/devicetree/bindings/phy/no-op.txt new file +13 -0
+This is useful when the PHY driver for a particular hardware doesn't exist yet
+(the hardware is initialized by the platform code).
+
+Required properties:
+- compatible     : must contain "noop-phy"
+- #phy-cells     : must contain <0>
+
+Example:
+
+noop_phy {
+	compatible = "noop-phy";
+	#phy-cells = <0>;
+};
drivers/phy/Kconfig +18 -0
index 7841554..68dced7 100644
@@ -41,6 +41,24 @@ config PHY_SANDBOX
  	  This select a dummy sandbox PHY driver. It used only to implement
  	  the unit tests for the phy framework
 
+config NOOP_PHY
+	bool "no-op phy"
+	depends on PHY
+	help
+	  Support for a no-op PHY
+
+	  This is useful when a driver uses the PHY framework but no driver
+	  has yet been written for the PHY (or if there is no hardware PHY).
+
+config SPL_NOOP_PHY
+	bool "no-op phy in SPL"
+	depends on SPL_PHY
+	help
+	  Support for a no-op PHY in SPL
+
+	  This is useful when a driver uses the PHY framework but no driver
+	  has yet been written for the PHY (or if there is no hardware PHY).
+
  config PIPE3_PHY
  	bool "Support omap's PIPE3 PHY"
  	depends on PHY && ARCH_OMAP2PLUS
drivers/phy/Makefile +1 -0
index 6ce96d2..f129b5c 100644
@@ -6,5 +6,6 @@
  #
 
  obj-$(CONFIG_$(SPL_)PHY) += phy-uclass.o
+obj-$(CONFIG_$(SPL_)NOOP_PHY) += noop-phy.o
  obj-$(CONFIG_PHY_SANDBOX) += sandbox-phy.o
  obj-$(CONFIG_$(SPL_)PIPE3_PHY) += ti-pipe3-phy.o
drivers/phy/noop-phy.c new file +16 -0
new file mode 100644
index 0000000..14ccf86
@@ -0,0 +1,26 @@
+/*
+ * Copyright (C) 2017 Texas Instruments Incorporated - http://www.ti.com/
+ * Written by Jean-Jacques Hiblot  <[email protected]>
+ *
+ * SPDX-License-Identifier:	GPL-2.0+
+ */
+
+#include <common.h>
+#include <dm.h>
+#include <dm/device.h>
+#include <generic-phy.h>
+
+static const struct udevice_id noop_phy_ids[] = {
+	{ .compatible = "noop-phy" },
+	{ }
+};

drivers/phy/noop-phy.c line 26

Quoted 10 lines
drivers/phy/noop-phy.c new file +10 -0
+
+static struct phy_ops noop_phy_ops = {
+};
+
+U_BOOT_DRIVER(noop_phy) = {
+	.name	= "noop_phy",
+	.id	= UCLASS_PHY,
+	.of_match = noop_phy_ids,
+	.ops = &noop_phy_ops,
+};

This solution is more elegant ;-)

Merci