power:fet_control: ironmn: Fix typo in chrg-fullcurr-en-gpio

Fix errant 1 placed in chrg_fullcurr_en_gpio assignment from parse_dt.
Should be a 0 param instead. Also check battplus_state at beginning
and terminate work is already set.

Change-Id: Ia69bfa919452e03423d669afd633fd9af3599966
Signed-off-by: Bernie Moreno-BERNIEM <berniem@motorola.com>
Reviewed-on: https://gerrit.mot.com/2089379
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Bernie Moreno-BERNIEM 2021-10-13 20:54:52 -05:00 • committed by Bernie Moreno
commit 8042a207c8

View file

@ -223,6 +223,11 @@ static void update_work(struct work_struct *work)
int hb_sched_time = HBDLY_DISCHARGE_MS;
fullcurr_state = CHRG_FULLCURR_EN;
if (battplus_state) {
pr_info("BATTFET Closed- Ending Work..\n");
cancel_delayed_work(&data->update);
return;
}
/*flip_mv = get_ps_int_prop(data->flip_batt_psy,
POWER_SUPPLY_PROP_VOLTAGE_NOW);
@ -306,7 +311,7 @@ static int parse_dt(struct device_node *node)
}
fetControlData.chrg_fullcurr_en_gpio = of_get_named_gpio(node,
"mmi,chrg-fullcurr-en-gpio", 1);
"mmi,chrg-fullcurr-en-gpio", 0);
if (!gpio_is_valid(fetControlData.chrg_fullcurr_en_gpio)) {
pr_err("chrg-fullcurr-en-gpio is not valid!\n");
return -ENODEV;