lkml.org 
[lkml]   [2010]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] HID: Documentation for hidraw
On Thu, 17 Jun 2010 23:38:03 -0400
Alan Ott <alan@signal11.us> wrote:

> Documenation for the hidraw driver.
>
> Signed-off-by: Alan Ott <alan@signal11.us>
> ---
> The information in this patch relies on:
> [PATCH v2] HID: Add Support for Setting and Getting Feature Reports from hidraw
> which has been applied by Jiri Kosina.
>
> Please provide comments. I'm sure someone here will have a better idea where
> to put this than the root of Documentation/. I didn't see a better place, as
> hidraw is used for both Bluetooth and USB.
>

Maybe both hidraw.txt and hiddev.txt can be moved to
Documentation/hid/?

From a first read the document is OK tho. Thanks.

> Documentation/hidraw.txt | 283 ++++++++++++++++++++++++++++++++++++++++++++++
> 1 files changed, 283 insertions(+), 0 deletions(-)
> create mode 100644 Documentation/hidraw.txt
>
> diff --git a/Documentation/hidraw.txt b/Documentation/hidraw.txt
> new file mode 100644
> index 0000000..7153a06
> --- /dev/null
> +++ b/Documentation/hidraw.txt
> @@ -0,0 +1,283 @@
[...]
> +
> +HIDIOCGRAWNAME(len): Get Raw Name
> +This ioctl returns a string containing the vendor and product strings of
> +the device. The returned string is Unicode, UTF-8 encoded.
> +

Is the encoding specified in the HID spec?

[...]
>
> +Example
> +---------
> +The following code shows examples of read() write() and all the ioctls for
> +hidraw. The code may be used by anyone for any purpose, and can serve as a
> +starting point for developing applications using hidraw.
> +

Just a very minimal remark, maybe the code should follow the kernel
coding style (early return on error, no braces for one line conditional
blocks) even if it is a userspace application. Being it in the
kernel Documentation I assume people reading it would be used to kernel
style more.

> +---- Begin Code ----
[...]
> +---- End Code ----
> +
> +Document by:
> + Alan Ott <alan@signal11.us>
> --
> 1.7.0.4

Regards,
Antonio

--
Antonio Ospite
http://ao2.it

PGP public key ID: 0x4553B001

A: Because it messes up the order in which people normally read text.
See http://en.wikipedia.org/wiki/Posting_style
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2010-06-18 12:01    [from the cache]
©2003-2011 Jasper Spaans