diff options
author | Hans de Goede <hdegoede@redhat.com> | 2023-04-15 20:23:41 +0200 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2023-05-08 15:29:12 +0200 |
commit | 77c2a3097d7029441e8a91aa0de1b4e5464593da (patch) | |
tree | 490b67a2429a67298ce53a17e354d3c33ff38278 /drivers/power/supply/power_supply_core.c | |
parent | ad3d9c779b1f09f3f3a6fefd07af407c7bc7c9a7 (diff) |
power: supply: bq24190: Call power_supply_changed() after updating input current
The bq24192 model relies on external charger-type detection and once
that is done the bq24190_charger code will update the input current.
In this case, when the initial power_supply_changed() call is made
from the interrupt handler, the input settings are 5V/0.5A which
on many devices is not enough power to charge (while the device is on).
On many devices the fuel-gauge relies in its external_power_changed
callback to timely signal userspace about charging <-> discharging
status changes. Add a power_supply_changed() call after updating
the input current. This allows the fuel-gauge driver to timely recheck
if the battery is charging after the new input current has been applied
and then it can immediately notify userspace about this.
Fixes: 18f8e6f695ac ("power: supply: bq24190_charger: Get input_current_limit from our supplier")
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/supply/power_supply_core.c')
0 files changed, 0 insertions, 0 deletions