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

Commit f8c4ccdc authored by Umang Agrawal's avatar Umang Agrawal
Browse files

power: smb1351-charger: Disable parallel charging in shutdown path



Add parallel charger disabling logic to the shutdown path for
disabling parallel charger earlier to prevent over volatge
lockout issues.

Change-Id: I2f6838780f35b0a86baaa663d320316e51e38675
Signed-off-by: default avatarUmang Agrawal <uagrawal@codeaurora.org>
parent 55cc722e
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -3264,6 +3264,14 @@ static int smb1351_charger_remove(struct i2c_client *client)
	return 0;
}

static void smb1351_charger_shutdown(struct i2c_client *client)
{
	struct smb1351_charger *chip = i2c_get_clientdata(client);

	if (chip->chg_present)
		smb1351_usb_suspend(chip, USER, true);
}

static int smb1351_suspend(struct device *dev)
{
	struct i2c_client *client = to_i2c_client(dev);
@@ -3343,6 +3351,7 @@ static struct i2c_driver smb1351_charger_driver = {
	},
	.probe		= smb1351_charger_probe,
	.remove		= smb1351_charger_remove,
	.shutdown	= smb1351_charger_shutdown,
	.id_table	= smb1351_charger_id,
};