From: Alan Ott <alan@signal11.us>
To: Antonio Ospite <ospite@studenti.unina.it>
Cc: Jiri Kosina <jkosina@suse.cz>,
Alexey Dobriyan <adobriyan@gmail.com>, Tejun Heo <tj@kernel.org>,
Marcel Holtmann <marcel@holtmann.org>,
Alan Stern <stern@rowland.harvard.edu>,
Greg Kroah-Hartman <gregkh@suse.de>,
Stephane Chatty <chatty@enac.fr>,
Michael Poole <mdpoole@troilus.org>,
linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-usb@vger.kernel.org
Subject: Re: [PATCH] HID: Add Support for Setting and Getting Feature Reports from hidraw
Date: Tue, 08 Jun 2010 09:42:55 -0400 [thread overview]
Message-ID: <4C0E48DF.7000006@signal11.us> (raw)
In-Reply-To: <20100608083226.2dac88d2.ospite@studenti.unina.it>
On 06/08/2010 02:32 AM, Antonio Ospite wrote:
> On Mon, 7 Jun 2010 23:51:48 -0400
> Alan Ott<alan@signal11.us> 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<alan@signal11.us>
>> ---
>>
> 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
hidraw_report_descriptor.
Thanks for testing my patch. Please let me know if you have problems
with it.
Alan.
next prev parent reply other threads:[~2010-06-08 13:42 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1275969108-14948-1-git-send-email-alan@signal11.us>
[not found] ` <1275969108-14948-1-git-send-email-alan-yzvJWuRpmD1zbRFIqnYvSA@public.gmane.org>
2010-06-08 6:32 ` [PATCH] HID: Add Support for Setting and Getting Feature Reports from hidraw Antonio Ospite
2010-06-08 13:42 ` Alan Ott [this message]
2010-06-09 8:42 ` Antonio Ospite
2010-06-09 15:20 ` Alan Ott
2010-06-09 15:54 ` [PATCH v2] " Alan Ott
2010-06-10 10:45 ` Antonio Ospite
2010-06-10 13:09 ` Jiri Kosina
2010-06-16 15:19 ` Jiri Kosina
2010-07-10 18:33 ` [PATCH v3 0/1] " Alan Ott
2010-07-10 18:33 ` [PATCH v3 1/1] " Alan Ott
2010-06-08 3:51 [PATCH] " Alan Ott
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=4C0E48DF.7000006@signal11.us \
--to=alan@signal11.us \
--cc=adobriyan@gmail.com \
--cc=chatty@enac.fr \
--cc=gregkh@suse.de \
--cc=jkosina@suse.cz \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=marcel@holtmann.org \
--cc=mdpoole@troilus.org \
--cc=ospite@studenti.unina.it \
--cc=stern@rowland.harvard.edu \
--cc=tj@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).