OSDN Git Service

qcom: battery: update parallel algorithm for ICL change
authorAbhijeet Dharmapurikar <adharmap@codeaurora.org>
Thu, 23 Mar 2017 21:07:07 +0000 (14:07 -0700)
committerAshay Jaiswal <ashayj@codeaurora.org>
Wed, 5 Apr 2017 04:49:20 +0000 (10:19 +0530)
commit347cdf228abe816a694204fa15b80dba2436073d
tree76855961c112b26a792f4a3dacec7f6f3c30103f
parent69d321dceeeb492e645d100906f54ac492330089
qcom: battery: update parallel algorithm for ICL change

Update the parallel algorithm for ICL change request.
Following steps are performed for every ICL change:
- disable parallel charger using ICL_CHANGE_VOTER
- update the new ICL and re-run AICL.
- re-enable parallel charger by removing vote of
  ICL_CHANGE_VOTER.

While at it, update the 'smblib_get_prop_usb_online'
function to use voter library's locked API to get
the usb_icl_vote, this fixes the lockup that happens
when charging is enabled/disabled from usb_icl_votable's
callback function.

CRs-Fixed: 2014572
Change-Id: I7deb6a50d67471ab1aa5e1db6fff880574b4bafb
Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
drivers/power/supply/qcom/battery.c
drivers/power/supply/qcom/smb-lib.c