[lkml]   [2010]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] HID: Add Support for Setting and Getting Feature Reports from hidraw
On 06/08/2010 02:32 AM, Antonio Ospite wrote:
> On Mon, 7 Jun 2010 23:51:48 -0400
> Alan Ott<> wrote:
>> Per the HID Specification, Feature reports must be sent and received on
>> the Configuration endpoint (EP 0) through the Set_Report/Get_Report
>> interfaces. This patch adds two ioctls to hidraw to set and get feature
>> reports to and from the device. Modifications were made to hidraw and
>> usbhid.
>> New hidraw ioctls:
>> HIDIOCSFEATURE - Perform a Set_Report transfer of a Feature report.
>> HIDIOCGFEATURE - Perform a Get_Report transfer of a Feature report.
>> Signed-off-by: Alan Ott<>
>> ---
> Thanks Alan, I am going to test this quite soon.
> TBH, when I was thinking about how to extend hidraw I thought we could
> have added a new report_type field to struct hidraw_report_descriptor,
> in order to re-use the HIDIOCGRDESC ioctl handler itself, adding then a
> HIDIOCSRDESC for setting the report. This looked cleaner to my eyes,
Thanks for the feedback, Antonio. The HIDIOCGRDESC ioctl copies the
existing descriptor from the hid_device structure. Since it does not
initiate a Get_Report transfer, I'm not sure how much re-use there could
have been using that method. In my estimation, a Set_Report/Get_Report
was more similar to the call to write().

> but I didn't actually implement this, so I don't know if it was
> feasible, for instance one problem I didn't investigate further was
> about the default value of the aforementioned report_type field in
> order to keep the current behavior of HIDIOCGRDESC.
I'm not sure what you mean here, as the report_type field is not part of

Thanks for testing my patch. Please let me know if you have problems
with it.


 \ /
  Last update: 2010-06-08 15:45    [W:0.114 / U:1.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site