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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu 2019-03-14 14:19:42, Rasmus Villemoes wrote:
> On 14/03/2019 13.00, Pavel Machek wrote:
> linux,default-trigger from
> > 
> > Yeah and now insert the modules for the can devices in different
> > order... May not happen in your case but will be fairly common for
> > ethernets.
> 
> Unpredictable device names is not a problem I'm trying to solve, nor one
> that actually occurs on embedded systems. And even if one has such a
> system, one is likely running udev or similar to rename devices to
> something sane and predictable, in which case a fixed string _still_
> works fine. Or one uses udev rules to munge the netdev trigger sysfs
> files, and has applications dealing with devices appearing as banana457.
> 
> OK, so there's of_find_net_device_by_node, so a phandle solution might
> also be possible, and might work just as well for my case. But I still
> think initializing with a fixed string is the simplest and sanest thing
> to do.

Simplest, yes. Mergeable, no. Sorry.

Udev will not help with renaming -- it runs after kernel boot, while
udev parsing is usually done before userland starts.

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.

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux