All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH - USB DRD] udev: Add rules for DRD usecase
@ 2015-02-13 10:30 Karthik Ramanan
  2015-02-24 21:13 ` Denys Dmytriyenko
  0 siblings, 1 reply; 2+ messages in thread
From: Karthik Ramanan @ 2015-02-13 10:30 UTC (permalink / raw)
  To: meta-arago

For the DRD usecase when switching from host to device mode
some commands have to be executed manually. These script
additions facilatate this to happen automatically.

Signed-off-by: Karthik Ramanan <a0393906@ti.com>
---
 .../recipes-core/udev/udev/local.rules             |    2 ++
 .../recipes-core/udev/udev/usb1-rules.sh           |    4 ++++
 .../recipes-core/udev/udev/usb2-rules.sh           |    4 ++++
 .../recipes-core/udev/udev_182.bbappend            |   14 +++++++++++++-
 4 files changed, 23 insertions(+), 1 deletion(-)
 create mode 100755 meta-arago-distro/recipes-core/udev/udev/usb1-rules.sh
 create mode 100755 meta-arago-distro/recipes-core/udev/udev/usb2-rules.sh

diff --git a/meta-arago-distro/recipes-core/udev/udev/local.rules b/meta-arago-distro/recipes-core/udev/udev/local.rules
index 45c3a46..689e093 100644
--- a/meta-arago-distro/recipes-core/udev/udev/local.rules
+++ b/meta-arago-distro/recipes-core/udev/udev/local.rules
@@ -22,3 +22,5 @@ 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+="/usr/bin/usb1-rules.sh"
+ACTION=="add", DEVPATH=="/devices/44000000\.ocp/488c0000\.omap_dwc3_2/488d0000\.usb/udc*", RUN+="/usr/bin/usb2-rules.sh"
diff --git a/meta-arago-distro/recipes-core/udev/udev/usb1-rules.sh b/meta-arago-distro/recipes-core/udev/udev/usb1-rules.sh
new file mode 100755
index 0000000..8a49cf1
--- /dev/null
+++ b/meta-arago-distro/recipes-core/udev/udev/usb1-rules.sh
@@ -0,0 +1,4 @@
+#!bin/sh
+/sbin/modprobe g_ncm -r
+/sbin/modprobe g_ncm
+
diff --git a/meta-arago-distro/recipes-core/udev/udev/usb2-rules.sh b/meta-arago-distro/recipes-core/udev/udev/usb2-rules.sh
new file mode 100755
index 0000000..38a8894
--- /dev/null
+++ b/meta-arago-distro/recipes-core/udev/udev/usb2-rules.sh
@@ -0,0 +1,4 @@
+#!bin/sh
+/sbin/modprobe g_zero -r
+/sbin/modprobe g_zero
+
diff --git a/meta-arago-distro/recipes-core/udev/udev_182.bbappend b/meta-arago-distro/recipes-core/udev/udev_182.bbappend
index 838cce8..684f501 100644
--- a/meta-arago-distro/recipes-core/udev/udev_182.bbappend
+++ b/meta-arago-distro/recipes-core/udev/udev_182.bbappend
@@ -5,4 +5,16 @@
 # look for files in this layer first
 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
 
-PR_append = "-arago2"
+PR_append = "-arago3"
+
+SRC_URI_append = " \
+                  file://usb1-rules.sh \
+                  file://usb2-rules.sh"
+
+do_install_append() {
+    install -d ${D}/${bindir}
+
+    install -m 0755 ${WORKDIR}/usb1-rules.sh ${D}${bindir}/usb1-rules.sh
+    install -m 0755 ${WORKDIR}/usb2-rules.sh ${D}${bindir}/usb2-rules.sh
+}
+
-- 
1.7.9.5



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [RFC PATCH - USB DRD] udev: Add rules for DRD usecase
  2015-02-13 10:30 [RFC PATCH - USB DRD] udev: Add rules for DRD usecase Karthik Ramanan
@ 2015-02-24 21:13 ` Denys Dmytriyenko
  0 siblings, 0 replies; 2+ messages in thread
From: Denys Dmytriyenko @ 2015-02-24 21:13 UTC (permalink / raw)
  To: Karthik Ramanan; +Cc: meta-arago

On Fri, Feb 13, 2015 at 04:00:36PM +0530, Karthik Ramanan wrote:
> For the DRD usecase when switching from host to device mode
> some commands have to be executed manually. These script
> additions facilatate this to happen automatically.

The patch seems fine, but why do you add an extra line at the end of every 
file?


> Signed-off-by: Karthik Ramanan <a0393906@ti.com>
> ---
>  .../recipes-core/udev/udev/local.rules             |    2 ++
>  .../recipes-core/udev/udev/usb1-rules.sh           |    4 ++++
>  .../recipes-core/udev/udev/usb2-rules.sh           |    4 ++++
>  .../recipes-core/udev/udev_182.bbappend            |   14 +++++++++++++-
>  4 files changed, 23 insertions(+), 1 deletion(-)
>  create mode 100755 meta-arago-distro/recipes-core/udev/udev/usb1-rules.sh
>  create mode 100755 meta-arago-distro/recipes-core/udev/udev/usb2-rules.sh
> 
> diff --git a/meta-arago-distro/recipes-core/udev/udev/local.rules b/meta-arago-distro/recipes-core/udev/udev/local.rules
> index 45c3a46..689e093 100644
> --- a/meta-arago-distro/recipes-core/udev/udev/local.rules
> +++ b/meta-arago-distro/recipes-core/udev/udev/local.rules
> @@ -22,3 +22,5 @@ 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+="/usr/bin/usb1-rules.sh"
> +ACTION=="add", DEVPATH=="/devices/44000000\.ocp/488c0000\.omap_dwc3_2/488d0000\.usb/udc*", RUN+="/usr/bin/usb2-rules.sh"
> diff --git a/meta-arago-distro/recipes-core/udev/udev/usb1-rules.sh b/meta-arago-distro/recipes-core/udev/udev/usb1-rules.sh
> new file mode 100755
> index 0000000..8a49cf1
> --- /dev/null
> +++ b/meta-arago-distro/recipes-core/udev/udev/usb1-rules.sh
> @@ -0,0 +1,4 @@
> +#!bin/sh
> +/sbin/modprobe g_ncm -r
> +/sbin/modprobe g_ncm
> +
> diff --git a/meta-arago-distro/recipes-core/udev/udev/usb2-rules.sh b/meta-arago-distro/recipes-core/udev/udev/usb2-rules.sh
> new file mode 100755
> index 0000000..38a8894
> --- /dev/null
> +++ b/meta-arago-distro/recipes-core/udev/udev/usb2-rules.sh
> @@ -0,0 +1,4 @@
> +#!bin/sh
> +/sbin/modprobe g_zero -r
> +/sbin/modprobe g_zero
> +
> diff --git a/meta-arago-distro/recipes-core/udev/udev_182.bbappend b/meta-arago-distro/recipes-core/udev/udev_182.bbappend
> index 838cce8..684f501 100644
> --- a/meta-arago-distro/recipes-core/udev/udev_182.bbappend
> +++ b/meta-arago-distro/recipes-core/udev/udev_182.bbappend
> @@ -5,4 +5,16 @@
>  # look for files in this layer first
>  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>  
> -PR_append = "-arago2"
> +PR_append = "-arago3"
> +
> +SRC_URI_append = " \
> +                  file://usb1-rules.sh \
> +                  file://usb2-rules.sh"
> +
> +do_install_append() {
> +    install -d ${D}/${bindir}
> +
> +    install -m 0755 ${WORKDIR}/usb1-rules.sh ${D}${bindir}/usb1-rules.sh
> +    install -m 0755 ${WORKDIR}/usb2-rules.sh ${D}${bindir}/usb2-rules.sh
> +}
> +
> -- 
> 1.7.9.5
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-24 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-13 10:30 [RFC PATCH - USB DRD] udev: Add rules for DRD usecase Karthik Ramanan
2015-02-24 21:13 ` Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.