mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 21:59:12 -04:00
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:
parent
cb25448b24
commit
6d3ebfe5f3
1 changed files with 11 additions and 7 deletions
|
|
@ -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");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue