usb: typec: tcpm: Handle vbus shutoff when in source mode
authorBadhri Jagan Sridharan <badhri@google.com>
Mon, 1 Feb 2021 10:02:12 +0000 (02:02 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 2 Feb 2021 15:14:28 +0000 (16:14 +0100)
commit7771bcc7f5a727d6e3f7a80b0b075a75cb664fb2
treeb30c27ae324a0de666b830376d21b8a8802a52e8
parent17aa02beecbcd35b28d37f5830d0531b01f672e3
usb: typec: tcpm: Handle vbus shutoff when in source mode

While in source mode, vbus could be shutoff by protections
circuits. TCPM does not move back to toggling state to
re-initiate connection. Fix this by moving to SRC_UNATTACHED
state when vbus shuts off while in source mode.

Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20210201100212.49863-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c