Commit 2f67864b authored by Andrew F. Davis's avatar Andrew F. Davis Committed by David S. Miller

net: phy: dp83848: Add macro for dp83848 compatible devices

Add a helper macro for defining dp83848 compatible phy devices.
Update copyright info.
Signed-off-by: default avatarAndrew F. Davis <afd@ti.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 8431706b
/* /*
* Driver for the Texas Instruments DP83848 PHY * 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 * 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 * 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[] = { ...@@ -70,25 +70,28 @@ static struct mdio_device_id __maybe_unused dp83848_tbl[] = {
}; };
MODULE_DEVICE_TABLE(mdio, dp83848_tbl); MODULE_DEVICE_TABLE(mdio, dp83848_tbl);
static struct phy_driver dp83848_driver[] = { #define DP83848_PHY_DRIVER(_id, _name) \
{ { \
.phy_id = DP83848_PHY_ID, .phy_id = _id, \
.phy_id_mask = 0xfffffff0, .phy_id_mask = 0xfffffff0, \
.name = "TI DP83848", .name = _name, \
.features = PHY_BASIC_FEATURES, .features = PHY_BASIC_FEATURES, \
.flags = PHY_HAS_INTERRUPT, .flags = PHY_HAS_INTERRUPT, \
\
.soft_reset = genphy_soft_reset, .soft_reset = genphy_soft_reset, \
.config_init = genphy_config_init, .config_init = genphy_config_init, \
.suspend = genphy_suspend, .suspend = genphy_suspend, \
.resume = genphy_resume, .resume = genphy_resume, \
.config_aneg = genphy_config_aneg, .config_aneg = genphy_config_aneg, \
.read_status = genphy_read_status, .read_status = genphy_read_status, \
\
/* IRQ related */ \
.ack_interrupt = dp83848_ack_interrupt, \
.config_intr = dp83848_config_intr, \
}
/* IRQ related */ static struct phy_driver dp83848_driver[] = {
.ack_interrupt = dp83848_ack_interrupt, DP83848_PHY_DRIVER(DP83848_PHY_ID, "TI DP83848 10/100 Mbps PHY"),
.config_intr = dp83848_config_intr,
},
}; };
module_phy_driver(dp83848_driver); module_phy_driver(dp83848_driver);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment