mmi_charger: align gki 2.0 requirement

orderly_poweroff is not supported in GKI2.0

Change-Id: I2fa959f0abdacb2188c054c46e1a05c8d8c9813c
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/2112840
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
This commit is contained in:
zhaoxp3 2021-11-11 10:10:23 +08:00 • committed by Xiangpo Zhao
commit e6fe8e87df

View file

@ -2014,7 +2014,11 @@ static void mmi_charger_heartbeat_work(struct work_struct *work)
chip->factory_kill_armed = true;
} else if (chip->factory_kill_armed && !factory_kill_disable) {
mmi_warn(chip, "Factory kill power off\n");
#if KERNEL_VERSION(5, 10, 0) <= LINUX_VERSION_CODE
kernel_power_off();
#else
orderly_poweroff(true);
#endif
} else {
chip->factory_kill_armed = false;
}