usb: typec: tcpm: Create legacy PDOs for PD2 connection
authorKyle Tso <kyletso@google.com>
Fri, 15 Jan 2021 16:33:11 +0000 (00:33 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 25 Jan 2021 10:33:59 +0000 (11:33 +0100)
commitf75a1025c0b94d58de56c9421104ed6e987ddcd2
tree4b704381a0a8c8a651215691327f6a8bf431667b
parent1d6a81519d9d27b99bca638d14eca63c31111afd
usb: typec: tcpm: Create legacy PDOs for PD2 connection

If the port partner is PD2, the PDOs of the local port should follow the
format defined in PD2 Spec. Dynamically modify the pre-defined PD3 PDOs
and transform them into PD2 format before sending them to the PD2 port
partner.

Reviewed-by: Guenter Roeck <linux@roeckus.net>
Signed-off-by: Kyle Tso <kyletso@google.com>
Link: https://lore.kernel.org/r/20210115163311.391332-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c
include/linux/usb/pd.h