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

From: Christian Marangi
Date: Sun Feb 18 2024 - 14:03:39 EST


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@xxxxxxxxx>
---
include/linux/mod_devicetable.h | 2 ++
1 file changed, 2 insertions(+)

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 {
--
2.43.0