MLK-16013-17 usb: typec: tcpm: optimise cc toggling for drp port
authorLi Jun <jun.li@nxp.com>
Wed, 9 Jan 2019 05:41:51 +0000 (11:11 +0530)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
commit8e392f3d06f97f87e69da430ae320eb4b8fb4d52
tree10ff8d099b416620fa25ccf6c400dc7aebd2fc0d
parentcd70eb67287f9308fa573a3637ae32793edcfc54
MLK-16013-17 usb: typec: tcpm: optimise cc toggling for drp port

We should only enable drp auto toggling when unattached, so add one
more parameter; when attached, we set the cc line state according to
the other end cc status.

Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
drivers/usb/typec/tcpci.c
drivers/usb/typec/tcpm.c
include/linux/usb/tcpm.h