sc89890h:device: add sc89890h device id

rhode second master charger
add device id 0x04 for sc89890h in bq2589x.c

Change-Id: I8295ffcc73443e68e73c8c0bfd6ded57cd7b1756
Signed-off-by: wutao <huaqin89@motorola.com>
Reviewed-on: https://gerrit.mot.com/2144127
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
This commit is contained in:
wutao 2021-12-14 21:13:13 +08:00 • committed by huaqin89
commit 6d3ebfe5f3

View file

@ -89,6 +89,7 @@ enum bq2589x_part_no {
BQ25890 = 0x03,
BQ25892 = 0x00,
BQ25895 = 0x07,
SC89890H = 0x04,
};
struct bq2589x_config {
@ -2364,13 +2365,16 @@ static int bq2589x_charger_probe(struct i2c_client *client,
i2c_set_clientdata(client, bq);
ret = bq2589x_detect_device(bq);
if (!ret && bq->part_no == BQ25890) {
bq->status |= BQ2589X_STATUS_EXIST;
dev_info(dev, "%s: charger device bq25890 detected, revision:%d\n", __func__, bq->revision);
} else {
dev_info(dev, "%s: no bq25890 charger device found:%d\n", __func__, ret);
return -ENODEV;
}
if (!ret && bq->part_no == BQ25890) {
bq->status |= BQ2589X_STATUS_EXIST;
dev_info(dev, "%s: charger device bq25890 detected, revision:%d\n", __func__, bq->revision);
} else if (!ret && bq->part_no == SC89890H) {
bq->status |= BQ2589X_STATUS_EXIST;
dev_info(dev, "%s: charger device sc89890h detected, revision:%d\n", __func__, bq->revision);
} else {
dev_info(dev, "%s: no bq25890 charger device found:%d\n", __func__, ret);
return -ENODEV;
}
bq->batt_psy = power_supply_get_by_name("bms");