Skip to content

Commit 46a51f4

Browse files
committed
Merge tag 'for-v6.17-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply
Pull power supply fixes from Sebastian Reichel: - bq27xxx: avoid spamming the log for missing bq27000 battery * tag 'for-v6.17-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply: power: supply: bq27xxx: restrict no-battery detection to bq27000 power: supply: bq27xxx: fix error return in case of no bq27000 hdq battery
2 parents f83ec76 + 1e45197 commit 46a51f4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/power/supply/bq27xxx_battery.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1919,8 +1919,8 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)
19191919
bool has_singe_flag = di->opts & BQ27XXX_O_ZERO;
19201920

19211921
cache.flags = bq27xxx_read(di, BQ27XXX_REG_FLAGS, has_singe_flag);
1922-
if ((cache.flags & 0xff) == 0xff)
1923-
cache.flags = -1; /* read error */
1922+
if (di->chip == BQ27000 && (cache.flags & 0xff) == 0xff)
1923+
cache.flags = -ENODEV; /* bq27000 hdq read error */
19241924
if (cache.flags >= 0) {
19251925
cache.capacity = bq27xxx_battery_read_soc(di);
19261926

0 commit comments

Comments
 (0)