linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxim Devaev <mdevaev@gmail.com>
To: Vicki Pfau <vi@endrift.com>
Cc: Felipe Balbi <balbi@kernel.org>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-usb@vger.kernel.org
Subject: Re: [PATCH 2/2] USB: gadget: f_hid: Add Set-Feature report
Date: Tue, 26 Jul 2022 12:51:37 +0300	[thread overview]
Message-ID: <20220726125137.7d3757c7@reki> (raw)
In-Reply-To: <20220726005824.2817646-2-vi@endrift.com>

В Mon, 25 Jul 2022 17:58:26 -0700
Vicki Pfau <vi@endrift.com> пишет:

> While the HID gadget implementation has been sufficient for devices that only
> use INTERRUPT transfers, the USB HID standard includes provisions for Set- and
> Get-Feature report CONTROL transfers that go over endpoint 0. These were
> previously impossible with the existing implementation, and would either send
> an empty reply, or stall out.
> 
> As the feature is a standard part of USB HID, it stands to reason that devices
> would use it, and that the HID gadget should support it. This patch adds
> support for host-to-device Set-Feature reports through a new ioctl
> interface to the hidg class dev nodes.
> 
> Signed-off-by: Vicki Pfau <vi@endrift.com>

Won't it break the logic of the existing software that works with /dev/hidgX?
Will it work if I want my gadget to work the old way?
It is important that the old behavior is the default without having to use
the new ioctls. As for these ioctls, since this is an addition to the new API,
they should be documented. I think it's also worth adding these ioctls
to the userspace example:
  - Documentation/usb/gadget_hid.rst
  - Documentation/usb/gadget-testing.rst

But it seems to me that extending the HID functionality to meet
the specifications is definitely a good idea :)

  reply	other threads:[~2022-07-26  9:51 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26  0:58 [PATCH 1/2] USB: gadget: f_hid: Add Get-Feature report Vicki Pfau
2022-07-26  0:58 ` [PATCH 2/2] USB: gadget: f_hid: Add Set-Feature report Vicki Pfau
2022-07-26  9:51   ` Maxim Devaev [this message]
2022-07-27  4:26     ` Vicki Pfau
2022-07-28  8:59       ` Maxim Devaev
2022-07-28 18:11         ` Vicki Pfau
2022-07-31  8:14           ` Maxim Devaev
2022-08-03 23:32             ` Vicki Pfau
2022-08-08  1:57               ` Maxim Devaev
2022-09-08 23:57             ` Vicki Pfau
2022-09-13 10:06               ` Maxim Devaev
2022-10-22  0:28                 ` Vicki Pfau
2022-10-25  6:15                   ` Maxim Devaev
2022-07-28  8:08 ` [PATCH 1/2] USB: gadget: f_hid: Add Get-Feature report Greg Kroah-Hartman
2022-07-28 18:07   ` Vicki Pfau
2022-07-29  7:47     ` Greg Kroah-Hartman
2022-07-29 22:52       ` Vicki Pfau

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=20220726125137.7d3757c7@reki \
    --to=mdevaev@gmail.com \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=vi@endrift.com \
    /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).