Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion drivers/charger/charger_bq25180.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
#define BQ25180_WATCHDOG_DISABLE 0x03
#define BQ25180_DEVICE_ID_MSK GENMASK(3, 0)
#define BQ25180_DEVICE_ID 0x00
#define BQ25188_DEVICE_ID 0x04
#define BQ25180_SHIP_RST_EN_RST_SHIP_MSK GENMASK(6, 5)

Check notice on line 49 in drivers/charger/charger_bq25180.c

View workflow job for this annotation

GitHub Actions / Run compliance checks on patch series (PR)

You may want to run clang-format on this change

drivers/charger/charger_bq25180.c:49 -#define BQ25188_DEVICE_ID 0x04 +#define BQ25188_DEVICE_ID 0x04
#define BQ25180_SHIP_RST_EN_RST_SHIP_ADAPTER 0x20
#define BQ25180_SHIP_RST_EN_RST_SHIP_BUTTON 0x40

Expand Down Expand Up @@ -205,6 +206,7 @@
if (ret < 0) {
return ret;
}
val &= BQ25180_VBAT_MSK;

*const_charge_voltage_uv = bq25180_vbatreg_to_mv(val) * 1000;

Expand Down Expand Up @@ -324,7 +326,7 @@
}

val &= BQ25180_DEVICE_ID_MSK;
if (val != BQ25180_DEVICE_ID) {
if ((val != BQ25180_DEVICE_ID) && (val != BQ25188_DEVICE_ID)) {
LOG_ERR("Invalid device id: %02x", val);
return -EINVAL;
}
Expand Down
Loading