devon:optimize charging

reduce bc1.2 get result time
if bc1.2 ready done, do not wait an extra 100ms

Change-Id: I1daf527423ee893a32986e277a1b99c23278a45d
Signed-off-by: longc102 <longc102@motorola.com>
Reviewed-on: https://gerrit.mot.com/2231765
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qiong Xie <xieq2@motorola.com>
Reviewed-by: Wang Wang <wangwang1@lenovo.com>
Submit-Approved: Jira Key
This commit is contained in:
longc102 2022-04-01 12:32:38 +08:00
commit 15d4c77160

View file

@ -1908,10 +1908,12 @@ bool bc12_detection_done(struct sgm4154x_device *chip)
dev_err(chip->dev, "Cann't read SMB5_BC12_DETECTION_READY IIO\n");
dev_info(chip->dev, "read SMB5_BC12_DETECTION_READY IIO :%d\n",val);
if (val)
break;
msleep(100);
msleep(50);
delay_count ++;
}while(val == false && delay_count <= 10);
}while(delay_count <= 20);
dev_info(chip->dev, "read SMB5_BC12_DETECTION_READY IIO :%d\n",val);
return val;