Messages in this thread |  | | From | Bryan Wu <> | Date | Tue, 17 Feb 2015 15:59:01 -0800 | Subject | Re: [PATCH] led/led-class: Handle LEDs with the same name |
| |
On Tue, Feb 17, 2015 at 3:47 PM, Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> wrote: > Hi > > On Wed, Feb 18, 2015 at 12:35 AM, Bryan Wu <cooloney@gmail.com> 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
|  |