Re: [PATCH] led/led-class: Handle LEDs with the same name

From: Bryan Wu
Date: Tue Feb 17 2015 - 18:59:28 EST


On Tue, Feb 17, 2015 at 3:47 PM, Ricardo Ribalda Delgado
<ricardo.ribalda@xxxxxxxxx> wrote:
> Hi
>
> On Wed, Feb 18, 2015 at 12:35 AM, Bryan Wu <cooloney@xxxxxxxxx> wrote:
>
>> So why not use name "red0" and name another one "red1"? since you have
>> multiple different red leds here any way.
>
> I cannot control how many cameras the user will decide to attach to
> the system, and if two similar cameras are attached to pciA and pciB,
> they would try to load the same dt.
>

DT just describe the hardware, so if it's a different hardware, they
should have different name.
red0 for GPIO 0, red1 for GPIO 1 or choose other good name instead of 0 and 1.

If this is true, you can just name one LED like gpio-led and let the
kernel to add number after that name. I don't think this is a good
idea to name the hardware. And These aren't like other devices which
will create device node like /dev/video0 /dev/video1. This is from
device tree to describe the hardware.

Thanks,
-Bryan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/