usb: typec: tcpm: move to SNK_UNATTACHED if sink removed for DRP
authorLi Jun <jun.li@nxp.com>
Wed, 19 Feb 2020 16:05:43 +0000 (00:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Mar 2020 09:51:21 +0000 (10:51 +0100)
commit67540460193bb5dc3841590bc76e1421d56dc173
tree36c9416cc269e8a71f181c074428c5964e0dd0b4
parent9cb9322a26ae84424c3e16e58617b3d8962fdbbb
usb: typec: tcpm: move to SNK_UNATTACHED if sink removed for DRP

Per typec spec:
Figure 4-15 Connection State Diagram: DRP
Figure 4-16 Connection State Diagram: DRP with Accessory and Try.SRC
    Support
Figure 4-17 Connection State Diagram: DRP with Accessory and Try.SNK
    Support
DRP port should move to Unattached.SNK instead of Unattached.SRC if
sink removed.

Signed-off-by: Li Jun <jun.li@nxp.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/1582128343-22438-1-git-send-email-jun.li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c