diff options
author | Steve Glendinning <steve.glendinning@smsc.com> | 2009-05-01 05:46:51 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-05-01 15:27:02 -0700 |
commit | f293501c61c50b014ad2347661c6acd951c80fed (patch) | |
tree | 8b6327749d50bd2fdf2fb15e2bd54e1f3d028e70 /drivers/net/usb/smsc95xx.c | |
parent | 2382b15bcc39228572ccf1d9a1185dcabb84c833 (diff) | |
download | linux-f293501c61c50b014ad2347661c6acd951c80fed.tar.bz2 |
smsc95xx: configure LED outputs
SMSC LAN9500 has dual purpose GPIO/LED pins, and by default at power-on
these are configured as GPIOs. This means that if LEDs are fitted they
won't ever light.
This patch sets them to be LED outputs for speed, duplex and
link/activity.
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/smsc95xx.c')
-rw-r--r-- | drivers/net/usb/smsc95xx.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index dc1665326592..0fd68a5f9d49 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -941,6 +941,16 @@ static int smsc95xx_reset(struct usbnet *dev) if (netif_msg_ifup(dev)) devdbg(dev, "ID_REV = 0x%08x", read_buf); + /* Configure GPIO pins as LED outputs */ + write_buf = LED_GPIO_CFG_SPD_LED | LED_GPIO_CFG_LNK_LED | + LED_GPIO_CFG_FDX_LED; + ret = smsc95xx_write_reg(dev, LED_GPIO_CFG, write_buf); + if (ret < 0) { + devwarn(dev, "Failed to write LED_GPIO_CFG register, ret=%d", + ret); + return ret; + } + /* Init Tx */ write_buf = 0; ret = smsc95xx_write_reg(dev, FLOW, write_buf); |