On Tue, 2008-03-18 at 08:47 -0600, Grant Likely wrote: > On Tue, Mar 18, 2008 at 2:29 AM, Bartlomiej Sieka <[EMAIL PROTECTED]> wrote: > > Grant, > > > > Yes, the Motion-PRO LED driver has been reworked and posted: > > http://patchwork.ozlabs.org/linuxppc/patch?q=Motion-pro&id=16617 > > Okay, I've taken another look at the driver and I've figured out what > has been bothering me about it. It seems to me that the motion pro > led driver is just the first of many that we will see (seeing as some > many people find the blinking lights rather soothing) and it's a non > trivial amount of code. > > (Note: I'm not actually opposed to this driver if Richard is okay with > it; but I do think that in the long term we should move towards a more > generic approach) > > In essence, this driver sets up two GPIO pins to drive LEDs. A pretty > common approach for putting LEDs on a board. In this case each GPIO > bank only contains 1 pin; but I imagine that on other boards there > will be multiple pins in a GPIO bank, only some of which actually used > for blinking LEDs. > > I've started thinking that it would be better to split things up in > the device tree to have one node for each GPIO block and a single LED > node that maps LEDs to gpio pins. That would allow a common driver to > be written for all GPIO driven LEDs with a single block of device tree > parsing code. Plus, it allows other devices to use GPIO pins within > the same block (not an issue for the motion pro board; but when other > boards start coming on-line it would allow us to reduce the amount of > board specific code). Finally, it means that the timer pin GPIO > driver can be used for more than just flashing an attached LED.
I don't mind having a specific driver but I don't know anything about the hardware its creating the interface for so I need the community's help with that part. There is drivers/leds/leds-gpio.c if that would work better. Regards, Richard _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@ozlabs.org https://ozlabs.org/mailman/listinfo/linuxppc-dev