[net-next,RFC,3/6] mod_devicetable: permit to define a name for an mdio_device_id

Message ID 20240218190034.15447-4-ansuelsmth@gmail.com
State New
Headers
Series net: phy: support multi PHY in phy_driver Was: net: phy: detach PHY driver OPs from phy_driver struct |

Commit Message

Christian Marangi Feb. 18, 2024, 7 p.m. UTC
  Permit to optionally define a name for an mdio_device_id. This can be
used for PHY driver that might define multiple PHY IDs for the same group
of PHY driver OPs to define different names for each PHY ID and better
identify the different models at runtime.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
 include/linux/mod_devicetable.h | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index f458469c5ce5..9dc6f0cc26b4 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -630,10 +630,12 @@  struct platform_device_id {
  *     for this PHY type
  * @phy_id_mask: Defines the significant bits of @phy_id.  A value of 0
  *     is used to terminate an array of struct mdio_device_id.
+ * @name: Optional Friendly name that identify the PHY device/family.
  */
 struct mdio_device_id {
 	__u32 phy_id;
 	__u32 phy_id_mask;
+	const char *name;
 };
 
 struct zorro_device_id {