OSDN Git Service

net: phy: phy_device: Call into the PHY driver to set LED offload
authorAndrew Lunn <andrew@lunn.ch>
Tue, 8 Aug 2023 21:04:34 +0000 (23:04 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 11 Aug 2023 00:35:00 +0000 (17:35 -0700)
commit1dcc03c9a7a824a31eaaecdfaa03542fb25feb6c
tree3ed0dc9297dc8262a8b098b62ab34501a39bc45a
parent7df1f14c04cbb1950e79c19793420f87227c3e80
net: phy: phy_device: Call into the PHY driver to set LED offload

Linux LEDs can be requested to perform hardware accelerated blinking
to indicate link, RX, TX etc. Pass the rules for blinking to the PHY
driver, if it implements the ops needed to determine if a given
pattern can be offloaded, to offload it, and what the current offload
is. Additionally implement the op needed to get what device the LED is
for.

Reviewed-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Link: https://lore.kernel.org/r/20230808210436.838995-3-andrew@lunn.ch
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phy_device.c
include/linux/phy.h