summaryrefslogtreecommitdiff
path: root/include/soc/qcom/scm.h
diff options
context:
space:
mode:
authorSubbaraman Narayanamurthy <subbaram@codeaurora.org>2017-06-09 15:09:11 -0700
committerNicholas Troast <ntroast@codeaurora.org>2017-08-04 11:17:04 -0700
commit183bc63f12f505b69b4fd69175e702f4243c2cc1 (patch)
treeb98d4522f99503824636e58726ec10c71df2950e /include/soc/qcom/scm.h
parent96168e19d4062adfcfa3e524a6b19bb1b9791675 (diff)
power: qpnp-fg-gen3: improve cycle counter algorithm
Currently, when the charging status transitions to a state other than charging, cycle counter algorithm stores the cycle count for all the buckets for which the counting had started. This is fine with respect to the algorithm. However with qnovo enabled charging, this can cause issues when charging status can go to not charging intermittently causing the cycle count to be stored multiple times for a bucket. Modify the logic to check for the charge termination or the presence of input to go through all the buckets for storing the count. Also, increment and store the counter only if battery SOC had increased more than 2 LSBs for that SOC bucket. While at it, run cycle_counter algorithm as a function instead of a work. Also, keep the usage of cycle counter feature enable flag inside the cycle counter APIs. Change-Id: I62a92964ccbc6b965af09696deddc6fa8366a841 Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org> Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Diffstat (limited to 'include/soc/qcom/scm.h')
0 files changed, 0 insertions, 0 deletions