[lkml]   [2020]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH RFC leds + net-next v3 0/2] Add support for LEDs on Marvell PHYs

this is v3 of my RFC adding support for LEDs connected to Marvell PHYs.

Please note that if you want to test this, you still need to first apply
the patch adding the LED private triggers support from Pavel's tree.

Changes since v2:
- to share code with other drivers which may want to also offer PHY HW
control of LEDs some of the code was refactored and now resides in
phy_hw_led_mode.c. This code is compiled in when config option
LED_TRIGGER_PHY_HW is enabled. Drivers wanting to offer PHY HW control
of LEDs should depend on this option.
- the "hw-control" trigger is renamed to "phydev-hw-mode" and is
registered by the code in phy_hw_led_mode.c
- the "hw_control" sysfs file is renamed to "hw_mode"
- struct phy_driver is extended by three methods to support PHY HW LED
- I renamed the various HW control modes offeret by Marvell PHYs to
conform to other Linux mode names, for example the "1000/100/10/else"
mode was renamed to "1Gbps/100Mbps/10Mbps", or "recv/else" was renamed
to "rx" (this is the name of the mode in netdev trigger).


Marek Behún (2):
net: phy: add API for LEDs controlled by PHY HW
net: phy: marvell: add support for PHY LEDs via LED class

drivers/net/phy/Kconfig | 10 +
drivers/net/phy/Makefile | 1 +
drivers/net/phy/marvell.c | 364 ++++++++++++++++++++++++++++++
drivers/net/phy/phy_hw_led_mode.c | 96 ++++++++
include/linux/phy.h | 15 ++
5 files changed, 486 insertions(+)
create mode 100644 drivers/net/phy/phy_hw_led_mode.c


 \ /
  Last update: 2020-07-24 18:47    [W:0.150 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site