mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Barebox List <barebox@lists.infradead.org>
Subject: [PATCH 03/18] usb: gadget: move files to place where Linux has them
Date: Mon, 20 Mar 2023 16:29:26 +0100	[thread overview]
Message-ID: <20230320152941.3155428-4-s.hauer@pengutronix.de> (raw)
In-Reply-To: <20230320152941.3155428-1-s.hauer@pengutronix.de>

For easier patch merging and comparison with Linux move the usb gadget
files to where Linux has them.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 drivers/usb/gadget/Makefile                        | 14 ++++----------
 drivers/usb/gadget/function/Makefile               |  6 ++++++
 drivers/usb/gadget/{ => function}/dfu.c            |  0
 drivers/usb/gadget/{ => function}/f_acm.c          |  0
 drivers/usb/gadget/{ => function}/f_fastboot.c     |  0
 drivers/usb/gadget/{ => function}/f_mass_storage.c |  0
 drivers/usb/gadget/{ => function}/f_serial.c       |  0
 drivers/usb/gadget/{ => function}/storage_common.c |  0
 drivers/usb/gadget/{ => function}/storage_common.h |  0
 drivers/usb/gadget/{ => function}/u_serial.c       |  0
 drivers/usb/gadget/{ => function}/u_serial.h       |  0
 drivers/usb/gadget/legacy/Makefile                 |  8 ++++++++
 drivers/usb/gadget/{ => legacy}/multi.c            |  0
 drivers/usb/gadget/{ => legacy}/serial.c           |  0
 drivers/usb/gadget/udc/Makefile                    |  8 ++++++++
 drivers/usb/gadget/{ => udc}/at91_udc.c            |  0
 drivers/usb/gadget/{ => udc}/at91_udc.h            |  0
 drivers/usb/gadget/{udc-core.c => udc/core.c}      |  0
 drivers/usb/gadget/{ => udc}/fsl_udc.c             |  0
 drivers/usb/gadget/{ => udc}/fsl_udc_pbl.c         |  0
 drivers/usb/gadget/{ => udc}/pxa27x_udc.c          |  0
 drivers/usb/gadget/{ => udc}/pxa27x_udc.h          |  0
 22 files changed, 26 insertions(+), 10 deletions(-)
 create mode 100644 drivers/usb/gadget/function/Makefile
 rename drivers/usb/gadget/{ => function}/dfu.c (100%)
 rename drivers/usb/gadget/{ => function}/f_acm.c (100%)
 rename drivers/usb/gadget/{ => function}/f_fastboot.c (100%)
 rename drivers/usb/gadget/{ => function}/f_mass_storage.c (100%)
 rename drivers/usb/gadget/{ => function}/f_serial.c (100%)
 rename drivers/usb/gadget/{ => function}/storage_common.c (100%)
 rename drivers/usb/gadget/{ => function}/storage_common.h (100%)
 rename drivers/usb/gadget/{ => function}/u_serial.c (100%)
 rename drivers/usb/gadget/{ => function}/u_serial.h (100%)
 create mode 100644 drivers/usb/gadget/legacy/Makefile
 rename drivers/usb/gadget/{ => legacy}/multi.c (100%)
 rename drivers/usb/gadget/{ => legacy}/serial.c (100%)
 create mode 100644 drivers/usb/gadget/udc/Makefile
 rename drivers/usb/gadget/{ => udc}/at91_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/at91_udc.h (100%)
 rename drivers/usb/gadget/{udc-core.c => udc/core.c} (100%)
 rename drivers/usb/gadget/{ => udc}/fsl_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/fsl_udc_pbl.c (100%)
 rename drivers/usb/gadget/{ => udc}/pxa27x_udc.c (100%)
 rename drivers/usb/gadget/{ => udc}/pxa27x_udc.h (100%)

diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile
index 36d71f9b8e..f45b23f22d 100644
--- a/drivers/usb/gadget/Makefile
+++ b/drivers/usb/gadget/Makefile
@@ -1,11 +1,5 @@
-# SPDX-License-Identifier: GPL-2.0-only
+# SPDX-License-Identifier: GPL-2.0
 
-obj-$(CONFIG_USB_GADGET) += composite.o config.o usbstring.o epautoconf.o udc-core.o functions.o config.o multi.o
-obj-$(CONFIG_USB_GADGET_SERIAL) += u_serial.o serial.o f_serial.o f_acm.o
-obj-$(CONFIG_USB_GADGET_DFU) += dfu.o
-obj-$(CONFIG_USB_GADGET_FASTBOOT) += f_fastboot.o
-obj-$(CONFIG_USB_GADGET_MASS_STORAGE) += f_mass_storage.o storage_common.o
-obj-$(CONFIG_USB_GADGET_DRIVER_ARC) += fsl_udc.o
-pbl-$(CONFIG_USB_GADGET_DRIVER_ARC_PBL) += fsl_udc_pbl.o
-obj-$(CONFIG_USB_GADGET_DRIVER_AT91) += at91_udc.o
-obj-$(CONFIG_USB_GADGET_DRIVER_PXA27X) += pxa27x_udc.o
+obj-$(CONFIG_USB_GADGET) += composite.o config.o usbstring.o epautoconf.o functions.o config.o
+
+obj-$(CONFIG_USB_GADGET) += udc/ function/ legacy/
diff --git a/drivers/usb/gadget/function/Makefile b/drivers/usb/gadget/function/Makefile
new file mode 100644
index 0000000000..de306b929f
--- /dev/null
+++ b/drivers/usb/gadget/function/Makefile
@@ -0,0 +1,6 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-$(CONFIG_USB_GADGET_SERIAL) += u_serial.o f_serial.o f_acm.o
+obj-$(CONFIG_USB_GADGET_DFU) += dfu.o
+obj-$(CONFIG_USB_GADGET_FASTBOOT) += f_fastboot.o
+obj-$(CONFIG_USB_GADGET_MASS_STORAGE) += f_mass_storage.o storage_common.o
diff --git a/drivers/usb/gadget/dfu.c b/drivers/usb/gadget/function/dfu.c
similarity index 100%
rename from drivers/usb/gadget/dfu.c
rename to drivers/usb/gadget/function/dfu.c
diff --git a/drivers/usb/gadget/f_acm.c b/drivers/usb/gadget/function/f_acm.c
similarity index 100%
rename from drivers/usb/gadget/f_acm.c
rename to drivers/usb/gadget/function/f_acm.c
diff --git a/drivers/usb/gadget/f_fastboot.c b/drivers/usb/gadget/function/f_fastboot.c
similarity index 100%
rename from drivers/usb/gadget/f_fastboot.c
rename to drivers/usb/gadget/function/f_fastboot.c
diff --git a/drivers/usb/gadget/f_mass_storage.c b/drivers/usb/gadget/function/f_mass_storage.c
similarity index 100%
rename from drivers/usb/gadget/f_mass_storage.c
rename to drivers/usb/gadget/function/f_mass_storage.c
diff --git a/drivers/usb/gadget/f_serial.c b/drivers/usb/gadget/function/f_serial.c
similarity index 100%
rename from drivers/usb/gadget/f_serial.c
rename to drivers/usb/gadget/function/f_serial.c
diff --git a/drivers/usb/gadget/storage_common.c b/drivers/usb/gadget/function/storage_common.c
similarity index 100%
rename from drivers/usb/gadget/storage_common.c
rename to drivers/usb/gadget/function/storage_common.c
diff --git a/drivers/usb/gadget/storage_common.h b/drivers/usb/gadget/function/storage_common.h
similarity index 100%
rename from drivers/usb/gadget/storage_common.h
rename to drivers/usb/gadget/function/storage_common.h
diff --git a/drivers/usb/gadget/u_serial.c b/drivers/usb/gadget/function/u_serial.c
similarity index 100%
rename from drivers/usb/gadget/u_serial.c
rename to drivers/usb/gadget/function/u_serial.c
diff --git a/drivers/usb/gadget/u_serial.h b/drivers/usb/gadget/function/u_serial.h
similarity index 100%
rename from drivers/usb/gadget/u_serial.h
rename to drivers/usb/gadget/function/u_serial.h
diff --git a/drivers/usb/gadget/legacy/Makefile b/drivers/usb/gadget/legacy/Makefile
new file mode 100644
index 0000000000..5d5382a673
--- /dev/null
+++ b/drivers/usb/gadget/legacy/Makefile
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
+
+ccflags-y := -I$(srctree)/drivers/usb/gadget/
+ccflags-y += -I$(srctree)/drivers/usb/gadget/udc/
+ccflags-y += -I$(srctree)/drivers/usb/gadget/function/
+
+obj-$(CONFIG_USB_GADGET_SERIAL) += serial.o
+obj-$(CONFIG_USB_GADGET) += multi.o
diff --git a/drivers/usb/gadget/multi.c b/drivers/usb/gadget/legacy/multi.c
similarity index 100%
rename from drivers/usb/gadget/multi.c
rename to drivers/usb/gadget/legacy/multi.c
diff --git a/drivers/usb/gadget/serial.c b/drivers/usb/gadget/legacy/serial.c
similarity index 100%
rename from drivers/usb/gadget/serial.c
rename to drivers/usb/gadget/legacy/serial.c
diff --git a/drivers/usb/gadget/udc/Makefile b/drivers/usb/gadget/udc/Makefile
new file mode 100644
index 0000000000..f52660fcf5
--- /dev/null
+++ b/drivers/usb/gadget/udc/Makefile
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0
+
+obj-$(CONFIG_USB_GADGET) += core.o
+
+obj-$(CONFIG_USB_GADGET_DRIVER_ARC) += fsl_udc.o
+pbl-$(CONFIG_USB_GADGET_DRIVER_ARC_PBL) += fsl_udc_pbl.o
+obj-$(CONFIG_USB_GADGET_DRIVER_AT91) += at91_udc.o
+obj-$(CONFIG_USB_GADGET_DRIVER_PXA27X) += pxa27x_udc.o
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/udc/at91_udc.c
similarity index 100%
rename from drivers/usb/gadget/at91_udc.c
rename to drivers/usb/gadget/udc/at91_udc.c
diff --git a/drivers/usb/gadget/at91_udc.h b/drivers/usb/gadget/udc/at91_udc.h
similarity index 100%
rename from drivers/usb/gadget/at91_udc.h
rename to drivers/usb/gadget/udc/at91_udc.h
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc/core.c
similarity index 100%
rename from drivers/usb/gadget/udc-core.c
rename to drivers/usb/gadget/udc/core.c
diff --git a/drivers/usb/gadget/fsl_udc.c b/drivers/usb/gadget/udc/fsl_udc.c
similarity index 100%
rename from drivers/usb/gadget/fsl_udc.c
rename to drivers/usb/gadget/udc/fsl_udc.c
diff --git a/drivers/usb/gadget/fsl_udc_pbl.c b/drivers/usb/gadget/udc/fsl_udc_pbl.c
similarity index 100%
rename from drivers/usb/gadget/fsl_udc_pbl.c
rename to drivers/usb/gadget/udc/fsl_udc_pbl.c
diff --git a/drivers/usb/gadget/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
similarity index 100%
rename from drivers/usb/gadget/pxa27x_udc.c
rename to drivers/usb/gadget/udc/pxa27x_udc.c
diff --git a/drivers/usb/gadget/pxa27x_udc.h b/drivers/usb/gadget/udc/pxa27x_udc.h
similarity index 100%
rename from drivers/usb/gadget/pxa27x_udc.h
rename to drivers/usb/gadget/udc/pxa27x_udc.h
-- 
2.30.2




  parent reply	other threads:[~2023-03-20 15:31 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-20 15:29 [PATCH 00/18] USB gadget overhaul Sascha Hauer
2023-03-20 15:29 ` [PATCH 01/18] usb: gadget: fastboot: Allocate IN requests when needed Sascha Hauer
2023-03-20 15:29 ` [PATCH 02/18] usb: gadget: drop gadget_chips.h Sascha Hauer
2023-03-20 15:29 ` Sascha Hauer [this message]
2023-03-20 15:29 ` [PATCH 04/18] usb: move include files to place where Linux has them Sascha Hauer
2023-03-20 15:29 ` [PATCH 05/18] usb: ch9: Update from Linux Kernel Sascha Hauer
2023-03-20 15:29 ` [PATCH 06/18] phy: Add mode setting support Sascha Hauer
2023-03-20 15:29 ` [PATCH 07/18] driver: Add unregister_driver() Sascha Hauer
2023-03-20 15:43   ` Ahmad Fatoum
2023-03-21  8:07     ` Sascha Hauer
2023-03-20 15:29 ` [PATCH 08/18] usb: gadget: Update core to Linux-6.3-rc2 Sascha Hauer
2023-03-20 15:29 ` [PATCH 09/18] uuid.h: sync with Linux-6.3-rc2 Sascha Hauer
2023-03-20 15:29 ` [PATCH 10/18] usb: gadget: Add super-speed-plus descriptors Sascha Hauer
2023-03-20 15:29 ` [PATCH 11/18] usb: gadget: update composite.c from Linux-6.3-rc2 Sascha Hauer
2023-03-20 15:29 ` [PATCH 12/18] Add dev_WARN_ONCE() Sascha Hauer
2023-03-20 15:29 ` [PATCH 13/18] usb: dwc3: sync with Linux-6.3-rc2 Sascha Hauer
2023-03-20 15:29 ` [PATCH 14/18] usb: gadget: dfu: Assign super speed descriptors Sascha Hauer
2023-03-20 15:29 ` [PATCH 15/18] usb: gadget: fastboot: Add " Sascha Hauer
2023-03-22  8:28   ` Johannes Zink
2023-03-20 15:29 ` [PATCH 16/18] usb: gadget: mass storage: " Sascha Hauer
2023-03-20 15:29 ` [PATCH 17/18] usb: gadget: u_serial: Put back to list if shutdown Sascha Hauer
2023-03-20 15:29 ` [PATCH 18/18] usb: gadget multi: support USB Super Speed Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230320152941.3155428-4-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox