usb: typec: tcpm: allow switching to mode accessory to mux properly
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Thu, 3 Apr 2025 22:43:06 +0000 (00:43 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Apr 2025 14:08:32 +0000 (16:08 +0200)
commit8a50da849151e7e12b43c1d8fe7ad302223aef6b
tree7fabb053cecd6cf3bc0fc397faf6b7ac895f189c
parent8db73e6a42b6f047c7ad50a7b98b862d19ea0056
usb: typec: tcpm: allow switching to mode accessory to mux properly

The funciton tcpm_acc_attach is not setting the proper state when
calling tcpm_set_role. The function tcpm_set_role is currently only
handling TYPEC_STATE_USB. For the tcpm_acc_attach to switch into other
modal states tcpm_set_role needs to be extended by an extra state
parameter. This patch is handling the proper state change when calling
tcpm_acc_attach.

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-3-b99f44badce8@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c