Re: [PATCH net-next + leds v2 6/7] net: phy: marvell: add support for LEDs controlled by Marvell PHYs

From: Andrew Lunn
Date: Thu Sep 10 2020 - 10:49:01 EST

> Moreover I propose (and am willing to do) this:
> Rewrite phy_led_trigger so that it registers one trigger, `phydev`.
> The identifier of the PHY which should be source of the trigger can be
> set via a separate sysfs file, `device_name`, like in netdev trigger.
> The linked speed on which the trigger should light the LED will be
> selected via sysfs file `mode` (or do you propose another name?
> `trigger_on` or something?)
> Example:
> # cd /sys/class/leds/<LED>
> # echo phydev >trigger
> # echo XYZ >device_name
> # cat mode
> 1Gbps 100Mbps 10Mbps
> # echo 1Gbps >mode
> # cat mode
> [1Gbps] 100Mbps 10Mbps
> Also the code should be moved from driver/net/phy to
> drivers/leds/trigger.
> The old API can be declared deprecated or removed, but outright
> removal may cause some people to complain.

This is ABI, so you cannot remove it, or change it. You can however
add to it, in a backwards compatible way.