From: Michael Walle <michael@walle.cc>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>,
Michael Walle <michael@walle.cc>
Subject: [PATCH net-next 1/9] net: phy: icplus: use PHY_ID_MATCH_MODEL() macro
Date: Tue, 9 Feb 2021 17:40:43 +0100 [thread overview]
Message-ID: <20210209164051.18156-2-michael@walle.cc> (raw)
In-Reply-To: <20210209164051.18156-1-michael@walle.cc>
Simpify the initializations of the structures. There is no functional
change.
Signed-off-by: Michael Walle <michael@walle.cc>
---
drivers/net/phy/icplus.c | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/drivers/net/phy/icplus.c b/drivers/net/phy/icplus.c
index b632947cbcdf..4407b1eb1a3d 100644
--- a/drivers/net/phy/icplus.c
+++ b/drivers/net/phy/icplus.c
@@ -47,6 +47,10 @@ MODULE_LICENSE("GPL");
#define IP101G_DIGITAL_IO_SPEC_CTRL 0x1d
#define IP101G_DIGITAL_IO_SPEC_CTRL_SEL_INTR32 BIT(2)
+#define IP175C_PHY_ID 0x02430d80
+#define IP1001_PHY_ID 0x02430d90
+#define IP101A_PHY_ID 0x02430c54
+
/* The 32-pin IP101GR package can re-configure the mode of the RXER/INTR_32 pin
* (pin number 21). The hardware default is RXER (receive error) mode. But it
* can be configured to interrupt mode manually.
@@ -329,9 +333,8 @@ static irqreturn_t ip101a_g_handle_interrupt(struct phy_device *phydev)
static struct phy_driver icplus_driver[] = {
{
- .phy_id = 0x02430d80,
+ PHY_ID_MATCH_MODEL(IP175C_PHY_ID),
.name = "ICPlus IP175C",
- .phy_id_mask = 0x0ffffff0,
/* PHY_BASIC_FEATURES */
.config_init = &ip175c_config_init,
.config_aneg = &ip175c_config_aneg,
@@ -339,17 +342,15 @@ static struct phy_driver icplus_driver[] = {
.suspend = genphy_suspend,
.resume = genphy_resume,
}, {
- .phy_id = 0x02430d90,
+ PHY_ID_MATCH_MODEL(IP1001_PHY_ID),
.name = "ICPlus IP1001",
- .phy_id_mask = 0x0ffffff0,
/* PHY_GBIT_FEATURES */
.config_init = &ip1001_config_init,
.suspend = genphy_suspend,
.resume = genphy_resume,
}, {
- .phy_id = 0x02430c54,
+ PHY_ID_MATCH_MODEL(IP101A_PHY_ID),
.name = "ICPlus IP101A/G",
- .phy_id_mask = 0x0ffffff0,
/* PHY_BASIC_FEATURES */
.probe = ip101a_g_probe,
.config_intr = ip101a_g_config_intr,
@@ -362,9 +363,9 @@ static struct phy_driver icplus_driver[] = {
module_phy_driver(icplus_driver);
static struct mdio_device_id __maybe_unused icplus_tbl[] = {
- { 0x02430d80, 0x0ffffff0 },
- { 0x02430d90, 0x0ffffff0 },
- { 0x02430c54, 0x0ffffff0 },
+ { PHY_ID_MATCH_MODEL(IP175C_PHY_ID) },
+ { PHY_ID_MATCH_MODEL(IP1001_PHY_ID) },
+ { PHY_ID_MATCH_MODEL(IP101A_PHY_ID) },
{ }
};
--
2.20.1
next prev parent reply other threads:[~2021-02-09 16:42 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-09 16:40 [PATCH net-next 0/9] net: phy: icplus: cleanups and new features Michael Walle
2021-02-09 16:40 ` Michael Walle [this message]
2021-02-10 1:55 ` [PATCH net-next 1/9] net: phy: icplus: use PHY_ID_MATCH_MODEL() macro Andrew Lunn
2021-02-09 16:40 ` [PATCH net-next 2/9] net: phy: icplus: use PHY_ID_MATCH_EXACT() for IP101A/G Michael Walle
2021-02-10 1:57 ` Andrew Lunn
2021-02-09 16:40 ` [PATCH net-next 3/9] net: phy: icplus: drop address operator for functions Michael Walle
2021-02-10 1:57 ` Andrew Lunn
2021-02-09 16:40 ` [PATCH net-next 4/9] net: phy: icplus: use the .soft_reset() of the phy-core Michael Walle
2021-02-10 2:02 ` Andrew Lunn
2021-02-09 16:40 ` [PATCH net-next 5/9] net: phy: icplus: add IP101A/IP101G model detection Michael Walle
2021-02-09 20:03 ` Heiner Kallweit
2021-02-09 16:40 ` [PATCH net-next 6/9] net: phy: icplus: don't set APS_EN bit on IP101G Michael Walle
2021-02-10 2:04 ` Andrew Lunn
2021-02-09 16:40 ` [PATCH net-next 7/9] net: phy: icplus: select page before writing control register Michael Walle
2021-02-10 2:07 ` Andrew Lunn
2021-02-10 7:03 ` Heiner Kallweit
2021-02-10 8:25 ` Michael Walle
2021-02-10 9:03 ` Heiner Kallweit
2021-02-10 9:14 ` Michael Walle
2021-02-10 10:30 ` Russell King - ARM Linux admin
2021-02-10 10:38 ` Michael Walle
2021-02-10 10:49 ` Russell King - ARM Linux admin
2021-02-10 11:14 ` Michael Walle
2021-02-10 11:48 ` Russell King - ARM Linux admin
2021-02-10 12:17 ` Michael Walle
2021-02-10 12:26 ` Heiner Kallweit
2021-02-10 20:27 ` Andrew Lunn
2021-02-09 16:40 ` [PATCH net-next 8/9] net: phy: icplus: add PHY counter for IP101G Michael Walle
2021-02-10 2:10 ` Andrew Lunn
2021-02-09 16:40 ` [PATCH net-next 9/9] net: phy: icplus: add MDI/MDIX support for IP101A/G Michael Walle
2021-02-10 2:12 ` Andrew Lunn
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210209164051.18156-2-michael@walle.cc \
--to=michael@walle.cc \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).