linux-yocto/drivers/usb/typec
Arnaud Ferraris bd4e976745 tcpm: allow looking for role_sw device in the main node
commit 1366cd228b0c67b60a2c0c26ef37fe9f7cfedb7f upstream.

If ports are defined in the tcpc main node, fwnode_usb_role_switch_get()
returns an error, meaning usb_role_switch_get() (which would succeed)
never gets a chance to run as port->role_sw isn't NULL, causing a
regression on devices where this is the case.

Fix this by turning the NULL check into IS_ERR_OR_NULL(), so
usb_role_switch_get() can actually run and the device get properly probed.

Fixes: 2d8713f807 ("tcpm: switch check for role_sw device with fw_node")
Cc: stable <stable@kernel.org>
Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Signed-off-by: Arnaud Ferraris <arnaud.ferraris@collabora.com>
Link: https://patch.msgid.link/20260105-fix-ppp-power-v2-1-6924f5a41224@collabora.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-01-23 11:21:28 +01:00
..
altmodes usb: typec: altmodes/displayport: Drop the device reference in dp_altmode_probe() 2026-01-02 12:57:13 +01:00
mux usb: typec: mux: Remove the use of dev_err_probe() 2025-08-21 08:09:09 +02:00
tcpm tcpm: allow looking for role_sw device in the main node 2026-01-23 11:21:28 +01:00
tipd usb: typec: tipd: Handle mode transitions for CD321x 2025-09-14 16:08:21 +02:00
ucsi usb: typec: ucsi: huawei-gaokin: add DRM dependency 2026-01-02 12:57:13 +01:00
anx7411.c usb: typec: anx7411: fix OF node reference leaks in anx7411_typec_switch_probe() 2024-12-04 16:25:54 +01:00
bus.c USB: typec: fix const issue in typec_match() 2025-05-23 12:36:40 +02:00
bus.h USB: mark all struct bus_type as const 2023-03-23 13:22:00 +01:00
class.c usb: typec: class: Unlocked on error in typec_register_partner() 2025-04-15 14:31:58 +02:00
class.h usb: typec: class: Fix NULL pointer access 2025-04-11 14:57:36 +02:00
hd3ss3220.c usb: typec: hd3ss3220: support configuring role preference based on fwnode property and typec_operation 2024-12-24 08:56:04 +01:00
Kconfig usb: typec: qcom: Add Qualcomm PMIC Type-C driver 2023-05-13 19:03:46 +09:00
Makefile usb: typec: qcom: Add Qualcomm PMIC Type-C driver 2023-05-13 19:03:46 +09:00
mux.c usb: typec: mux: do not return on EOPNOTSUPP in {mux, switch}_set 2025-04-11 16:08:32 +02:00
mux.h
pd.c usb: typec: constify the struct device_type usage 2024-02-19 09:35:46 +01:00
pd.h
port-mapper.c usb: typec: Connect Type-C port with associated USB4 port 2025-04-17 12:21:45 +03:00
retimer.c usb: typec: constify struct class usage 2024-03-02 20:21:06 +01:00
retimer.h
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