On Thu, Jan 16, 2025 at 02:32:13PM +0100, Andrew Lunn wrote: > On Mon, Jan 13, 2025 at 01:23:37AM +0100, Marek Vasut wrote: > > Document netdev trigger specific netdev-trigger-mode property which > > is used to configure the netdev trigger mode flags. Those mode flags > > define events on which the LED acts upon when the hardware offload is > > enabled. This is traditionally configured via sysfs, but that depends > > on udev rules which are available either too late or never in case of > > non-Linux systems. > > > > For each LED with linux,default-trigger = "netdev" described in DT, this > > optional netdev-trigger-mode property supplies the default configuration > > of the PHY LED mode via DT. This property should be set to a subset of > > TRIGGER_NETDEV_* flags. > > > > Signed-off-by: Marek Vasut <marex@xxxxxxx> > > --- > > Cc: Andrew Lunn <andrew@xxxxxxx> > > Cc: Christian Marangi <ansuelsmth@xxxxxxxxx> > > Cc: Conor Dooley <conor+dt@xxxxxxxxxx> > > Cc: Heiner Kallweit <hkallweit1@xxxxxxxxx> > > Cc: Jacek Anaszewski <jacek.anaszewski@xxxxxxxxx> > > Cc: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx> > > Cc: Lee Jones <lee@xxxxxxxxxx> > > Cc: Lukasz Majewski <lukma@xxxxxxx> > > Cc: Pavel Machek <pavel@xxxxxx> > > Cc: Rob Herring <robh@xxxxxxxxxx> > > Cc: devicetree@xxxxxxxxxxxxxxx > > Cc: linux-leds@xxxxxxxxxxxxxxx > > --- > > Documentation/devicetree/bindings/leds/common.yaml | 6 ++++++ > > 1 file changed, 6 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml > > index 3e8319e443392..1f1148fdf20c0 100644 > > --- a/Documentation/devicetree/bindings/leds/common.yaml > > +++ b/Documentation/devicetree/bindings/leds/common.yaml > > @@ -233,6 +233,12 @@ properties: > > Maximum timeout in microseconds after which the flash LED is turned off. > > Required for flash LED nodes with configurable timeout. > > > > + # Requires netdev trigger > > + netdev-trigger-mode: > > + description: > > + The netdev LED trigger default mode flags, use TRIGGER_NETDEV_ * flags. > > + $ref: /schemas/types.yaml#/definitions/uint32-array > > + > > allOf: > > - if: > > required: > > -- > > An example would be good. > > In order to be able to use TRIGGER_NETDEV_* i assume you are doing an > include which is outside of the usual dt-bindings directory. I don't > know of the DT Maintainers opinion on that. > Well I think we can just move those include to dt-bindings or at worst define new one (maybe less driver specific) and reference the internal one... Should not be a problem in theory. -- Ansuel