mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
power: Return effective FCC for constant current
Return effective FCC for constant current in battery property in PMI632 chip platform as SMB5 QC driver does not support this property. Change-Id: I71e2c1559fad0ff3dd5dcd1eb75b6ccb0f5711a6 Signed-off-by: Yonghua Yan <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/1385623 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
c91a6f8e9d
commit
f3a28daaf2
1 changed files with 12 additions and 0 deletions
|
|
@ -3130,6 +3130,18 @@ static int batt_get_prop(struct power_supply *psy,
|
|||
case POWER_SUPPLY_PROP_CURRENT_MAX:
|
||||
val->intval = get_effective_result(chip->fcc_votable);
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_CONSTANT_CHARGE_CURRENT:
|
||||
if (chip->smb_version == PMI632_SUBTYPE) {
|
||||
val->intval = get_effective_result(chip->fcc_votable);
|
||||
break;
|
||||
}
|
||||
rc = power_supply_get_property(chip->qcom_psy, psp, val);
|
||||
if (rc < 0) {
|
||||
/* soft fail so uevents are not blocked */
|
||||
rc = 0;
|
||||
val->intval = -EINVAL;
|
||||
}
|
||||
break;
|
||||
case POWER_SUPPLY_PROP_TEMP:
|
||||
if (chip->max_main_psy && chip->max_flip_psy) {
|
||||
union power_supply_propval main_psy_val;
|
||||
|
|
|
|||
Loading…
Reference in a new issue