diff mbox series

[meta-arago,scarthgap] udev-aragoconf: remove legacy usb rules

Message ID 20251118215640.249268-2-rs@ti.com
State Under Review
Delegated to: Ryan Eatmon
Headers show
Series [meta-arago,scarthgap] udev-aragoconf: remove legacy usb rules | expand

Commit Message

Randolph Sapp Nov. 18, 2025, 9:56 p.m. UTC
From: Randolph Sapp <rs@ti.com>

These rules do not match the current structure of the USB DEVPATH and
are not actually fired.

They were initially cited as being help scripts, but I think users
should attempt to gracefully bring down the gadget interface on their
own instead of relying on a script that will attempt to reload it post
mode change.

Signed-off-by: Randolph Sapp <rs@ti.com>
---
 .../recipes-core/udev/udev-aragoconf/50-arago.rules         | 2 --
 .../recipes-core/udev/udev-aragoconf/usb1-rules.sh          | 3 ---
 .../recipes-core/udev/udev-aragoconf/usb2-rules.sh          | 3 ---
 meta-arago-distro/recipes-core/udev/udev-aragoconf_1.bb     | 6 ------
 4 files changed, 14 deletions(-)
 delete mode 100755 meta-arago-distro/recipes-core/udev/udev-aragoconf/usb1-rules.sh
 delete mode 100755 meta-arago-distro/recipes-core/udev/udev-aragoconf/usb2-rules.sh

Comments

PRC Automation Nov. 18, 2025, 10:16 p.m. UTC | #1
meta-arago / na / 20251118215640.249268-2-rs

PRC Results: PASS

=========================================================
  check-yocto-patches: PASS
=========================================================
Patches
----------------------------------------
WARN - [meta-arago][scarthgap][PATCH] udev-aragoconf: remove legacy usb rules
    WARN: Commit message should not include directory path to recipe: udev-aragoconf: remove legacy usb rules.
              udev-aragoconf: (COMMIT-MESSAGE-3)
        patch
    
    For details on the above errors/warnings visit: https://lists.yoctoproject.org/g/meta-ti/wiki/40887



=========================================================
  apply-yocto-patch: PASS
=========================================================
scarthgap
=====================
Summary:
- Patch Series: [meta-arago][scarthgap][PATCH] udev-aragoconf: remove legacy usb rules
- Submitter: From: <rs@ti.com>
From: Randolph Sapp <rs@ti.com>
- Date: Date: Tue, 18 Nov 2025 15:56:41 -0600
- Num Patches: 1
- Mailing List (public inbox) Commit SHA: 82fcf6ba64f64ea949684a4f5e89df6c1dcbff36

Applied to:
- Repository: lcpd-prc-meta-arago
- Base Branch: scarthgap-wip
- Commit Author: Ryan Eatmon <reatmon@ti.com>
- Commit Subject: v4l-utils: Do the version bump in a yocto-check-layer compliant manner
- Commit SHA: 312752656aed73c1187d9d0cf5d246e5731965fe

Patches
----------------------------------------
All patches applied



=========================================================
  check-yocto-repo: PASS
=========================================================
scarthgap
=====================
PASS



=========================================================
  yocto-check-layers: PASS
=========================================================
scarthgap - PASS
=====================
All checks passed
Siddharth Vadapalli Nov. 19, 2025, 6:21 a.m. UTC | #2
On Tue, 2025-11-18 at 15:56 -0600, rs@ti.com wrote:
> From: Randolph Sapp <rs@ti.com>
> 
> These rules do not match the current structure of the USB DEVPATH and
> are not actually fired.
> 
> They were initially cited as being help scripts, but I think users
> should attempt to gracefully bring down the gadget interface on their
> own instead of relying on a script that will attempt to reload it post
> mode change.
> 
> Signed-off-by: Randolph Sapp <rs@ti.com>

Additionally, 'configfs' is used for configuring USB Gadget drivers using
the libcomposite driver. The Gadget Zero 'g_zero' and other USB Gadgets
should be enabled via 'configfs' as documented at:
https://docs.kernel.org/usb/gadget_configfs.html

Loading individual Gadget drivers via 'modprobe' is deprecated in favor of
the above.

Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>

Regards,
Siddharth.
Randolph Sapp Nov. 19, 2025, 7:57 p.m. UTC | #3
On Wed Nov 19, 2025 at 12:21 AM CST, Siddharth Vadapalli wrote:
> On Tue, 2025-11-18 at 15:56 -0600, rs@ti.com wrote:
>> From: Randolph Sapp <rs@ti.com>
>> 
>> These rules do not match the current structure of the USB DEVPATH and
>> are not actually fired.
>> 
>> They were initially cited as being help scripts, but I think users
>> should attempt to gracefully bring down the gadget interface on their
>> own instead of relying on a script that will attempt to reload it post
>> mode change.
>> 
>> Signed-off-by: Randolph Sapp <rs@ti.com>
>
> Additionally, 'configfs' is used for configuring USB Gadget drivers using
> the libcomposite driver. The Gadget Zero 'g_zero' and other USB Gadgets
> should be enabled via 'configfs' as documented at:
> https://docs.kernel.org/usb/gadget_configfs.html
>
> Loading individual Gadget drivers via 'modprobe' is deprecated in favor of
> the above.
>
> Reviewed-by: Siddharth Vadapalli <s-vadapalli@ti.com>
>
> Regards,
> Siddharth.

Thanks for the review Siddharth. Could you or someone familiar with the current
USB tooling update the documentation for the DWC3 [1]? I'm not sure if it was
never correctly imported from the processor wiki or what, but it appears there a
sections missing and the content present appears disjointed.

A lot of it can be reduced to links to the upstream DWC3 docs [2] and linked
gadget configfs. At the moment the only thing that even mentions gadget configfs
is the AM62_DWC3 document, and it only does so because of a kconfig code
snippet.

[1] https://github.com/TexasInstruments/processor-sdk-doc/blob/master/source/linux/Foundational_Components/Kernel/Kernel_Drivers/USB/DWC3.rst
[2] https://docs.kernel.org/driver-api/usb/dwc3.html
diff mbox series

Patch

diff --git a/meta-arago-distro/recipes-core/udev/udev-aragoconf/50-arago.rules b/meta-arago-distro/recipes-core/udev/udev-aragoconf/50-arago.rules
index 4829ca14..3ff14eb0 100644
--- a/meta-arago-distro/recipes-core/udev/udev-aragoconf/50-arago.rules
+++ b/meta-arago-distro/recipes-core/udev/udev-aragoconf/50-arago.rules
@@ -22,5 +22,3 @@  SUBSYSTEM=="input", KERNEL=="event[0-9]*", ENV{ID_INPUT_TOUCHSCREEN}=="1", SYMLI
 # Auto-mount any SD cards
 ACTION=="add", KERNEL=="mmcblk[0-9]p[0-9]", SUBSYSTEM=="block", RUN+="/etc/udev/scripts/mount.sh"
 ACTION=="remove", KERNEL=="mmcblk[0-9]p[0-9]", SUBSYSTEM=="block", RUN+="/etc/udev/scripts/mount.sh"
-ACTION=="add", DEVPATH=="/devices/44000000\.ocp/48880000\.omap_dwc3_1/48890000\.usb/udc*", RUN+="/etc/udev/scripts/usb1-rules.sh"
-ACTION=="add", DEVPATH=="/devices/44000000\.ocp/488c0000\.omap_dwc3_2/488d0000\.usb/udc*", RUN+="/etc/udev/scripts/usb2-rules.sh"
diff --git a/meta-arago-distro/recipes-core/udev/udev-aragoconf/usb1-rules.sh b/meta-arago-distro/recipes-core/udev/udev-aragoconf/usb1-rules.sh
deleted file mode 100755
index 51dfd71a..00000000
--- a/meta-arago-distro/recipes-core/udev/udev-aragoconf/usb1-rules.sh
+++ /dev/null
@@ -1,3 +0,0 @@ 
-#!bin/sh
-/sbin/modprobe g_ncm -r
-/sbin/modprobe g_ncm
diff --git a/meta-arago-distro/recipes-core/udev/udev-aragoconf/usb2-rules.sh b/meta-arago-distro/recipes-core/udev/udev-aragoconf/usb2-rules.sh
deleted file mode 100755
index f00565e4..00000000
--- a/meta-arago-distro/recipes-core/udev/udev-aragoconf/usb2-rules.sh
+++ /dev/null
@@ -1,3 +0,0 @@ 
-#!bin/sh
-/sbin/modprobe g_zero -r
-/sbin/modprobe g_zero
diff --git a/meta-arago-distro/recipes-core/udev/udev-aragoconf_1.bb b/meta-arago-distro/recipes-core/udev/udev-aragoconf_1.bb
index c1ffa663..49d00b54 100644
--- a/meta-arago-distro/recipes-core/udev/udev-aragoconf_1.bb
+++ b/meta-arago-distro/recipes-core/udev/udev-aragoconf_1.bb
@@ -5,8 +5,6 @@  LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384
 inherit bin_package
 
 SRC_URI = " \
-    file://usb1-rules.sh \
-    file://usb2-rules.sh \
     file://50-arago.rules \
     file://37-can-j7.rules \
     file://37-can-am62.rules \
@@ -17,10 +15,6 @@  SRC_URI = " \
 S = "${WORKDIR}"
 
 do_install() {
-    install -d ${D}${sysconfdir}/udev/scripts
-    install -m 0755 ${WORKDIR}/usb1-rules.sh ${D}${sysconfdir}/udev/scripts/usb1-rules.sh
-    install -m 0755 ${WORKDIR}/usb2-rules.sh ${D}${sysconfdir}/udev/scripts/usb2-rules.sh
-
     install -d ${D}${libdir}/udev/rules.d
     install -m 0644 ${WORKDIR}/50-arago.rules ${D}${libdir}/udev/rules.d/
     install -m 0644 ${WORKDIR}/37-can-j7.rules ${D}${libdir}/udev/rules.d/