diff options
-rw-r--r-- | drivers/power/bq27x00_battery.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/power/bq27x00_battery.c b/drivers/power/bq27x00_battery.c index 2a3e13d..96d64c66e 100644 --- a/drivers/power/bq27x00_battery.c +++ b/drivers/power/bq27x00_battery.c @@ -422,10 +422,13 @@ static void bq27x00_update(struct bq27x00_device_info *di) int flags_changed; cache.flags = bq27x00_read(di, BQ27x00_REG_FLAGS, !is_bq27500); + if ((cache.flags & 0xff) == 0xff) + /* read error */ + cache.flags = -1; if (cache.flags >= 0) { if (!is_bq27500 && !is_bq27425 && (cache.flags & BQ27000_FLAG_CI)) { - dev_info(di->dev, "battery is not calibrated! ignoring capacity values\n"); + dev_dbg(di->dev, "battery is not calibrated! ignoring capacity values\n"); cache.capacity = -ENODATA; cache.energy = -ENODATA; cache.time_to_empty = -ENODATA; |