[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210727081528.9816-1-michael@walle.cc>
Date: Tue, 27 Jul 2021 10:15:28 +0200
From: Michael Walle <michael@...le.cc>
To: andrew@...n.ch
Cc: anthony.l.nguyen@...el.com, bigeasy@...utronix.de,
davem@...emloft.net, dvorax.fuxbrumer@...ux.intel.com,
f.fainelli@...il.com, hkallweit1@...il.com,
jacek.anaszewski@...il.com, kabel@...nel.org, kuba@...nel.org,
kurt@...utronix.de, linux-leds@...r.kernel.org,
netdev@...r.kernel.org, pavel@....cz, sasha.neftin@...el.com,
vinicius.gomes@...el.com, vitaly.lifshits@...el.com,
Michael Walle <michael@...le.cc>
Subject: Re: [PATCH net-next 5/5] igc: Export LEDs
>> The last time we discussed this (Andrew, Pavel and I), we've decided
>> that for ethernet PHY controlled LEDs we want the devicename part
>> should be something like
>> phyN or ethphyN or ethernet-phyN
>> with N a number unique for every PHY (a simple atomically increased
>> integer for every ethernet PHY).
>
> We might want to rethink this. PHYs typically have 2 or 3 LEDs. So we
> want a way to indicate which LED of a PHY it is. So i suspect we will
> want something like
>
> ethphyN-led0, ethphyN-led1, ethphyN-led2.
>
> I would also suggest N starts at 42, in order to make it clear it is a
> made up arbitrary number, it has no meaning other than it is
> unique. What we don't want is people thinking ethphy0-led0 has
> anything to do with eth0.
Why do we have to distiguish between LEDs connected to the PHY and LEDs
connected to the MAC at all? Why not just name it ethN either if its behind
the PHY or the MAC? Does it really matter from the users POV?
>> I confess that I am growing a little frustrated here, because there
>> seems to be no optimal solution with given constraints and no official
>> consensus for a suboptimal yet acceptable solution.
>
> I do think it is clear that the base name is mostly irrelevant and not
> going to be used in any meaningful way. You are unlikely to access
> these LEDs via /sys/class/leds. You are going to go into
> /sys/class/net/<ifname> and then either follow the device symlink, or
> the phydev symlink and look for LEDs there. And then only the -ledM
> part of the name might be useful. Since the name is mostly
> meaningless, we should just decide and move on.
Even more if it is not relevant ;)
-michael
Powered by blists - more mailing lists