From: Felipe Balbi <balbi@kernel.org>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
linux-usb@vger.kernel.org
Subject: Re: [PATCH] [RFC] usb: gadget: hid: Add "single_ep" option
Date: Fri, 09 Aug 2019 11:08:21 +0300 [thread overview]
Message-ID: <87zhki69sa.fsf@gmail.com> (raw)
In-Reply-To: <e326f0a27c04a5f23cee5ef36f38e3ddf11bbf5d.camel@kernel.crashing.org>
Hi,
Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
> On Fri, 2019-08-09 at 08:31 +0300, Felipe Balbi wrote:
>> Hi,
>>
>> Benjamin Herrenschmidt <benh@kernel.crashing.org> writes:
>>
>> > Some host drivers really do not like keyboards having an OUT
>> > endpoint.
>> >
>> > For example, most UEFI forked from EDK2 before 2006 (or was it 2008
>> > ?)
>> > have a bug, they'll try to use the *last* interrupt EP in the
>> > descriptor list and just assume it's an IN endpoint. Newer UEFIs
>> > use the *first* interrupt endpoint instead. None of them checks the
>> > direction :-(
>> >
>> > This adds a "single_ep" option to f_hid which allows to specify
>> > that
>> > only the IN path should be created. This should be used for
>> > keyboards
>> > if they are ever to be used with such systems as host.
>> >
>> > Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>
>> Could you come up with a slightly more descriptive name? single_ep
>> doesn't give me any hint of which endpoint will be left around.
>>
>> Perhaps call it 'disable_output_report'?
>
> Sure. Or more concice "input_only" maybe ?
that works too. Another option would to introduce two options,
has_input_report and has_output_report and have them true by default.
Then user can even produce an output-only HID device, like these odd
USB-controlled relays.
--
balbi
next prev parent reply other threads:[~2019-08-09 8:08 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-09 4:05 [PATCH] [RFC] usb: gadget: hid: Add "single_ep" option Benjamin Herrenschmidt
2019-08-09 5:31 ` Felipe Balbi
2019-08-09 6:36 ` Benjamin Herrenschmidt
2019-08-09 8:08 ` Felipe Balbi [this message]
2019-08-09 8:20 ` Benjamin Herrenschmidt
2019-08-09 9:32 ` Felipe Balbi
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=87zhki69sa.fsf@gmail.com \
--to=balbi@kernel.org \
--cc=benh@kernel.crashing.org \
--cc=linux-usb@vger.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).