From ee0a9f3c26d0f3519a6213bca84ac0154c6c7abc Mon Sep 17 00:00:00 2001 From: Bhupesh Sharma Date: Thu, 27 Oct 2022 14:21:05 +0530 Subject: [PATCH] android-tools-conf-configfs: Allow handling two or more UDC controllers Several Qualcomm platforms support setting two or more (or even all) UDC controllers in 'peripheral' mode. Modify the android-tools-conf-configfs scriptware to handle such cases. Signed-off-by: Bhupesh Sharma --- .../android-tools-conf-configfs/android-gadget-start | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start index b73cb70b14d..479f14ae7ef 100644 --- a/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start +++ b/meta-oe/recipes-devtools/android-tools/android-tools-conf-configfs/android-gadget-start @@ -4,4 +4,6 @@ set -e sleep 10 -ls /sys/class/udc/ | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC +ls /sys/class/udc/ | head -n 1 | xargs echo -n > /sys/kernel/config/usb_gadget/adb/UDC + +bbnote "Setting UDC $(ls /sys/class/udc/ | head -n 1) for USB ADB Gadget usage"