mbox series

[v3,0/5] Docs: usb: Code and text updates from usb-skeleton

Message ID cover.1638771720.git.philipp.g.hortmann@gmail.com
Headers show
Series Docs: usb: Code and text updates from usb-skeleton | expand

Message

philipp hortmann Dec. 6, 2021, 8:57 p.m. UTC
Explanation and example code updates from usb-skeleton

v2: update patch #1 to #4
    - corrected format of function names like the following example:
      "`usb_bulk_msg` function" to "usb_bulk_msg()"
v3: update patch #1 to #4 and created patch #5
    - moved correction of format of function names to own patch #5
    - reverted change of variable from retval to rv in patch #1

Philipp Hortmann (5):
  Docs: usb: update usb_bulk_msg receiving example
  Docs: usb: update comment and code near decrement our usage count for
    the device
  Docs: usb: update comment and code of function skel_delete
  Docs: usb: update explanation for device_present to disconnected
  Docs: usb: correct format of function names in the explanations

 .../driver-api/usb/writing_usb_driver.rst     | 69 +++++++++----------
 1 file changed, 33 insertions(+), 36 deletions(-)

Comments

Oliver Neukum Dec. 7, 2021, 8:55 a.m. UTC | #1
On 06.12.21 21:57, Philipp Hortmann wrote:
>  The :c:func:`usb_bulk_msg` function can be very useful for doing single reads
>  or writes to a device; however, if you need to read or write constantly to
>  a device, it is recommended to set up your own urbs and submit them to
> -the USB subsystem.
> +the USB subsystem. The template uses urbs for read and write.

Hi,

now that I read this, shouldn't we tell the reader why exactly the use
of URBs is a good idea at that place?

    Regards
        Oliver
philipp hortmann Dec. 13, 2021, 5:06 a.m. UTC | #2
On 12/7/21 9:55 AM, Oliver Neukum wrote:
> 
> On 06.12.21 21:57, Philipp Hortmann wrote:
>>   The :c:func:`usb_bulk_msg` function can be very useful for doing single reads
>>   or writes to a device; however, if you need to read or write constantly to
>>   a device, it is recommended to set up your own urbs and submit them to
>> -the USB subsystem.
>> +the USB subsystem. The template uses urbs for read and write.
> 
> Hi,
> 
> now that I read this, shouldn't we tell the reader why exactly the use
> of URBs is a good idea at that place?
> 
>      Regards
>          Oliver
> 

The Documentation/driver-api/usb/URB.rst does describe this well. We 
could think about a link to it.

Regards
Philipp