]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
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, 1 Aug 2025 08:47:31 +0000 (09:47 +0100)
commit457d02e71ae922440c26cecc42f307284f7daf04
tree43004adbc070a7160aee600eb6abd51d8abb059c
parent8f65f4565cabb373f9bfeba7b6860cdad6fc3698
usb: typec: tcpm: allow switching to mode accessory to mux properly

commit 8a50da849151e7e12b43c1d8fe7ad302223aef6b upstream.

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
Stable-dep-of: bec15191d523 ("usb: typec: tcpm: apply vbus before data bringup in tcpm_src_attach")
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c