From: Marcel Ziswiler <marcel.ziswi...@toradex.com>

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 <marcel.ziswi...@toradex.com>
Signed-off-by: Ming Liu <liu.min...@gmail.com>
---
 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 74541d3c2..e2aa95a52 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
-- 
2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#102491): 
https://lists.openembedded.org/g/openembedded-devel/message/102491
Mute This Topic: https://lists.openembedded.org/mt/98779096/21656
Group Owner: openembedded-devel+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to