From 4487e89561252487608e227d7077cb2b2d79f37c Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sat, 5 Mar 2022 01:31:02 +0100 Subject: 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 --- recipes-support/libusbgx/files/usbg.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-support/libusbgx/files/usbg.service b/recipes-support/libusbgx/files/usbg.service index c9ed582..7808f5f 100644 --- a/recipes-support/libusbgx/files/usbg.service +++ b/recipes-support/libusbgx/files/usbg.service @@ -14,4 +14,4 @@ ExecStartPost=/bin/sh -c '/bin/echo `ls /sys/class/udc/` > \ /sys/kernel/config/usb_gadget/g1/UDC' [Install] -WantedBy=multi-user.target +WantedBy=usb-gadget.target -- cgit v1.2.3