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]

 




> -----Original Message-----
> From: Marek Behun <marek.behun@xxxxxx>
> Sent: Thursday, October 08, 2020 11:56 AM
> To: Vadim Pasternak <vadimp@xxxxxxxxxx>
> Cc: Pavel Machek <pavel@xxxxxx>; jacek.anaszewski@xxxxxxxxx; linux-
> leds@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH led-next 1/1] leds: mlxreg: Allow multi-instantiation of
> same name LED for modular systems
> 
> On Thu, 8 Oct 2020 08:47:45 +0000
> Vadim Pasternak <vadimp@xxxxxxxxxx> wrote:
> 
> > >
> > > But noone is currently using mlxreg123 in their applications, so
> > > that part is not going in.
> >
> > Yes, this is true.
> > I could modify it as:
> >
> > 		if (priv->pdev->id > 0)
> > 			sprintf(led_data->led_cdev_name, "%s%d:%s", "card",
> > 				priv->pdev->id, data->label);
> > 		else
> > 			sprintf(led_data->led_cdev_name, "%s:%s", "mlxreg",
> > 				data->label);
> >
> 
> 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.

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