Re: [PATCH 4/4] leds: netdev trigger: allow setting initial values in device tree

From: Rasmus Villemoes
Date: Sun Mar 24 2019 - 16:39:36 EST


On 17/03/2019 20.11, Pavel Machek wrote:
> On Thu 2019-03-14 14:19:42, Rasmus Villemoes wrote:
>> On 14/03/2019 13.00, Pavel Machek wrote:
>> linux,default-trigger from
>>>
> Udev will not help with renaming -- it runs after kernel boot, while
> udev parsing is usually done before userland starts.

This is simply plain wrong. The netdev trigger explicitly tracks a
netdevice _by name_, and has netdev notifier in place to get notified
should a netdevice by that name ever appear.

> Plus, device tree should really describe hardware, and be usable with
> other operating systems. Of course, there are exceptions, but "can0"
> is unneccessarily linux-specific.

And "linux,netdev-trigger" is not linux-specific? And why are you so
hung up on the can example, it would work just as fine for usb0 or whatever.

Anyway, to whoever is responsible for merging this stuff, please at most
apply patch 1, factoring out the string-to-netdev handling doesn't make
much sense without the final configure-from-dt stuff.

Rasmus