summaryrefslogtreecommitdiff
path: root/include/linux/usb/gadgetfs.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-10-19 11:28:10 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2012-10-19 11:28:10 -0700
commit42bf3e27e846156e9cead6f2cd6c43fa0ceb8362 (patch)
treed20e54769315ea176c5c732de35877b4e7f08450 /include/linux/usb/gadgetfs.h
parentfb06de04192c2d0ed18599e5a6402b85382fd8d5 (diff)
parent4b35f1c52943851b310afb09047bfe991ac8f5ae (diff)
Merge tag 'usb-3.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB fixes from Greg Kroah-Hartman: "Here are the USB patches against your 3.7-rc1 tree. There are the usual UABI header file movements, and we finally are now able to remove the dbg() macro that is over 15 years old (that had to wait for after some other trees got merged into yours during the big 3.7-rc1 merge window.) Other than that, nothing major, just a number of bugfixes and new device ids. It turns out that almost all of the usb-serial drivers had bugs in how they were handling their internal data, leaking memory, hence all of those fixups. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" * tag 'usb-3.7-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (42 commits) USB: option: add more ZTE devices USB: option: blacklist net interface on ZTE devices usb: host: xhci: New system added for Compliance Mode Patch on SN65LVPE502CP USB: io_ti: fix sysfs-attribute creation USB: iuu_phoenix: fix sysfs-attribute creation USB: spcp8x5: fix port-data memory leak USB: ssu100: fix port-data memory leak USB: ti_usb_3410_5052: fix port-data memory leak USB: oti6858: fix port-data memory leak USB: iuu_phoenix: fix port-data memory leak USB: kl5kusb105: fix port-data memory leak USB: io_ti: fix port-data memory leak USB: keyspan_pda: fix port-data memory leak USB: f81232: fix port-data memory leak USB: io_edgeport: fix port-data memory leak USB: kobil_sct: fix port-data memory leak USB: cypress_m8: fix port-data memory leak usb: acm: fix the computation of the number of data bits usb: Missing dma_mask in ehci-vt8500.c when probed from device-tree usb: Missing dma_mask in uhci-platform.c when probed from device-tree ...
Diffstat (limited to 'include/linux/usb/gadgetfs.h')
-rw-r--r--include/linux/usb/gadgetfs.h88
1 files changed, 0 insertions, 88 deletions
diff --git a/include/linux/usb/gadgetfs.h b/include/linux/usb/gadgetfs.h
deleted file mode 100644
index 0bb12e0d4f8f..000000000000
--- a/include/linux/usb/gadgetfs.h
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
- * Filesystem based user-mode API to USB Gadget controller hardware
- *
- * Other than ep0 operations, most things are done by read() and write()
- * on endpoint files found in one directory. They are configured by
- * writing descriptors, and then may be used for normal stream style
- * i/o requests. When ep0 is configured, the device can enumerate;
- * when it's closed, the device disconnects from usb. Operations on
- * ep0 require ioctl() operations.
- *
- * Configuration and device descriptors get written to /dev/gadget/$CHIP,
- * which may then be used to read usb_gadgetfs_event structs. The driver
- * may activate endpoints as it handles SET_CONFIGURATION setup events,
- * or earlier; writing endpoint descriptors to /dev/gadget/$ENDPOINT
- * then performing data transfers by reading or writing.
- */
-
-#ifndef __LINUX_USB_GADGETFS_H
-#define __LINUX_USB_GADGETFS_H
-
-#include <linux/types.h>
-#include <linux/ioctl.h>
-
-#include <linux/usb/ch9.h>
-
-/*
- * Events are delivered on the ep0 file descriptor, when the user mode driver
- * reads from this file descriptor after writing the descriptors. Don't
- * stop polling this descriptor.
- */
-
-enum usb_gadgetfs_event_type {
- GADGETFS_NOP = 0,
-
- GADGETFS_CONNECT,
- GADGETFS_DISCONNECT,
- GADGETFS_SETUP,
- GADGETFS_SUSPEND,
- /* and likely more ! */
-};
-
-/* NOTE: this structure must stay the same size and layout on
- * both 32-bit and 64-bit kernels.
- */
-struct usb_gadgetfs_event {
- union {
- /* NOP, DISCONNECT, SUSPEND: nothing
- * ... some hardware can't report disconnection
- */
-
- /* CONNECT: just the speed */
- enum usb_device_speed speed;
-
- /* SETUP: packet; DATA phase i/o precedes next event
- *(setup.bmRequestType & USB_DIR_IN) flags direction
- * ... includes SET_CONFIGURATION, SET_INTERFACE
- */
- struct usb_ctrlrequest setup;
- } u;
- enum usb_gadgetfs_event_type type;
-};
-
-
-/* The 'g' code is also used by printer gadget ioctl requests.
- * Don't add any colliding codes to either driver, and keep
- * them in unique ranges (size 0x20 for now).
- */
-
-/* endpoint ioctls */
-
-/* IN transfers may be reported to the gadget driver as complete
- * when the fifo is loaded, before the host reads the data;
- * OUT transfers may be reported to the host's "client" driver as
- * complete when they're sitting in the FIFO unread.
- * THIS returns how many bytes are "unclaimed" in the endpoint fifo
- * (needed for precise fault handling, when the hardware allows it)
- */
-#define GADGETFS_FIFO_STATUS _IO('g', 1)
-
-/* discards any unclaimed data in the fifo. */
-#define GADGETFS_FIFO_FLUSH _IO('g', 2)
-
-/* resets endpoint halt+toggle; used to implement set_interface.
- * some hardware (like pxa2xx) can't support this.
- */
-#define GADGETFS_CLEAR_HALT _IO('g', 3)
-
-#endif /* __LINUX_USB_GADGETFS_H */