fix-pcf50633-set-charging-limit-with-usb-limit.patchfork-to-stable-2.6.29-rc2
commit9029dff1f370018665a6e2999632a34fd0518f4d
authorAndy Green <andy@openmoko.com>
Thu, 5 Feb 2009 17:01:56 +0000 (5 17:01 +0000)
committerAndy Green <agreen@octopus.localdomain>
Thu, 5 Feb 2009 17:01:56 +0000 (5 17:01 +0000)
treec22b98c93bdbcc3b1477318f3d70e8f7bbdf22d4
parent8886032fd8cc0120b0d95a57137cc9b884325b3c
fix-pcf50633-set-charging-limit-with-usb-limit.patch

Cedric noticed that when he turned his GTA02 OFF while hooked to
a "dumb" USB charger that should only be asked for 100mA, suddenly
much more current was demanded.

When PMU enters PMU standmy when we go OFF, its USB current limit
is reset to the variant default of 500mA.  Since we previously had
the charging current limit fixed at 1A, it meant we immediately
charge at 500mA.

This patch makes the charging limit follow the USB current limit,
so that even when we go off, no more than the last authorized amount
of current will be taken, even if the USB current limit is later
broken by the variant default.

Reported-by: Cedric Berger <cedric.berger74@gmail.com>
Signed-off-by: Andy Green <andy@openmoko.com>
drivers/power/pcf50633-charger.c