mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 22:40:54 -04:00
wls_charge: add status jugdement for state register read
Add status judgment for register reading, If register reading return an error, we should regard it as status "false". Change-Id: I6072ac01dcf531256e036bdc9814e0c5f9ffeb14 Reviewed-on: https://gerrit.mot.com/2251647 SME-Granted: SME Approvals Granted SLTApproved: Slta Waiver Tested-by: Jira Key Reviewed-by: Haijian Ma <mahj8@motorola.com> Reviewed-by: Huosheng Liao <liaohs@motorola.com> Submit-Approved: Jira Key
This commit is contained in:
parent
11664d82f8
commit
2fe305b4d6
1 changed files with 6 additions and 1 deletions
|
|
@ -996,7 +996,12 @@ static int cps_wls_get_state(void)
|
|||
|
||||
static bool cps_wls_get_vout_state(void)
|
||||
{
|
||||
return !!(cps_wls_get_state() & (1<<6));
|
||||
int ret = cps_wls_get_state();
|
||||
|
||||
if (ret == CPS_WLS_FAIL)
|
||||
ret = 0;
|
||||
|
||||
return !!(ret & (1<<6));
|
||||
}
|
||||
|
||||
static int cps_wls_get_die_tmp(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue