charge: Config charge rate for internal FG product

Set charge rate for use internal FG charge pump
product.

Change-Id: Ia7a9bd8f89f3ff81f183534a9b3b1c58d6b3a393
Signed-off-by: chailu1 <chailu1@lenovo.com>
Reviewed-on: https://gerrit.mot.com/1718330
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Hujun Liao <liaohj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1893613
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
This commit is contained in:
chailu1 2020-08-10 16:25:46 +08:00 committed by Wei Xu
parent 0204dc4652
commit a2889ddc4f

View file

@ -1369,6 +1369,13 @@ static void mmi_heartbeat_work(struct work_struct *work)
mmi_cycle_counts(chip);
mmi_chrg_rate_check(chip);
if (!chip->extrn_fg) {
val.intval = chip->charger_rate;
ret = power_supply_set_property(chip->batt_psy,
POWER_SUPPLY_PROP_CHARGE_RATE, &val);
if (ret)
mmi_chrg_err(chip, "Unable to set charge rate: %d\n", ret);
}
chrg_rate_string = kmalloc(CHG_SHOW_MAX_SIZE, GFP_KERNEL);
if (!chrg_rate_string) {