usb: typec: tcpm: allow to use sink in accessory mode
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Thu, 3 Apr 2025 22:43:04 +0000 (00:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Apr 2025 14:08:32 +0000 (16:08 +0200)
commit64843d0ba96d3eae297025562111d57585273366
tree2370b774cd49039adb78e2289d8e3ae8a6df0157
parent0f7bbef1794dc87141897f804e5871a293aa174b
usb: typec: tcpm: allow to use sink in accessory mode

Since the function tcpm_acc_attach is not setting the data and role for
for the sink case we extend it to check for it first.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20250404-ml-topic-tcpm-v1-1-b99f44badce8@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c