Commit 4ad4b21b authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab Committed by Jonathan Corbet

docs-rst: convert usb docbooks to ReST

As we're moving out of DocBook, let's convert the remaining
USB docbooks to ReST.

The transformation itself on this patch is a no-brainer
conversion using pandoc via this script:
	Documentation/sphinx/tmplcvt
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
parent d76a085b
...@@ -8,12 +8,11 @@ ...@@ -8,12 +8,11 @@
DOCBOOKS := z8530book.xml \ DOCBOOKS := z8530book.xml \
kernel-hacking.xml kernel-locking.xml \ kernel-hacking.xml kernel-locking.xml \
writing_usb_driver.xml networking.xml \ networking.xml \
filesystems.xml lsm.xml kgdb.xml \ filesystems.xml lsm.xml kgdb.xml \
gadget.xml libata.xml mtdnand.xml librs.xml rapidio.xml \ libata.xml mtdnand.xml librs.xml rapidio.xml \
s390-drivers.xml scsi.xml \ s390-drivers.xml scsi.xml \
sh.xml w1.xml \ sh.xml w1.xml
writing_musb_glue_layer.xml
ifeq ($(DOCBOOKS),) ifeq ($(DOCBOOKS),)
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -26,7 +26,7 @@ available subsections can be seen below. ...@@ -26,7 +26,7 @@ available subsections can be seen below.
regulator regulator
iio/index iio/index
input input
usb usb/index
pci pci
spi spi
i2c i2c
......
This diff is collapsed.
=============
Linux USB API
=============
.. toctree::
usb
gadget
writing_usb_driver
writing_musb_glue_layer
.. only:: subproject and html
Indices
=======
* :ref:`genindex`
...@@ -329,11 +329,11 @@ to detect when devices are added or removed: ...@@ -329,11 +329,11 @@ to detect when devices are added or removed:
fd = open("/proc/bus/usb/devices", O_RDONLY); fd = open("/proc/bus/usb/devices", O_RDONLY);
pfd = { fd, POLLIN, 0 }; pfd = { fd, POLLIN, 0 };
for (;;) { for (;;) {
/* The first time through, this call will return immediately. */ /* The first time through, this call will return immediately. */
poll(&pfd, 1, -1); poll(&pfd, 1, -1);
/* To see what's changed, compare the file's previous and current /* To see what's changed, compare the file's previous and current
contents or scan the filesystem. (Scanning is more precise.) */ contents or scan the filesystem. (Scanning is more precise.) */
} }
Note that this behavior is intended to be used for informational and Note that this behavior is intended to be used for informational and
...@@ -462,10 +462,10 @@ USBDEVFS_CONNECTINFO ...@@ -462,10 +462,10 @@ USBDEVFS_CONNECTINFO
:: ::
struct usbdevfs_connectinfo { struct usbdevfs_connectinfo {
unsigned int devnum; unsigned int devnum;
unsigned char slow; unsigned char slow;
}; };
File modification time is not updated by this request. File modification time is not updated by this request.
...@@ -481,10 +481,10 @@ USBDEVFS_GETDRIVER ...@@ -481,10 +481,10 @@ USBDEVFS_GETDRIVER
:: ::
struct usbdevfs_getdriver { struct usbdevfs_getdriver {
unsigned int interface; unsigned int interface;
char driver[USBDEVFS_MAXDRIVERNAME + 1]; char driver[USBDEVFS_MAXDRIVERNAME + 1];
}; };
File modification time is not updated by this request. File modification time is not updated by this request.
...@@ -494,28 +494,28 @@ USBDEVFS_IOCTL ...@@ -494,28 +494,28 @@ USBDEVFS_IOCTL
:: ::
struct usbdevfs_ioctl { struct usbdevfs_ioctl {
int ifno; int ifno;
int ioctl_code; int ioctl_code;
void *data; void *data;
}; };
/* user mode call looks like this. /* user mode call looks like this.
* 'request' becomes the driver->ioctl() 'code' parameter. * 'request' becomes the driver->ioctl() 'code' parameter.
* the size of 'param' is encoded in 'request', and that data * the size of 'param' is encoded in 'request', and that data
* is copied to or from the driver->ioctl() 'buf' parameter. * is copied to or from the driver->ioctl() 'buf' parameter.
*/ */
static int static int
usbdev_ioctl (int fd, int ifno, unsigned request, void *param) usbdev_ioctl (int fd, int ifno, unsigned request, void *param)
{ {
struct usbdevfs_ioctl wrapper; struct usbdevfs_ioctl wrapper;
wrapper.ifno = ifno; wrapper.ifno = ifno;
wrapper.ioctl_code = request; wrapper.ioctl_code = request;
wrapper.data = param; wrapper.data = param;
return ioctl (fd, USBDEVFS_IOCTL, &wrapper); return ioctl (fd, USBDEVFS_IOCTL, &wrapper);
} }
File modification time is not updated by this request. File modification time is not updated by this request.
...@@ -534,11 +534,11 @@ USBDEVFS_RELEASEINTERFACE ...@@ -534,11 +534,11 @@ USBDEVFS_RELEASEINTERFACE
the number of the interface (bInterfaceNumber from descriptor); File the number of the interface (bInterfaceNumber from descriptor); File
modification time is not updated by this request. modification time is not updated by this request.
**Warning** **Warning**
*No security check is made to ensure that the task which made *No security check is made to ensure that the task which made
the claim is the one which is releasing it. This means that user the claim is the one which is releasing it. This means that user
mode driver may interfere other ones.* mode driver may interfere other ones.*
USBDEVFS_RESETEP USBDEVFS_RESETEP
Resets the data toggle value for an endpoint (bulk or interrupt) to Resets the data toggle value for an endpoint (bulk or interrupt) to
...@@ -546,13 +546,13 @@ USBDEVFS_RESETEP ...@@ -546,13 +546,13 @@ USBDEVFS_RESETEP
as identified in the endpoint descriptor), with USB_DIR_IN added as identified in the endpoint descriptor), with USB_DIR_IN added
if the device's endpoint sends data to the host. if the device's endpoint sends data to the host.
**Warning** **Warning**
*Avoid using this request. It should probably be removed.* Using *Avoid using this request. It should probably be removed.* Using
it typically means the device and driver will lose toggle it typically means the device and driver will lose toggle
synchronization. If you really lost synchronization, you likely synchronization. If you really lost synchronization, you likely
need to completely handshake with the device, using a request need to completely handshake with the device, using a request
like CLEAR_HALT or SET_INTERFACE. like CLEAR_HALT or SET_INTERFACE.
USBDEVFS_DROP_PRIVILEGES USBDEVFS_DROP_PRIVILEGES
This is used to relinquish the ability to do certain operations This is used to relinquish the ability to do certain operations
...@@ -578,12 +578,12 @@ USBDEVFS_BULK ...@@ -578,12 +578,12 @@ USBDEVFS_BULK
:: ::
struct usbdevfs_bulktransfer { struct usbdevfs_bulktransfer {
unsigned int ep; unsigned int ep;
unsigned int len; unsigned int len;
unsigned int timeout; /* in milliseconds */ unsigned int timeout; /* in milliseconds */
void *data; void *data;
}; };
The "ep" value identifies a bulk endpoint number (1 to 15, as The "ep" value identifies a bulk endpoint number (1 to 15, as
identified in an endpoint descriptor), masked with USB_DIR_IN when identified in an endpoint descriptor), masked with USB_DIR_IN when
...@@ -610,15 +610,15 @@ USBDEVFS_CONTROL ...@@ -610,15 +610,15 @@ USBDEVFS_CONTROL
:: ::
struct usbdevfs_ctrltransfer { struct usbdevfs_ctrltransfer {
__u8 bRequestType; __u8 bRequestType;
__u8 bRequest; __u8 bRequest;
__u16 wValue; __u16 wValue;
__u16 wIndex; __u16 wIndex;
__u16 wLength; __u16 wLength;
__u32 timeout; /* in milliseconds */ __u32 timeout; /* in milliseconds */
void *data; void *data;
}; };
The first eight bytes of this structure are the contents of the The first eight bytes of this structure are the contents of the
SETUP packet to be sent to the device; see the USB 2.0 specification SETUP packet to be sent to the device; see the USB 2.0 specification
...@@ -638,11 +638,11 @@ USBDEVFS_RESET ...@@ -638,11 +638,11 @@ USBDEVFS_RESET
the reset, this rebinds all device interfaces. File modification the reset, this rebinds all device interfaces. File modification
time is not updated by this request. time is not updated by this request.
**Warning** **Warning**
*Avoid using this call* until some usbcore bugs get fixed, since *Avoid using this call* until some usbcore bugs get fixed, since
it does not fully synchronize device, interface, and driver (not it does not fully synchronize device, interface, and driver (not
just usbfs) state. just usbfs) state.
USBDEVFS_SETINTERFACE USBDEVFS_SETINTERFACE
Sets the alternate setting for an interface. The ioctl parameter is Sets the alternate setting for an interface. The ioctl parameter is
...@@ -650,10 +650,10 @@ USBDEVFS_SETINTERFACE ...@@ -650,10 +650,10 @@ USBDEVFS_SETINTERFACE
:: ::
struct usbdevfs_setinterface { struct usbdevfs_setinterface {
unsigned int interface; unsigned int interface;
unsigned int altsetting; unsigned int altsetting;
}; };
File modification time is not updated by this request. File modification time is not updated by this request.
...@@ -669,11 +669,11 @@ USBDEVFS_SETCONFIGURATION ...@@ -669,11 +669,11 @@ USBDEVFS_SETCONFIGURATION
configuration (bConfigurationValue from descriptor). File configuration (bConfigurationValue from descriptor). File
modification time is not updated by this request. modification time is not updated by this request.
**Warning** **Warning**
*Avoid using this call* until some usbcore bugs get fixed, since *Avoid using this call* until some usbcore bugs get fixed, since
it does not fully synchronize device, interface, and driver (not it does not fully synchronize device, interface, and driver (not
just usbfs) state. just usbfs) state.
Asynchronous I/O Support Asynchronous I/O Support
~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
...@@ -707,25 +707,25 @@ fewer bytes were read than were requested then you get an error report. ...@@ -707,25 +707,25 @@ fewer bytes were read than were requested then you get an error report.
:: ::
struct usbdevfs_iso_packet_desc { struct usbdevfs_iso_packet_desc {
unsigned int length; unsigned int length;
unsigned int actual_length; unsigned int actual_length;
unsigned int status; unsigned int status;
}; };
struct usbdevfs_urb { struct usbdevfs_urb {
unsigned char type; unsigned char type;
unsigned char endpoint; unsigned char endpoint;
int status; int status;
unsigned int flags; unsigned int flags;
void *buffer; void *buffer;
int buffer_length; int buffer_length;
int actual_length; int actual_length;
int start_frame; int start_frame;
int number_of_packets; int number_of_packets;
int error_count; int error_count;
unsigned int signr; unsigned int signr;
void *usercontext; void *usercontext;
struct usbdevfs_iso_packet_desc iso_frame_desc[]; struct usbdevfs_iso_packet_desc iso_frame_desc[];
}; };
For these asynchronous requests, the file modification time reflects For these asynchronous requests, the file modification time reflects
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment