power: supply: bq27xxx: Add cache parameter to bq27xxx_battery_current_and_status()
stable inclusion from stable-v5.10.182 commit 7ff807d68b5d9db1071986e1043d9a63035053fe category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8GJZJ Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=7ff807d68b5d9db1071986e1043d9a63035053fe -------------------------------- [ Upstream commit 35092c58 ] Add a cache parameter to bq27xxx_battery_current_and_status() so that it can optionally use cached flags instead of re-reading them itself. This is a preparation patch for making bq27xxx_battery_update() check the status and have it call power_supply_changed() on status changes. Fixes: 297a533b ("bq27x00: Cache battery registers") Signed-off-by:Hans de Goede <hdegoede@redhat.com> Signed-off-by:
Sebastian Reichel <sebastian.reichel@collabora.com> Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com> (cherry picked from commit 226c98af)
Loading
Please sign in to comment