]> git.baikalelectronics.ru Git - kernel.git/commit
usb: typec: ucsi: Wait for the USB role switches
authorLinyu Yuan <quic_linyyuan@quicinc.com>
Mon, 25 Apr 2022 10:18:06 +0000 (18:18 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Apr 2022 11:44:57 +0000 (13:44 +0200)
commit07ed3a84719065b8be463c420ba359353e38b84d
tree0adc6a5118c4780ab259b3ad13c921c327a54b27
parent42d51c349ca057f88d95f3a9b39012ab2e82fb6a
usb: typec: ucsi: Wait for the USB role switches

When role switch module probe late than ucsi module,
fwnode_usb_role_switch_get() will return -EPROBE_DEFER,
it is better to restart ucsi init work to find
it again every 100ms, total wait time is 10 second.

It also means change ucsi init work to delayed_work.

Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Signed-off-by: Linyu Yuan <quic_linyyuan@quicinc.com>
Link: https://lore.kernel.org/r/1650881886-25530-3-git-send-email-quic_linyyuan@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/ucsi/ucsi.c
drivers/usb/typec/ucsi/ucsi.h