Re: [PATCH led-next 1/1] leds: mlxreg: Allow multi-instantiation of same name LED for modular systems

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

 



> > 
> > Vadim, the LED core constructs names in form
> >   device:color:function-enumerator
> > so if you must have number there, IMO it should be
> >   mlxreg:green:status-48
> >   mlxreg:green:status-56
> >   ...  
> 
> But why you consider it as function enumerator?
> For example card48, card56 are two different devices
> of same type.
> Both have 'status' LED.

OK this is a fair point.

I was thinking such because in my mind I had this idea that for an
ethernet switch with interfaces lan0 - lan4 it would make sense to use
the LED_FUNCTION_LAN function with function enumerator. But thinking
about this now again makes me wonder if instead the lan0 - lan4 should
be devicenames instead, since normally they are network interface names.

Vadim, the reason why Pavel and I think that mlxreg (or mlxregN) is not
valid devicename part (although mlxreg has to stay since many users
already depend on it, as you say), is that the mlxreg name is not
exposed anywhere else in Linux from userspace point of view.

Devicename eth0 is okay, because it is network interface name.
Devicename sda would be okay, because everyone knows it is a block
device and you can access it via /dev/sda.
Devicename hci0 would be okay because it is bluetooth interface
accessible via hcitool.
Devicenames mtd0, kbd0, mouse0 would be okay, I think.

But mlxreg is not accessible via anything else in the system. Unless
your systems also have something like /dev/mlxreg, that is.

Do the LEDs on these cards only indicate status of the cards
themselves as a whole? Or are there LEDs on these cards dedicated to
their peripherals? For example if there is an ethernet port with LEDs on
one of these cards, the devicename part for these LEDs should be of the
device of that ethernet port, not mlxreg...

Marek



[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