Subject: Re: Please pull linux-2.6-mpc52xx.git

From: Bartlomiej Sieka <[email-masked]>
Date: Tue, 25 Mar 2008 17:50:40 +0100

Grant Likely wrote:
> On Tue, Mar 18, 2008 at 10:41 AM, Richard Purdie <[email-masked]> wrote:
>>  On Tue, 2008-03-18 at 08:47 -0600, Grant Likely wrote:
>>  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.
> 
> Yes, I think that would be the right approach.  We would need to add
> the binding code to translate from the OF device tree to the leds-gpio
> driver.

I think that leds-gpio.c is a good solution for long-term. Note however,
that having the LED-to-GPIO pin mapping defined in the OF device
tree is problematic for targets that don't use a device tree, and for a
generic driver like leds-gpio.c some other mechanisms should probably be
used.

Going back to LEDs on Motion-PRO, using leds-gpio.c for this target
won't be achieved quickly. leds-gpio.c uses generic GPIO access
routines, which are not implemented for powerpc in general, and MPC5200
in particular. One would have to add support for MPC5200 to GPIO LIB
API, and implement the above mentioned LED-to-GPIO pin mapping in
leds-gpio.c, and then convert Motion-PRO.

Since both you and Richard don't have objections against a specific
driver, and switching Motion-PRO to a generic approach requires quite a
bit of work -- then how about we provide a patch that addresses
Richard's comments, and have the Motion-PRO LED support merged upstream
as a specific driver?

Regards,
Bartlomiej