Hi,
Benjamin Herrenschmidt <b...@kernel.crashing.org> writes: > On Fri, 2019-08-09 at 08:31 +0300, Felipe Balbi wrote: >> Hi, >> >> Benjamin Herrenschmidt <b...@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 <b...@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