Commit 46a51f4f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents f83ec76b 1e451977
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1919,8 +1919,8 @@ static void bq27xxx_battery_update_unlocked(struct bq27xxx_device_info *di)
	bool has_singe_flag = di->opts & BQ27XXX_O_ZERO;

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