Re: [PATCH net-next 5/5] igc: Export LEDs

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

 



> 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.

> 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.

     Andrew



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux