Please pull linux-2.6-mpc52xx.git
Grant Likely
grant.likely at secretlab.ca
Wed Mar 19 01:47:55 EST 2008
On Tue, Mar 18, 2008 at 2:29 AM, Bartlomiej Sieka <tur at semihalf.com> wrote:
> Grant,
>
> Yes, the Motion-PRO LED driver has been reworked and posted:
> http://patchwork.ozlabs.org/linuxppc/patch?q=Motion-pro&id=16617
>
>
>
> > I need to look at it again,
> > but it is a lot of code for a very simple thing and I wasn't sure if I
> > should be the one to pick it up because it is in drivers/leds which
> > has a different maintainer.
>
> I'm copying Richard Purdie who's listed as LED SUBSYSTEM maintainer.
>
> Richard -- could pick up the above mentioned Motion-PRO LED driver for
> upstream inclusion? It started as a MPC5200-specific thing posted to
> linuxppc-dev and got reviewed there, with the intent to go upstream via
> Grant (MPC52XX maintainer). However, it seems that it should be merged
> through your subsystem.
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.
Cheers,
g.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
More information about the Linuxppc-dev
mailing list