All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mchehab@s-opensource.com>
To: Linux Media Mailing List <linux-media@vger.kernel.org>,
	Linux Doc Mailing List <linux-doc@vger.kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Mauro Carvalho Chehab <mchehab@s-opensource.com>,
	Mauro Carvalho Chehab <mchehab@infradead.org>,
	John Youn <johnyoun@synopsys.com>,
	linux-usb@vger.kernel.org, linux-rpi-kernel@lists.infradead.org,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Jonathan Corbet <corbet@lwn.net>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Oliver Neukum <oneukum@suse.com>
Subject: [PATCH v2 04/22] usb.rst: Enrich its ReST representation
Date: Thu, 30 Mar 2017 07:45:38 -0300	[thread overview]
Message-ID: <f6647d7f131d9f1831da1977341a8ecd378441c8.1490870599.git.mchehab@s-opensource.com> (raw)
In-Reply-To: <3068fc7fac09293300b9c59ece0adb985232de12.1490870599.git.mchehab@s-opensource.com>
In-Reply-To: <3068fc7fac09293300b9c59ece0adb985232de12.1490870599.git.mchehab@s-opensource.com>

- use the proper warning and note markups;
- add references for parts of the document that will be
  cross-referenced on other USB docs;
- some minor adjustments to make it better to read in
  text mode and in html.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
---
 Documentation/driver-api/usb/usb.rst | 48 +++++++++++++-----------------------
 1 file changed, 17 insertions(+), 31 deletions(-)

diff --git a/Documentation/driver-api/usb/usb.rst b/Documentation/driver-api/usb/usb.rst
index b856abb3200e..7e820768ee4f 100644
--- a/Documentation/driver-api/usb/usb.rst
+++ b/Documentation/driver-api/usb/usb.rst
@@ -102,6 +102,8 @@ disconnect testing (while the device is active) with each different host
 controller driver, to make sure drivers don't have bugs of their own as
 well as to make sure they aren't relying on some HCD-specific behavior.
 
+.. _usb_chapter9:
+
 USB-Standard Types
 ==================
 
@@ -112,6 +114,8 @@ USB, and in APIs including this host side API, gadget APIs, and usbfs.
 .. kernel-doc:: include/linux/usb/ch9.h
    :internal:
 
+.. _usb_header:
+
 Host-Side Data Types and Macros
 ===============================
 
@@ -209,7 +213,7 @@ library that wraps it. Such libraries include
 `libusb <http://libusb.sourceforge.net>`__ for C/C++, and
 `jUSB <http://jUSB.sourceforge.net>`__ for Java.
 
-    **Note**
+.. note::
 
     This particular documentation is incomplete, especially with respect
     to the asynchronous mode. As of kernel 2.5.66 the code and this
@@ -319,9 +323,7 @@ files. For information about the current format of this file, see the
 sources.
 
 This file, in combination with the poll() system call, can also be used
-to detect when devices are added or removed:
-
-::
+to detect when devices are added or removed::
 
     int fd;
     struct pollfd pfd;
@@ -407,9 +409,7 @@ The ioctl() Requests
 --------------------
 
 To use these ioctls, you need to include the following headers in your
-userspace program:
-
-::
+userspace program::
 
     #include <linux/usb.h>
     #include <linux/usbdevice_fs.h>
@@ -458,9 +458,7 @@ USBDEVFS_CLAIMINTERFACE
 
 USBDEVFS_CONNECTINFO
     Says whether the device is lowspeed. The ioctl parameter points to a
-    structure like this:
-
-    ::
+    structure like this::
 
 	struct usbdevfs_connectinfo {
 		unsigned int   devnum;
@@ -477,9 +475,7 @@ USBDEVFS_CONNECTINFO
 USBDEVFS_GETDRIVER
     Returns the name of the kernel driver bound to a given interface (a
     string). Parameter is a pointer to this structure, which is
-    modified:
-
-    ::
+    modified::
 
 	struct usbdevfs_getdriver {
 		unsigned int  interface;
@@ -490,9 +486,7 @@ USBDEVFS_GETDRIVER
 
 USBDEVFS_IOCTL
     Passes a request from userspace through to a kernel driver that has
-    an ioctl entry in the *struct usb_driver* it registered.
-
-    ::
+    an ioctl entry in the *struct usb_driver* it registered::
 
 	struct usbdevfs_ioctl {
 		int     ifno;
@@ -534,7 +528,7 @@ USBDEVFS_RELEASEINTERFACE
     the number of the interface (bInterfaceNumber from descriptor); File
     modification time is not updated by this request.
 
-	**Warning**
+.. warning::
 
 	*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
@@ -574,9 +568,7 @@ a time.
 
 USBDEVFS_BULK
     Issues a bulk read or write request to the device. The ioctl
-    parameter is a pointer to this structure:
-
-    ::
+    parameter is a pointer to this structure::
 
 	struct usbdevfs_bulktransfer {
 		unsigned int  ep;
@@ -606,9 +598,7 @@ USBDEVFS_CLEAR_HALT
 
 USBDEVFS_CONTROL
     Issues a control request to the device. The ioctl parameter points
-    to a structure like this:
-
-    ::
+    to a structure like this::
 
 	struct usbdevfs_ctrltransfer {
 		__u8   bRequestType;
@@ -638,7 +628,7 @@ USBDEVFS_RESET
     the reset, this rebinds all device interfaces. File modification
     time is not updated by this request.
 
-	**Warning**
+.. warning::
 
 	*Avoid using this call* until some usbcore bugs get fixed, since
 	it does not fully synchronize device, interface, and driver (not
@@ -646,9 +636,7 @@ USBDEVFS_RESET
 
 USBDEVFS_SETINTERFACE
     Sets the alternate setting for an interface. The ioctl parameter is
-    a pointer to a structure like this:
-
-    ::
+    a pointer to a structure like this::
 
 	struct usbdevfs_setinterface {
 		unsigned int  interface;
@@ -669,7 +657,7 @@ USBDEVFS_SETCONFIGURATION
     configuration (bConfigurationValue from descriptor). File
     modification time is not updated by this request.
 
-	**Warning**
+.. warning::
 
 	*Avoid using this call* until some usbcore bugs get fixed, since
 	it does not fully synchronize device, interface, and driver (not
@@ -702,9 +690,7 @@ When usbfs returns these urbs, the status value is updated, and the
 buffer may have been modified. Except for isochronous transfers, the
 actual_length is updated to say how many bytes were transferred; if the
 USBDEVFS_URB_DISABLE_SPD flag is set ("short packets are not OK"), if
-fewer bytes were read than were requested then you get an error report.
-
-::
+fewer bytes were read than were requested then you get an error report::
 
     struct usbdevfs_iso_packet_desc {
 	    unsigned int                     length;
-- 
2.9.3

  parent reply	other threads:[~2017-03-30 10:46 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30 10:45 [PATCH v2 01/22] tmplcvt: make the tool more robust Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 02/22] driver-api/basics.rst: add device table header Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 03/22] docs-rst: convert usb docbooks to ReST Mauro Carvalho Chehab
2017-03-30 10:45 ` Mauro Carvalho Chehab [this message]
2017-03-30 10:45 ` [PATCH v2 05/22] gadget.rst: Enrich its ReST representation and add kernel-doc tag Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 06/22] writing_usb_driver.rst: Enrich its ReST representation Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 07/22] writing_musb_glue_layer.rst: " Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 08/22] usb/anchors.txt: convert to ReST and add to driver-api book Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 09/22] usb/bulk-streams.txt: " Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 10/22] usb/callbacks.txt: " Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 11/22] usb/power-management.txt: " Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 12/22] usb/dma.txt: " Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 13/22] error-codes.rst: " Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 14/22] usb/hotplug.txt: " Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 15/22] usb/persist.txt: " Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 16/22] usb/URB.txt: convert to ReST and update it Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 17/22] usb.rst: get rid of some Sphinx errors Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 18/22] usb: get rid of some ReST doc build errors Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 19/22] usb: composite.h: fix two warnings when building docs Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 20/22] usb: gadget.h: be consistent at kernel doc macros Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 21/22] docs-rst: fix usb cross-references Mauro Carvalho Chehab
2017-03-30 10:45   ` Mauro Carvalho Chehab
2017-03-30 10:45 ` [PATCH v2 22/22] usb: document that URB transfer_buffer should be aligned Mauro Carvalho Chehab
2017-03-30 10:58 ` [PATCH v2 01/22] tmplcvt: make the tool more robust Mauro Carvalho Chehab
2017-03-30 11:45 ` Jani Nikula
2017-04-02 21:32 ` Jonathan Corbet
2017-04-05 13:07   ` Mauro Carvalho Chehab

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=f6647d7f131d9f1831da1977341a8ecd378441c8.1490870599.git.mchehab@s-opensource.com \
    --to=mchehab@s-opensource.com \
    --cc=corbet@lwn.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=johnyoun@synopsys.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rpi-kernel@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=mchehab@kernel.org \
    --cc=oneukum@suse.com \
    /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 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.