linux/drivers/usb/typec
Amelie Delaunay 647e26b03e usb: typec: stusb160x: register role switch before interrupt registration
commit 86762ad4ab upstream.

During interrupt registration, attach state is checked. If attached,
then the Type-C state is updated with typec_set_xxx functions and role
switch is set with usb_role_switch_set_role().

If the usb_role_switch parameter is error or null, the function simply
returns 0.

So, to update usb_role_switch role if a device is attached before the
irq is registered, usb_role_switch must be registered before irq
registration.

Fixes: da0cb63100 ("usb: typec: add support for STUSB160x Type-C controller family")
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com>
Link: https://lore.kernel.org/r/20210716120718.20398-2-amelie.delaunay@foss.st.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2021-07-28 14:35:44 +02:00
..
altmodes usb: typec: Fix copy paste error for NVIDIA alt-mode description 2021-01-19 18:27:27 +01:00
mux usb: typec: intel_pmc_mux: Add missed error check for devm_ioremap_resource() 2021-06-16 12:01:42 +02:00
tcpm usb: typec: tcpm: cancel frs hrtimer when unregister tcpm port 2021-06-16 12:01:43 +02:00
ucsi usb: typec: ucsi: Clear PPM capability data in ucsi_init() error path 2021-06-16 12:01:42 +02:00
bus.c usb: typec: altmode: Fix typec_altmode_get_partner sometimes returning an invalid pointer 2020-04-22 19:23:19 +02:00
bus.h usb: typec: altmode: Remove the notification chain 2020-02-12 10:51:21 -08:00
class.c usb: typec: Add the missed altmode_id_remove() in typec_register_altmode() 2021-07-14 16:55:38 +02:00
hd3ss3220.c usb: typec: hd3ss3220: Use OF graph API to get the connector fwnode 2020-10-02 15:28:18 +02:00
Kconfig usb: typec: qcom-pmic-typec: fix builtin build errors 2020-11-16 09:58:47 +01:00
Makefile usb: typec: Add QCOM PMIC typec detection driver 2020-10-09 15:14:43 +02:00
mux.c usb: typec: mux: Fix copy-paste mistake in typec_mux_match 2021-06-16 12:01:44 +02:00
qcom-pmic-typec.c usb: typec: Add QCOM PMIC typec detection driver 2020-10-09 15:14:43 +02:00
stusb160x.c usb: typec: stusb160x: register role switch before interrupt registration 2021-07-28 14:35:44 +02:00
tps6598x.c usb: typec: tps6598x: Fix return value check in tps6598x_probe() 2021-05-14 09:50:09 +02:00