power: max77665: enable high current charging
authorXin Xie <xxie@nvidia.com>
Fri, 12 Apr 2013 00:16:44 +0000 (17:16 -0700)
committerMrutyunjay Sawant <msawant@nvidia.com>
Wed, 24 Apr 2013 14:36:53 +0000 (07:36 -0700)
commitebc132f810b295951f5aad0b0b271000dffb0164
tree5f834087b2e1c926f371118f7228b1478f55fb5a
parent69d125097164cf9c3df88071261453008b8012fc
power: max77665: enable high current charging

This patch enables the high power charging (>500mA) on max77665.

Not all of wall charger or CDP port can support 1.5A charging. We need
dynamically detect the charger current capability in order to have the
maximum output efficiency. This can be done by detect max77665 is in the
'regulation loop' mode.

During the high power charging, VBUS out can get cut off if input VBUS
is below VCHIN_UVLO, and AP wll turn off the charging. We will detect
this condition and only turn off the charging when USB cable is indeed
unplugged.

bug 1236790
bug 1272664

Change-Id: I1a23d3e2bba066a48dc392055d7347bab956dda0
Signed-off-by: Xin Xie <xxie@nvidia.com>
Reviewed-on: http://git-master/r/220785
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Syed Rafiuddin <srafiuddin@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
drivers/power/max77665-charger.c
include/linux/max77665-charger.h