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]

 



On Wed, 7 Oct 2020 13:31:05 +0200
Pavel Machek <pavel@xxxxxx> wrote:

> On Tue 2020-10-06 19:58:50, Vadim Pasternak wrote:
> > It could be more than one instance of LED with the same name in the
> > modular systems. For example, "status" or "uid" LED can be located
> > on chassis and on each line card of modular system.
> > In order to avoid conflicts with duplicated names, append platform
> > device Id, which is unquie, to LED name after driver name.
> > Thus, for example, "status" LED on chassis is to be called, like it is
> > called now on non modular systems, on which platform device Id is not
> > specified: "mlxreg:status:green". While for the line cards LEDs it will
> > be called like: "mlxreg48:status:green", "mlxreg66:status:green",
> > etcetera.
> 
> No.
> 
> You really should not have mlxreg: in the LED label. It is useless.
> 
> Make it so that LEDs on main body are ":foo:bar", and LEDs on the
> expansion card has something reasonable as the device part.
> 
> Best regards,
> 								Pavel

Moreover the LED core, if there are more LEDs with same color and
function, constructs labels in the form
  [device:]color:function-functionenumerator
so if we want your driver to align with other LED drivers, you should put
the enumerator at the end of the label
  green:status-48
  green:status-66
...

Pavel, the LED core does not put the ':' symbol at the beginning if
there is no devicename. The LED name is only "color:function". Should
this change?

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