phy: new SMSC LAN83C185 PHY driver
Subsystems (3)
PATCH 1/1 phy: new SMSC LAN83C185 PHY driver
new SMSC LAN83C185 10BaseT/100BaseTX PHY driver for the PHY subsystem
---
drivers/net/phy/Kconfig | 6 ++ drivers/net/phy/Makefile | 1 drivers/net/phy/smsc.c | 134 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 141 insertions(+), 0 deletions(-) create mode 100644 drivers/net/phy/smsc.c
15ab98f0ecaf1fb161d0832a118c93976531af66
drivers/net/phy/Kconfig +6 -0
@@ -45,5 +45,11 @@ config CICADA_PHY ---help--- Currently supports the cis8204 +config SMSC_PHY + tristate "Drivers for SMSC PHYs" + depends on PHYLIB + ---help--- + Currently supports the LAN83C185 PHY + endmenu
drivers/net/phy/Makefile +1 -0
@@ -8,3 +8,4 @@ obj-$(CONFIG_DAVICOM_PHY) += davicom.o obj-$(CONFIG_CICADA_PHY) += cicada.o obj-$(CONFIG_LXT_PHY) += lxt.o obj-$(CONFIG_QSEMI_PHY) += qsemi.o +obj-$(CONFIG_SMSC_PHY) += smsc.o
drivers/net/phy/smsc.c new file +134 -0
134 lines not on this page · raw message
Signature · 1 line
1.2.6
Quoted 5 lines
drivers/net/phy/smsc.c new file +0
-0
[...]
drivers/net/phy/smsc.c line 44
Quoted 4 lines
drivers/net/phy/smsc.c new file +4
-0+/* prototypes */ +static int lan83c185_config_init (struct phy_device *); +static int lan83c185_config_intr (struct phy_device *); +static int lan83c185_ack_interrupt (struct phy_device *);
The forward declarations are useless.
drivers/net/phy/smsc.c line 49
Quoted 3 lines
drivers/net/phy/smsc.c new file +3
-0+static int lan83c185_config_init (struct phy_device *phydev) +{ +pr_debug ("%s: config_init\n" , phydev->attached_dev->name);
drivers/net/phy/*c does not use space before brace when functions are called.
[...]
Quoted 7 lines
drivers/net/phy/smsc.c new file +7
-0+static struct phy_driver lan83c185_driver = { + .phy_id =0x0007c0a0 ,/* OUI=0x00800f, Model#=0x0a */ + .phy_id_mask =0xfffffff0 , + .name ="SMSC LAN83C185" , + + .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause + | SUPPORTED_Asym_Pause),
drivers/net/phy/smsc.c line 94
Quoted 10 lines
drivers/net/phy/smsc.c new file +10
-0+ .flags = PHY_HAS_INTERRUPT | PHY_HAS_MAGICANEG, + +/* basic functions */ + .config_aneg = genphy_config_aneg, + .read_status = genphy_read_status, + .config_init = lan83c185_config_init, + +/* IRQ related */ + .ack_interrupt = lan83c185_ack_interrupt, + .config_intr = lan83c185_config_intr,
Whitespace/tab damage.
[...]
drivers/net/phy/smsc.c line 109
Quoted 11 lines
drivers/net/phy/smsc.c new file +11
-0+static int __init smsc_init (void ) +{ +int rc; + +if ((rc =phy_driver_register (&lan83c185_driver))) + goto err_register_lan83c185_driver; + +return 0 ; + +/* phy_driver_unregister (&lan83c185_driver); */ + err_register_lan83c185_driver:
Wow. :o)
What about:
static int __init smsc_init(void)
{
return phy_driver_register(&lan83c185_driver);
}Quoted 10 lines
+/*
+ * Overrides for Emacs so that we follow Linus's tabbing style.
+ * Emacs will notice this stuff at the end of the file and automatically
+ * adjust the settings for this buffer only. This must remain at the end
+ * of the file.
+ * ---------------------------------------------------------------------------
+ * Local variables:
+ * c-file-style: "linux"
+ * End:
+ */
Bloat. Where files in drivers/net include similar stuff, the lengthy explanation was removed.
The pr_debug statements ought to go imvho.
The patch contains a few tabs/whitespace at end of lines.
Signature · 1 line
Ueimor