]> git.baikalelectronics.ru Git - kernel.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)
commitf9bc3024293245475c46ff7025b30fc98135cea1
tree801fad406c632c29b280d07f43a8a45ff6c5f52a
parentb61ea7c8da53cd1f7bd06445aa1baf1b2d58bbe9
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