mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
add lpd and vbus present state
Save lpd and vbus present state in charger info data structure. Change-Id: Ic2ee432ff24669ae9d9412c8efdc58297fecb40c Signed-off-by: yanyh2 <yanyh2@motorola.com> Reviewed-on: https://gerrit.mot.com/2061925 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Jianqi Yang <yangj@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
2e9f46e6c7
commit
6949e07285
1 changed files with 5 additions and 0 deletions
|
|
@ -45,6 +45,8 @@
|
|||
|
||||
#define OEM_BM_ULOG_SIZE 4096
|
||||
|
||||
#define VBUS_MIN_MV 4000
|
||||
|
||||
static bool debug_enabled;
|
||||
module_param(debug_enabled, bool, 0600);
|
||||
MODULE_PARM_DESC(debug_enabled, "Enable debug for qti glink charger driver");
|
||||
|
|
@ -472,6 +474,9 @@ static int qti_charger_get_chg_info(void *data, struct mmi_charger_info *chg_inf
|
|||
if (!chg->chg_info.chrg_present &&
|
||||
chg->chg_info.chrg_type != 0)
|
||||
chg->chg_info.chrg_present = 1;
|
||||
|
||||
chg->chg_info.vbus_present = chg->chg_info.chrg_mv > VBUS_MIN_MV;
|
||||
chg->chg_info.lpd_present = chg->lpd_info.lpd_present;
|
||||
memcpy(chg_info, &chg->chg_info, sizeof(struct mmi_charger_info));
|
||||
|
||||
if (chrg_type != chg->chg_info.chrg_type ||
|
||||
|
|
|
|||
Loading…
Reference in a new issue