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

Commit 188c08e1 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 6b202df7 f8c4ccdc
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,
};