OSDN Git Service

smb138x: use chg src bit to disable parallel charger
authorAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Tue, 25 Apr 2017 01:33:55 +0000 (18:33 -0700)
committerAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Mon, 1 May 2017 21:43:19 +0000 (14:43 -0700)
commit0f0e36134d8a1082f099d543a122cd10d777beda
tree23c3cc539149b62654c0a5f5ad33537db775013b
parent9e2a6b5541dd93a934d491b67056e8821bbd9c18
smb138x: use chg src bit to disable parallel charger

smb1355 doesn't have any facility to suspend input. One has to
disable charging using the chg_en command bit.

So, when parallel charging needs to be disabled, configure
the charger to ignore the chg_en input pin and instead use the
command register. The command register is always programmed to
disable charging.

When parallel charging needs to be enabled, configure it to
follow the chg_en input pin.

This will work for both smb1355 and smb1381 parallel chargers.

Change-Id: I50294f40927641c2e0a7c7e4e7d263592086d3a9
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
drivers/power/supply/qcom/smb138x-charger.c