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

This commit is contained in:
Linux Build Service Account 2018-01-19 09:30:27 -08:00 committed by Gerrit - the friendly Code Review server
commit 188c08e1bf

View file

@ -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,
};