From e111f75c315a4db16349fb8c50c40a68c2bdda8b Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Tue, 9 May 2023 13:36:19 +0200 Subject: [PATCH] libusbgx: fix device hot-plug use case Upon hot-plugging device (resp. un-plugging host) dwc3_gadget_init() does nicely get executed. However, for an actual gadget to get started, it also requires the libusbgx dance as well. Instead of only doing this upon boot aka after multi-user.target (which is fine only if the device is already there at boot), execute it after usb-gadget.target. This ensures dwc3_gadget_start() gets executed also during hot-plugging. Signed-off-by: Marcel Ziswiler Signed-off-by: Ming Liu Signed-off-by: Khem Raj --- meta-oe/recipes-support/libusbgx/libusbgx/usbgx.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta-oe/recipes-support/libusbgx/libusbgx/usbgx.service b/meta-oe/recipes-support/libusbgx/libusbgx/usbgx.service index 74541d3c2d..e2aa95a521 100644 --- a/meta-oe/recipes-support/libusbgx/libusbgx/usbgx.service +++ b/meta-oe/recipes-support/libusbgx/libusbgx/usbgx.service @@ -6,4 +6,4 @@ Type=oneshot ExecStart=/usr/bin/gadget-start [Install] -WantedBy=multi-user.target +WantedBy=usb-gadget.target