bq2597x:retry to read nu2105 id

Read nu2015 id failed in poweroff charing.
Retry to read the nu2105 id again.

Change-Id: I57637e2f666d6142a9563dbb59cea40f6f86542a
Signed-off-by: Lei Chen <chenlei18@lenovo.com>
Reviewed-on: https://gerrit.mot.com/2232735
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Haijian Ma <mahj8@motorola.com>
Reviewed-by: Wei Xu <xuwei9@lenovo.com>
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
Lei Chen 2022-04-02 14:09:30 +08:00 • committed by Lei Chen
commit 068ba044e9

View file

@ -1355,6 +1355,9 @@ static int bq2597x_detect_device(struct bq2597x *bq)
u8 data;
ret = bq2597x_read_byte(bq, BQ2597X_REG_13, &data);
if (ret < 0) {
ret = bq2597x_read_byte(bq, BQ2597X_REG_13, &data); //Try again for NU2105 in poweroff charging
}
if (ret == 0) {
bq->part_no = data;
bq->device_id = (data & BQ2597X_DEV_ID_MASK);