linux/drivers/usb/typec
Xu Yang 6b275bfaa1 Revert "tcpm: allow looking for role_sw device in the main node"
This reverts commit 1366cd228b.

The fwnode_usb_role_switch_get() returns NULL only if no connection is
found, returns ERR_PTR(-EPROBE_DEFER) if connection is found but deferred
probe is needed, or a valid pointer of usb_role_switch.

When switching from a NULL check to IS_ERR_OR_NULL(), usb_role_switch_get()
returns NULL and overwrites the ERR_PTR(-EPROBE_DEFER) returned by
fwnode_usb_role_switch_get(). This causes the deferred probe indication to
be lost, preventing the USB role switch from ever being retrieved.

Fixes: 1366cd228b ("tcpm: allow looking for role_sw device in the main node")
Cc: stable <stable@kernel.org>
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Tested-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://patch.msgid.link/20260309074313.2809867-2-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-03-11 16:22:18 +01:00
..
altmodes usb: typec: altmode/displayport: set displayport signaling rate in configure message 2026-03-11 16:20:57 +01:00
mux usb: typec: ps883x: Fix missing mutex_unlock() 2025-10-23 10:42:27 +02:00
tcpm Revert "tcpm: allow looking for role_sw device in the main node" 2026-03-11 16:22:18 +01:00
tipd usb: typec: tipd: mark as orientation aware 2025-11-21 15:10:58 +01:00
ucsi Convert more 'alloc_obj' cases to default GFP_KERNEL arguments 2026-02-21 20:03:00 -08:00
Kconfig usb: typec: qcom: Add Qualcomm PMIC Type-C driver 2023-05-13 19:03:46 +09:00
Makefile usb: typec: Implement mode selection 2026-01-23 17:18:01 +01:00
anx7411.c usb: typec: anx7411: add WQ_PERCPU to alloc_workqueue users 2025-11-21 15:17:36 +01:00
bus.c usb: typec: Export typec bus and typec altmode device type 2025-12-17 14:42:34 +01:00
bus.h usb: typec: Export typec bus and typec altmode device type 2025-12-17 14:42:34 +01:00
class.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
class.h usb: typec: Implement mode selection 2026-01-23 17:18:01 +01:00
hd3ss3220.c usb: typec: hd3ss3220: Check if regulator needs to be switched 2026-02-06 11:23:50 +01:00
mode_selection.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mux.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
mux.h usb: typec: mux: Introduce indirection 2022-04-26 13:47:13 +02:00
pd.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
pd.h usb: typec: Separate USB Power Delivery from USB Type-C 2022-06-12 06:49:47 +02:00
port-mapper.c usb: typec: Connect Type-C port with associated USB4 port 2025-04-17 12:21:45 +03:00
retimer.c Convert 'alloc_obj' family to use the new default GFP_KERNEL argument 2026-02-21 17:09:51 -08:00
retimer.h usb: typec: Make bus switch code retimer-aware 2023-01-17 17:29:00 +01:00
rt1719.c power: supply: Change usb_types from an array into a bitmask 2024-09-03 23:20:28 +02:00
stusb160x.c usb: typec: stusb160x: Make use of i2c_get_match_data() 2024-10-04 15:12:15 +02:00
wusb3801.c usb: Switch i2c drivers back to use .probe() 2023-05-29 15:53:11 +01:00