]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: typec: mux: do not return on EOPNOTSUPP in {mux, switch}_set
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Thu, 3 Apr 2025 22:21:01 +0000 (00:21 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 6 Jul 2025 08:57:56 +0000 (10:57 +0200)
commita84dbb470a9d00165f5ca2887ff62f870d55b45a
treee7a45f3d823ac88120dba508dc1844f80bd87619
parent8e8a69b1f8c59f0505f8a1c0fb77191f27b75011
usb: typec: mux: do not return on EOPNOTSUPP in {mux, switch}_set

[ Upstream commit 0f7bbef1794dc87141897f804e5871a293aa174b ]

Since the typec connectors can have many muxes or switches for different
lanes (sbu, usb2, usb3) going into different modal states (usb2, usb3,
audio, debug) all of them will be called on typec_switch_set and
typec_mux_set. But not all of them will be handling the expected mode.

If one of the mux or switch will come back with EOPTNOSUPP this is no
reason to stop running through the next ones. Therefor we skip this
particular error value and continue calling the next.

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-typec-mux-v1-1-22c0526381ba@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/typec/mux.c