]> asedeno.scripts.mit.edu Git - linux.git/commit
lan78xx: Read LED states from Device Tree
authorPhil Elwell <phil@raspberrypi.org>
Thu, 19 Apr 2018 16:59:39 +0000 (17:59 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 20 Apr 2018 15:39:09 +0000 (11:39 -0400)
commit1827b0678863bc97a1653fdf5308762b2aefcd56
tree801fad406c632c29b280d07f43a8a45ff6c5f52a
parent760db29bdc97b73ff60b091315ad787b1deb5cf5
lan78xx: Read LED states from Device Tree

Add support for DT property "microchip,led-modes", a vector of zero
to four cells (u32s) in the range 0-15, each of which sets the mode
for one of the LEDs. Some possible values are:

    0=link/activity          1=link1000/activity
    2=link100/activity       3=link10/activity
    4=link100/1000/activity  5=link10/1000/activity
    6=link10/100/activity    14=off    15=on

These values are given symbolic constants in a dt-bindings header.

Also use the presence of the DT property to indicate that the
LEDs should be enabled - necessary in the event that no valid OTP
or EEPROM is available.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
MAINTAINERS
drivers/net/phy/microchip.c
drivers/net/usb/lan78xx.c
include/dt-bindings/net/microchip-lan78xx.h [new file with mode: 0644]
include/linux/microchipphy.h