From 00a2430ff07d4e0e0e7e24e02fd8adede333b797 Mon Sep 17 00:00:00 2001 From: Andrzej Pietrasiewicz Date: Tue, 15 Jul 2014 13:09:46 +0200 Subject: [PATCH] usb: gadget: Gadget directory cleanup - group usb functions The drivers/usb/gadget directory contains many files. Files which are related can be distributed into separate directories. This patch moves the USB functions implementations into a separate directory. Signed-off-by: Andrzej Pietrasiewicz Signed-off-by: Felipe Balbi --- drivers/usb/gadget/Makefile | 30 +--------------- drivers/usb/gadget/function/Makefile | 34 +++++++++++++++++++ drivers/usb/gadget/{ => function}/f_acm.c | 0 drivers/usb/gadget/{ => function}/f_ecm.c | 0 drivers/usb/gadget/{ => function}/f_eem.c | 0 drivers/usb/gadget/{ => function}/f_fs.c | 0 drivers/usb/gadget/{ => function}/f_hid.c | 0 .../usb/gadget/{ => function}/f_loopback.c | 0 .../gadget/{ => function}/f_mass_storage.c | 0 .../gadget/{ => function}/f_mass_storage.h | 0 drivers/usb/gadget/{ => function}/f_midi.c | 0 drivers/usb/gadget/{ => function}/f_ncm.c | 0 drivers/usb/gadget/{ => function}/f_obex.c | 0 drivers/usb/gadget/{ => function}/f_phonet.c | 0 drivers/usb/gadget/{ => function}/f_rndis.c | 0 drivers/usb/gadget/{ => function}/f_serial.c | 0 .../usb/gadget/{ => function}/f_sourcesink.c | 0 drivers/usb/gadget/{ => function}/f_subset.c | 0 drivers/usb/gadget/{ => function}/f_uac1.c | 0 drivers/usb/gadget/{ => function}/f_uac2.c | 0 drivers/usb/gadget/{ => function}/f_uvc.c | 0 drivers/usb/gadget/{ => function}/f_uvc.h | 0 drivers/usb/gadget/{ => function}/g_zero.h | 0 drivers/usb/gadget/{ => function}/ndis.h | 0 drivers/usb/gadget/{ => function}/rndis.c | 0 drivers/usb/gadget/{ => function}/rndis.h | 0 .../gadget/{ => function}/storage_common.c | 0 .../gadget/{ => function}/storage_common.h | 0 drivers/usb/gadget/{ => function}/u_ecm.h | 0 drivers/usb/gadget/{ => function}/u_eem.h | 0 drivers/usb/gadget/{ => function}/u_ether.c | 0 drivers/usb/gadget/{ => function}/u_ether.h | 0 .../gadget/{ => function}/u_ether_configfs.h | 0 drivers/usb/gadget/{ => function}/u_fs.h | 0 drivers/usb/gadget/{ => function}/u_gether.h | 0 drivers/usb/gadget/{ => function}/u_ncm.h | 0 drivers/usb/gadget/{ => function}/u_phonet.h | 0 drivers/usb/gadget/{ => function}/u_rndis.h | 0 drivers/usb/gadget/{ => function}/u_serial.c | 0 drivers/usb/gadget/{ => function}/u_serial.h | 0 drivers/usb/gadget/{ => function}/u_uac1.c | 0 drivers/usb/gadget/{ => function}/u_uac1.h | 0 drivers/usb/gadget/{ => function}/uvc.h | 0 drivers/usb/gadget/{ => function}/uvc_queue.c | 0 drivers/usb/gadget/{ => function}/uvc_queue.h | 0 drivers/usb/gadget/{ => function}/uvc_v4l2.c | 0 drivers/usb/gadget/{ => function}/uvc_video.c | 0 drivers/usb/gadget/legacy/Makefile | 1 + 48 files changed, 36 insertions(+), 29 deletions(-) create mode 100644 drivers/usb/gadget/function/Makefile rename drivers/usb/gadget/{ => function}/f_acm.c (100%) rename drivers/usb/gadget/{ => function}/f_ecm.c (100%) rename drivers/usb/gadget/{ => function}/f_eem.c (100%) rename drivers/usb/gadget/{ => function}/f_fs.c (100%) rename drivers/usb/gadget/{ => function}/f_hid.c (100%) rename drivers/usb/gadget/{ => function}/f_loopback.c (100%) rename drivers/usb/gadget/{ => function}/f_mass_storage.c (100%) rename drivers/usb/gadget/{ => function}/f_mass_storage.h (100%) rename drivers/usb/gadget/{ => function}/f_midi.c (100%) rename drivers/usb/gadget/{ => function}/f_ncm.c (100%) rename drivers/usb/gadget/{ => function}/f_obex.c (100%) rename drivers/usb/gadget/{ => function}/f_phonet.c (100%) rename drivers/usb/gadget/{ => function}/f_rndis.c (100%) rename drivers/usb/gadget/{ => function}/f_serial.c (100%) rename drivers/usb/gadget/{ => function}/f_sourcesink.c (100%) rename drivers/usb/gadget/{ => function}/f_subset.c (100%) rename drivers/usb/gadget/{ => function}/f_uac1.c (100%) rename drivers/usb/gadget/{ => function}/f_uac2.c (100%) rename drivers/usb/gadget/{ => function}/f_uvc.c (100%) rename drivers/usb/gadget/{ => function}/f_uvc.h (100%) rename drivers/usb/gadget/{ => function}/g_zero.h (100%) rename drivers/usb/gadget/{ => function}/ndis.h (100%) rename drivers/usb/gadget/{ => function}/rndis.c (100%) rename drivers/usb/gadget/{ => function}/rndis.h (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_ecm.h (100%) rename drivers/usb/gadget/{ => function}/u_eem.h (100%) rename drivers/usb/gadget/{ => function}/u_ether.c (100%) rename drivers/usb/gadget/{ => function}/u_ether.h (100%) rename drivers/usb/gadget/{ => function}/u_ether_configfs.h (100%) rename drivers/usb/gadget/{ => function}/u_fs.h (100%) rename drivers/usb/gadget/{ => function}/u_gether.h (100%) rename drivers/usb/gadget/{ => function}/u_ncm.h (100%) rename drivers/usb/gadget/{ => function}/u_phonet.h (100%) rename drivers/usb/gadget/{ => function}/u_rndis.h (100%) rename drivers/usb/gadget/{ => function}/u_serial.c (100%) rename drivers/usb/gadget/{ => function}/u_serial.h (100%) rename drivers/usb/gadget/{ => function}/u_uac1.c (100%) rename drivers/usb/gadget/{ => function}/u_uac1.h (100%) rename drivers/usb/gadget/{ => function}/uvc.h (100%) rename drivers/usb/gadget/{ => function}/uvc_queue.c (100%) rename drivers/usb/gadget/{ => function}/uvc_queue.h (100%) rename drivers/usb/gadget/{ => function}/uvc_v4l2.c (100%) rename drivers/usb/gadget/{ => function}/uvc_video.c (100%) diff --git a/drivers/usb/gadget/Makefile b/drivers/usb/gadget/Makefile index c144102ea793..a186afeaa700 100644 --- a/drivers/usb/gadget/Makefile +++ b/drivers/usb/gadget/Makefile @@ -9,32 +9,4 @@ obj-$(CONFIG_USB_LIBCOMPOSITE) += libcomposite.o libcomposite-y := usbstring.o config.o epautoconf.o libcomposite-y += composite.o functions.o configfs.o u_f.o -# USB Functions -usb_f_acm-y := f_acm.o -obj-$(CONFIG_USB_F_ACM) += usb_f_acm.o -usb_f_ss_lb-y := f_loopback.o f_sourcesink.o -obj-$(CONFIG_USB_F_SS_LB) += usb_f_ss_lb.o -obj-$(CONFIG_USB_U_SERIAL) += u_serial.o -usb_f_serial-y := f_serial.o -obj-$(CONFIG_USB_F_SERIAL) += usb_f_serial.o -usb_f_obex-y := f_obex.o -obj-$(CONFIG_USB_F_OBEX) += usb_f_obex.o -obj-$(CONFIG_USB_U_ETHER) += u_ether.o -usb_f_ncm-y := f_ncm.o -obj-$(CONFIG_USB_F_NCM) += usb_f_ncm.o -usb_f_ecm-y := f_ecm.o -obj-$(CONFIG_USB_F_ECM) += usb_f_ecm.o -usb_f_phonet-y := f_phonet.o -obj-$(CONFIG_USB_F_PHONET) += usb_f_phonet.o -usb_f_eem-y := f_eem.o -obj-$(CONFIG_USB_F_EEM) += usb_f_eem.o -usb_f_ecm_subset-y := f_subset.o -obj-$(CONFIG_USB_F_SUBSET) += usb_f_ecm_subset.o -usb_f_rndis-y := f_rndis.o rndis.o -obj-$(CONFIG_USB_F_RNDIS) += usb_f_rndis.o -usb_f_mass_storage-y := f_mass_storage.o storage_common.o -obj-$(CONFIG_USB_F_MASS_STORAGE)+= usb_f_mass_storage.o -usb_f_fs-y := f_fs.o -obj-$(CONFIG_USB_F_FS) += usb_f_fs.o - -obj-$(CONFIG_USB_GADGET) += udc/ legacy/ +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 000000000000..6d91f21b52a6 --- /dev/null +++ b/drivers/usb/gadget/function/Makefile @@ -0,0 +1,34 @@ +# +# USB peripheral controller drivers +# + +ccflags-y := -I$(PWD)/drivers/usb/gadget/ +ccflags-y += -I$(PWD)/drivers/usb/gadget/udc/ + +# USB Functions +usb_f_acm-y := f_acm.o +obj-$(CONFIG_USB_F_ACM) += usb_f_acm.o +usb_f_ss_lb-y := f_loopback.o f_sourcesink.o +obj-$(CONFIG_USB_F_SS_LB) += usb_f_ss_lb.o +obj-$(CONFIG_USB_U_SERIAL) += u_serial.o +usb_f_serial-y := f_serial.o +obj-$(CONFIG_USB_F_SERIAL) += usb_f_serial.o +usb_f_obex-y := f_obex.o +obj-$(CONFIG_USB_F_OBEX) += usb_f_obex.o +obj-$(CONFIG_USB_U_ETHER) += u_ether.o +usb_f_ncm-y := f_ncm.o +obj-$(CONFIG_USB_F_NCM) += usb_f_ncm.o +usb_f_ecm-y := f_ecm.o +obj-$(CONFIG_USB_F_ECM) += usb_f_ecm.o +usb_f_phonet-y := f_phonet.o +obj-$(CONFIG_USB_F_PHONET) += usb_f_phonet.o +usb_f_eem-y := f_eem.o +obj-$(CONFIG_USB_F_EEM) += usb_f_eem.o +usb_f_ecm_subset-y := f_subset.o +obj-$(CONFIG_USB_F_SUBSET) += usb_f_ecm_subset.o +usb_f_rndis-y := f_rndis.o rndis.o +obj-$(CONFIG_USB_F_RNDIS) += usb_f_rndis.o +usb_f_mass_storage-y := f_mass_storage.o storage_common.o +obj-$(CONFIG_USB_F_MASS_STORAGE)+= usb_f_mass_storage.o +usb_f_fs-y := f_fs.o +obj-$(CONFIG_USB_F_FS) += usb_f_fs.o 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_ecm.c b/drivers/usb/gadget/function/f_ecm.c similarity index 100% rename from drivers/usb/gadget/f_ecm.c rename to drivers/usb/gadget/function/f_ecm.c diff --git a/drivers/usb/gadget/f_eem.c b/drivers/usb/gadget/function/f_eem.c similarity index 100% rename from drivers/usb/gadget/f_eem.c rename to drivers/usb/gadget/function/f_eem.c diff --git a/drivers/usb/gadget/f_fs.c b/drivers/usb/gadget/function/f_fs.c similarity index 100% rename from drivers/usb/gadget/f_fs.c rename to drivers/usb/gadget/function/f_fs.c diff --git a/drivers/usb/gadget/f_hid.c b/drivers/usb/gadget/function/f_hid.c similarity index 100% rename from drivers/usb/gadget/f_hid.c rename to drivers/usb/gadget/function/f_hid.c diff --git a/drivers/usb/gadget/f_loopback.c b/drivers/usb/gadget/function/f_loopback.c similarity index 100% rename from drivers/usb/gadget/f_loopback.c rename to drivers/usb/gadget/function/f_loopback.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_mass_storage.h b/drivers/usb/gadget/function/f_mass_storage.h similarity index 100% rename from drivers/usb/gadget/f_mass_storage.h rename to drivers/usb/gadget/function/f_mass_storage.h diff --git a/drivers/usb/gadget/f_midi.c b/drivers/usb/gadget/function/f_midi.c similarity index 100% rename from drivers/usb/gadget/f_midi.c rename to drivers/usb/gadget/function/f_midi.c diff --git a/drivers/usb/gadget/f_ncm.c b/drivers/usb/gadget/function/f_ncm.c similarity index 100% rename from drivers/usb/gadget/f_ncm.c rename to drivers/usb/gadget/function/f_ncm.c diff --git a/drivers/usb/gadget/f_obex.c b/drivers/usb/gadget/function/f_obex.c similarity index 100% rename from drivers/usb/gadget/f_obex.c rename to drivers/usb/gadget/function/f_obex.c diff --git a/drivers/usb/gadget/f_phonet.c b/drivers/usb/gadget/function/f_phonet.c similarity index 100% rename from drivers/usb/gadget/f_phonet.c rename to drivers/usb/gadget/function/f_phonet.c diff --git a/drivers/usb/gadget/f_rndis.c b/drivers/usb/gadget/function/f_rndis.c similarity index 100% rename from drivers/usb/gadget/f_rndis.c rename to drivers/usb/gadget/function/f_rndis.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/f_sourcesink.c b/drivers/usb/gadget/function/f_sourcesink.c similarity index 100% rename from drivers/usb/gadget/f_sourcesink.c rename to drivers/usb/gadget/function/f_sourcesink.c diff --git a/drivers/usb/gadget/f_subset.c b/drivers/usb/gadget/function/f_subset.c similarity index 100% rename from drivers/usb/gadget/f_subset.c rename to drivers/usb/gadget/function/f_subset.c diff --git a/drivers/usb/gadget/f_uac1.c b/drivers/usb/gadget/function/f_uac1.c similarity index 100% rename from drivers/usb/gadget/f_uac1.c rename to drivers/usb/gadget/function/f_uac1.c diff --git a/drivers/usb/gadget/f_uac2.c b/drivers/usb/gadget/function/f_uac2.c similarity index 100% rename from drivers/usb/gadget/f_uac2.c rename to drivers/usb/gadget/function/f_uac2.c diff --git a/drivers/usb/gadget/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c similarity index 100% rename from drivers/usb/gadget/f_uvc.c rename to drivers/usb/gadget/function/f_uvc.c diff --git a/drivers/usb/gadget/f_uvc.h b/drivers/usb/gadget/function/f_uvc.h similarity index 100% rename from drivers/usb/gadget/f_uvc.h rename to drivers/usb/gadget/function/f_uvc.h diff --git a/drivers/usb/gadget/g_zero.h b/drivers/usb/gadget/function/g_zero.h similarity index 100% rename from drivers/usb/gadget/g_zero.h rename to drivers/usb/gadget/function/g_zero.h diff --git a/drivers/usb/gadget/ndis.h b/drivers/usb/gadget/function/ndis.h similarity index 100% rename from drivers/usb/gadget/ndis.h rename to drivers/usb/gadget/function/ndis.h diff --git a/drivers/usb/gadget/rndis.c b/drivers/usb/gadget/function/rndis.c similarity index 100% rename from drivers/usb/gadget/rndis.c rename to drivers/usb/gadget/function/rndis.c diff --git a/drivers/usb/gadget/rndis.h b/drivers/usb/gadget/function/rndis.h similarity index 100% rename from drivers/usb/gadget/rndis.h rename to drivers/usb/gadget/function/rndis.h 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_ecm.h b/drivers/usb/gadget/function/u_ecm.h similarity index 100% rename from drivers/usb/gadget/u_ecm.h rename to drivers/usb/gadget/function/u_ecm.h diff --git a/drivers/usb/gadget/u_eem.h b/drivers/usb/gadget/function/u_eem.h similarity index 100% rename from drivers/usb/gadget/u_eem.h rename to drivers/usb/gadget/function/u_eem.h diff --git a/drivers/usb/gadget/u_ether.c b/drivers/usb/gadget/function/u_ether.c similarity index 100% rename from drivers/usb/gadget/u_ether.c rename to drivers/usb/gadget/function/u_ether.c diff --git a/drivers/usb/gadget/u_ether.h b/drivers/usb/gadget/function/u_ether.h similarity index 100% rename from drivers/usb/gadget/u_ether.h rename to drivers/usb/gadget/function/u_ether.h diff --git a/drivers/usb/gadget/u_ether_configfs.h b/drivers/usb/gadget/function/u_ether_configfs.h similarity index 100% rename from drivers/usb/gadget/u_ether_configfs.h rename to drivers/usb/gadget/function/u_ether_configfs.h diff --git a/drivers/usb/gadget/u_fs.h b/drivers/usb/gadget/function/u_fs.h similarity index 100% rename from drivers/usb/gadget/u_fs.h rename to drivers/usb/gadget/function/u_fs.h diff --git a/drivers/usb/gadget/u_gether.h b/drivers/usb/gadget/function/u_gether.h similarity index 100% rename from drivers/usb/gadget/u_gether.h rename to drivers/usb/gadget/function/u_gether.h diff --git a/drivers/usb/gadget/u_ncm.h b/drivers/usb/gadget/function/u_ncm.h similarity index 100% rename from drivers/usb/gadget/u_ncm.h rename to drivers/usb/gadget/function/u_ncm.h diff --git a/drivers/usb/gadget/u_phonet.h b/drivers/usb/gadget/function/u_phonet.h similarity index 100% rename from drivers/usb/gadget/u_phonet.h rename to drivers/usb/gadget/function/u_phonet.h diff --git a/drivers/usb/gadget/u_rndis.h b/drivers/usb/gadget/function/u_rndis.h similarity index 100% rename from drivers/usb/gadget/u_rndis.h rename to drivers/usb/gadget/function/u_rndis.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/u_uac1.c b/drivers/usb/gadget/function/u_uac1.c similarity index 100% rename from drivers/usb/gadget/u_uac1.c rename to drivers/usb/gadget/function/u_uac1.c diff --git a/drivers/usb/gadget/u_uac1.h b/drivers/usb/gadget/function/u_uac1.h similarity index 100% rename from drivers/usb/gadget/u_uac1.h rename to drivers/usb/gadget/function/u_uac1.h diff --git a/drivers/usb/gadget/uvc.h b/drivers/usb/gadget/function/uvc.h similarity index 100% rename from drivers/usb/gadget/uvc.h rename to drivers/usb/gadget/function/uvc.h diff --git a/drivers/usb/gadget/uvc_queue.c b/drivers/usb/gadget/function/uvc_queue.c similarity index 100% rename from drivers/usb/gadget/uvc_queue.c rename to drivers/usb/gadget/function/uvc_queue.c diff --git a/drivers/usb/gadget/uvc_queue.h b/drivers/usb/gadget/function/uvc_queue.h similarity index 100% rename from drivers/usb/gadget/uvc_queue.h rename to drivers/usb/gadget/function/uvc_queue.h diff --git a/drivers/usb/gadget/uvc_v4l2.c b/drivers/usb/gadget/function/uvc_v4l2.c similarity index 100% rename from drivers/usb/gadget/uvc_v4l2.c rename to drivers/usb/gadget/function/uvc_v4l2.c diff --git a/drivers/usb/gadget/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c similarity index 100% rename from drivers/usb/gadget/uvc_video.c rename to drivers/usb/gadget/function/uvc_video.c diff --git a/drivers/usb/gadget/legacy/Makefile b/drivers/usb/gadget/legacy/Makefile index d4570744e106..a11aad5635df 100644 --- a/drivers/usb/gadget/legacy/Makefile +++ b/drivers/usb/gadget/legacy/Makefile @@ -4,6 +4,7 @@ ccflags-y := -I$(PWD)/drivers/usb/gadget/ ccflags-y += -I$(PWD)/drivers/usb/gadget/udc/ +ccflags-y += -I$(PWD)/drivers/usb/gadget/function/ g_zero-y := zero.o g_audio-y := audio.o -- 2.20.1