Skip to content

Commit 77c2a30

Browse files
jwrdegoedesre
authored andcommitted
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: 18f8e6f ("power: supply: bq24190_charger: Get input_current_limit from our supplier") Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
1 parent ad3d9c7 commit 77c2a30

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/power/supply/bq24190_charger.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,6 +1262,7 @@ static void bq24190_input_current_limit_work(struct work_struct *work)
12621262
bq24190_charger_set_property(bdi->charger,
12631263
POWER_SUPPLY_PROP_INPUT_CURRENT_LIMIT,
12641264
&val);
1265+
power_supply_changed(bdi->charger);
12651266
}
12661267

12671268
/* Sync the input-current-limit with our parent supply (if we have one) */

0 commit comments

Comments
 (0)