linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Grzeschik <mgr@pengutronix.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-usb@vger.kernel.org, linux-media@vger.kernel.org,
	balbi@kernel.org, laurent.pinchart@ideasonboard.com,
	kernel@pengutronix.de
Subject: Re: [PATCH] usb: gadget: uvc: default the ctrl request interface offsets
Date: Mon, 10 Oct 2022 23:03:59 +0200	[thread overview]
Message-ID: <20221010210359.GG27626@pengutronix.de> (raw)
In-Reply-To: <Y0R+z9gtW1+Yd71d@kroah.com>

[-- Attachment #1: Type: text/plain, Size: 1505 bytes --]

On Mon, Oct 10, 2022 at 10:21:35PM +0200, Greg KH wrote:
>On Mon, Oct 10, 2022 at 08:20:28PM +0200, Michael Grzeschik wrote:
>> For the userspace it is needed to distinguish between requests for the
>> control or streaming interface. The userspace would have to parse the
>> configfs to know which interface index it has to compare the ctrl
>> requests against. Since the interface numbers are not fixed, e.g. for
>> composite gadgets, the interface offset depends on the setup.
>>
>> The kernel has this information when handing over the ctrl request to
>> the userspace. This patch removes the offset from the interface numbers
>> and expose the default interface defines in the uapi g_uvc.h.
>>
>> Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
>> ---
>>  drivers/usb/gadget/function/f_uvc.c | 16 +++++++++++++---
>>  include/uapi/linux/usb/g_uvc.h      |  3 +++
>>  2 files changed, 16 insertions(+), 3 deletions(-)
>
>This is a v2, what changed from v1?

v1 - v2: - removed the extra variable in struct uvc_event
         - replacing the ctrl request bits in place
	 - included the move of the defualt interface defines to g_uvc.h

Thanks,
Michael

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2022-10-10 21:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 18:20 [PATCH] usb: gadget: uvc: default the ctrl request interface offsets Michael Grzeschik
2022-10-10 20:21 ` Greg KH
2022-10-10 21:03   ` Michael Grzeschik [this message]
2022-10-11  6:08     ` Greg KH

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=20221010210359.GG27626@pengutronix.de \
    --to=mgr@pengutronix.de \
    --cc=balbi@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=kernel@pengutronix.de \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.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).