Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85cb36d0 authored by Umang Agrawal's avatar Umang Agrawal Committed by Guru Das Srinagesh
Browse files

power: step-chg-jeita: Add notification on changing FCC



Call power supply changed to notify the clients that
the FCC value has been changed according to JEITA conditions.

CRs-Fixed: 2200348
Change-Id: I33bc5d7bd1bae6a348a5c8ba46adb1e596d3d46a
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
Signed-off-by: default avatarGuru Das Srinagesh <gurus@codeaurora.org>
parent 4f5a0984
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -77,6 +77,7 @@ struct step_chg_info {
	struct power_supply	*batt_psy;
	struct power_supply	*bms_psy;
	struct power_supply	*usb_psy;
	struct power_supply	*main_psy;
	struct delayed_work	status_change_work;
	struct delayed_work	get_config_work;
	struct notifier_block	nb;
@@ -598,6 +599,12 @@ static int handle_jeita(struct step_chg_info *chip)

update_time:
	chip->jeita_last_update_time = ktime_get();

	if (!chip->main_psy)
		chip->main_psy = power_supply_get_by_name("main");
	if (chip->main_psy)
		power_supply_changed(chip->main_psy);

	return 0;

reschedule: