mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
usb: typec: husb311: set vbus off when shutdown
vbus-on will trigger pmic restart when system shutdown. Signed-off-by: Jake Wu <jake.wu@rock-chips.com> Change-Id: I49a610f6a24c6d0ffc33a5bef7dc909f738f1f12
This commit is contained in:
@@ -309,6 +309,16 @@ static void husb311_remove(struct i2c_client *client)
|
||||
tcpci_unregister_port(chip->tcpci);
|
||||
}
|
||||
|
||||
static void husb311_shutdown(struct i2c_client *client)
|
||||
{
|
||||
struct husb311_chip *chip = i2c_get_clientdata(client);
|
||||
|
||||
husb311_set_vbus(chip->tcpci, &chip->data, false, false);
|
||||
|
||||
cancel_delayed_work_sync(&chip->pm_work);
|
||||
tcpci_unregister_port(chip->tcpci);
|
||||
}
|
||||
|
||||
static int husb311_pm_suspend(struct device *dev)
|
||||
{
|
||||
struct husb311_chip *chip = dev->driver_data;
|
||||
@@ -388,6 +398,7 @@ static struct i2c_driver husb311_i2c_driver = {
|
||||
},
|
||||
.probe = husb311_probe,
|
||||
.remove = husb311_remove,
|
||||
.shutdown = husb311_shutdown,
|
||||
.id_table = husb311_id,
|
||||
};
|
||||
module_i2c_driver(husb311_i2c_driver);
|
||||
|
||||
Reference in New Issue
Block a user