]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: typec: tcpm: Fix up PR_SWAP when vsafe0v is signalled
authorBadhri Jagan Sridharan <badhri@google.com>
Mon, 17 May 2021 19:21:09 +0000 (12:21 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 14 Jul 2021 15:00:13 +0000 (17:00 +0200)
commitd593d96b50a0f21783c91ed124fa7dce650712e6
treeb81c31ddad424dce2a5d9b448fd52f2e47ee8a9e
parent89d560f1520cf7a510ac825303b1b04e20fbe73b
usb: typec: tcpm: Fix up PR_SWAP when vsafe0v is signalled

[ Upstream commit d112efbe6dbf7d4c482e2a3f381fa315aabfe63b ]

During PR_SWAP, When TCPM is in PR_SWAP_SNK_SRC_SINK_OFF, vbus is
expected to reach VSAFE0V when source turns off vbus. Do not move
to SNK_UNATTACHED state when this happens.

Fixes: 28b43d3d746b ("usb: typec: tcpm: Introduce vsafe0v for vbus")
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20210517192112.40934-1-badhri@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/typec/tcpm/tcpm.c