Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1328543

[PATCH v2 1/5] net: phy: dp83848: Add macro for dp83848 compatible devices

From "Andrew F. Davis" <afd@ti.com>
Newsgroups linux.kernel
Subject [PATCH v2 1/5] net: phy: dp83848: Add macro for dp83848 compatible devices
Date 2016-02-07 18:50 +0100
Message-ID <qZBDd-130-23@gated-at.bofh.it> (permalink)
References <qZBDb-130-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Add a helper macro for defining dp83848 compatible phy devices.
Update copyright info.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
 drivers/net/phy/dp83848.c | 41 ++++++++++++++++++++++-------------------
 1 file changed, 22 insertions(+), 19 deletions(-)

diff --git a/drivers/net/phy/dp83848.c b/drivers/net/phy/dp83848.c
index 5e14e62..4e78f54 100644
--- a/drivers/net/phy/dp83848.c
+++ b/drivers/net/phy/dp83848.c
@@ -1,7 +1,7 @@
 /*
  * Driver for the Texas Instruments DP83848 PHY
  *
- * Copyright (C) 2015 Texas Instruments Inc.
+ * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -70,25 +70,28 @@ static struct mdio_device_id __maybe_unused dp83848_tbl[] = {
 };
 MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
 
-static struct phy_driver dp83848_driver[] = {
-	{
-		.phy_id		= DP83848_PHY_ID,
-		.phy_id_mask	= 0xfffffff0,
-		.name		= "TI DP83848",
-		.features	= PHY_BASIC_FEATURES,
-		.flags		= PHY_HAS_INTERRUPT,
-
-		.soft_reset	= genphy_soft_reset,
-		.config_init	= genphy_config_init,
-		.suspend	= genphy_suspend,
-		.resume		= genphy_resume,
-		.config_aneg	= genphy_config_aneg,
-		.read_status	= genphy_read_status,
+#define DP83848_PHY_DRIVER(_id, _name)				\
+	{							\
+		.phy_id		= _id,				\
+		.phy_id_mask	= 0xfffffff0,			\
+		.name		= _name,			\
+		.features	= PHY_BASIC_FEATURES,		\
+		.flags		= PHY_HAS_INTERRUPT,		\
+								\
+		.soft_reset	= genphy_soft_reset,		\
+		.config_init	= genphy_config_init,		\
+		.suspend	= genphy_suspend,		\
+		.resume		= genphy_resume,		\
+		.config_aneg	= genphy_config_aneg,		\
+		.read_status	= genphy_read_status,		\
+								\
+		/* IRQ related */				\
+		.ack_interrupt	= dp83848_ack_interrupt,	\
+		.config_intr	= dp83848_config_intr,		\
+	}
 
-		/* IRQ related */
-		.ack_interrupt	= dp83848_ack_interrupt,
-		.config_intr	= dp83848_config_intr,
-	},
+static struct phy_driver dp83848_driver[] = {
+	DP83848_PHY_DRIVER(DP83848_PHY_ID, "TI DP83848 10/100 Mbps PHY"),
 };
 module_phy_driver(dp83848_driver);
 
-- 
2.7.0

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 0/5] net: phy: dp83848: Add support for TI TLK10x Ethernet PHYs "Andrew F. Davis" <afd@ti.com> - 2016-02-07 18:50 +0100
  [PATCH v2 1/5] net: phy: dp83848: Add macro for dp83848 compatible devices "Andrew F. Davis" <afd@ti.com> - 2016-02-07 18:50 +0100
  [PATCH v2 3/5] net: phy: dp83848: Reorganize code for readability and safety "Andrew F. Davis" <afd@ti.com> - 2016-02-07 18:50 +0100
    Re: [PATCH v2 3/5] net: phy: dp83848: Reorganize code for readability  and safety Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-02-07 19:20 +0100
  [PATCH v2 5/5] net: phy: dp83848: Add comments for register definitions "Andrew F. Davis" <afd@ti.com> - 2016-02-07 18:50 +0100
  [PATCH v2 4/5] net: phy: dp83848: Add support for TI TLK10x Ethernet PHYs "Andrew F. Davis" <afd@ti.com> - 2016-02-07 18:50 +0100
  [PATCH v2 2/5] net: phy: dp83848: Add PHY ID for TI version of DP83848C "Andrew F. Davis" <afd@ti.com> - 2016-02-07 18:50 +0100
  Re: [PATCH v2 0/5] net: phy: dp83848: Add support for TI TLK10x  Ethernet PHYs Florian Fainelli <f.fainelli@gmail.com> - 2016-02-07 23:40 +0100

csiph-web