fix-pcf50633-set-charging-limit-with-usb-limit.patchforked-to-stable-2.6.29-rc2
commit71263dfa153662f35d44270f651793e089c6e9ab
authorAndy Green <andy@openmoko.com>
Sat, 7 Feb 2009 11:25:11 +0000 (7 11:25 +0000)
committerAndy Green <andy@openmoko.com>
Sat, 7 Feb 2009 11:25:11 +0000 (7 11:25 +0000)
tree58a161db6cf8953e33c1c9294a9c720a1aa0ad76
parent431091cc4f05119c1878baf4be7e605abc1a5615
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