[PATCH] U-Boot GTA02: Always enable charger on startup

Rask Ingemann Lambertsen ccc94453 at vip.cybercity.dk
Thu Aug 27 00:40:41 CEST 2009


On Wed, Aug 26, 2009 at 11:44:53AM -0300, Werner Almesberger wrote:
> Rask Ingemann Lambertsen wrote:
> >    The first hunk ensures that we exit wait_for_power() with the charger
> > enabled. The second hunk removes a piece of code that is now a no op because
> > the charger is already enabled at that point.
> 
> Yes, but isn't that basically what happened before as well, just a
> few milliseconds later ? My question is if there was anything subtly
> wrong in the functionality or if you just changed it for esthetics.

   Yes, there was indeed something subtly wrong in the functionality. As
explained (and you can verify this), if you had the device turned off with
power plugged in and briefly (< 1 s) pressed the power button, the charger
ended up disabled because the code bails out before getting to the point
where it reenables the charger.

   (Or if you're talking specifically about the wait_for_power() while loop,
it's not clear to me that the loop will always exit with the charger
enabled, and even if it does, it's something that could easily be broken by
accident.)

-- 
Rask Ingemann Lambertsen
Danish law requires addresses in e-mail to be logged and stored for a year



More information about the openmoko-kernel mailing list