]> git.baikalelectronics.ru Git - kernel.git/commit
power: supply: bq27xxx: report "not charging" on all types
authorKrzysztof Kozlowski <krzk@kernel.org>
Sat, 19 Sep 2020 14:04:14 +0000 (16:04 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Thu, 1 Oct 2020 22:01:42 +0000 (00:01 +0200)
commitea6f8e8b9e1ec938f78c0f47503879203de8b8d0
treeca4e91e5c287f3844106a3b3bef3dc281c67e3c1
parent1954fb8fd0c52e9a700a82f091fb6a81e7302d79
power: supply: bq27xxx: report "not charging" on all types

Commit c9d35bbe3e1c ("power: supply: bq27xxx_battery: Add the
BQ27Z561 Battery monitor") and commit 9e95cb532d3c ("power:
bq27xxx_battery: Add support for additional bq27xxx family devices")
added support for new device types by copying most of the code and
adding necessary quirks.

However they did not copy the code in bq27xxx_battery_status()
responsible for returning POWER_SUPPLY_STATUS_NOT_CHARGING.

Unify the bq27xxx_battery_status() so for all types when charger is
supplied, it will return "not charging" status.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/bq27xxx_battery.c