]> git.ipfire.org Git - thirdparty/u-boot.git/commit
usb: udc-uclass: Fixed problem when no alias is defined in DT
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Thu, 24 Jan 2019 14:44:53 +0000 (15:44 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Mon, 1 Apr 2019 08:51:55 +0000 (10:51 +0200)
commitb43da3d470a4c9ea0c49cd7f253657304000840f
tree42a0fdc95de6020c0ba0f22269650561f6280774
parentfea5b86e04e47e21d6d5169e98782b7cbcb325d7
usb: udc-uclass: Fixed problem when no alias is defined in DT

commit 801f1fa442 "dm: usb: udc: Use SEQ_ALIAS to index the USB gadget
ports" changed the way the udevice if found. It uses the alias to find
a udevice for a given USB port number. In the commit log it was stated
that if no alias is provided, the bind order will be used instead. However
it doesn't work. Fixing this by adding a call to uclass_get_device() if
uclass_get_device_by_seq() fails.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Vignesh R <vigneshr@ti.com>
drivers/usb/gadget/udc/udc-uclass.c