From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: Hans de Goede <hansg@kernel.org>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 3/3] media: uvcvideo: Sort all the uvc_ids quirks
Date: Tue, 1 Dec 2026 12:23:07 +0900 [thread overview]
Message-ID: <20261201032307.GO24781@killaraus.ideasonboard.com> (raw)
In-Reply-To: <20261130-uvc-sorted-v2-3-795f47fbb703@chromium.org>
On Mon, Nov 30, 2026 at 02:46:57PM +0000, Ricardo Ribalda wrote:
> Create two sections of quirks, one that can use
> USB_DEVICE_AND_INTERFACE_INFO() and the other that cannot.
>
> We seemed to have some devices out of order. Fix them.
>
> Also, add keep-sorted comments to help the CI identify what parts
> need to be sorted.
>
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/media/usb/uvc/uvc_driver.c | 59 ++++++++++++++++++++++----------------
> 1 file changed, 35 insertions(+), 24 deletions(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
> index 530fe51522dc..5ae56da7388e 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -2547,9 +2547,14 @@ static const struct uvc_device_info uvc_quirk_force_y8 = {
> * VENDOR_SPEC because they don't announce themselves as UVC devices, even
> * though they are compliant.
> *
> - * Sort these by vendor/product ID.
> + * Use USB_DEVICE_AND_INTERFACE_INFO() instead of open-coded matching whenever
> + * possible. Sort the entries by vendor/product ID, grouped into:
> + * - Devices matched with USB_DEVICE_AND_INTERFACE_INFO()
> + * - Devices that require open-coded matching
> + * - Generic USB Video Class entries
> */
> static const struct usb_device_id uvc_ids[] = {
> + /* keep-sorted start block=yes */
> /* HP Webcam HD 2300 */
> { USB_DEVICE_AND_INTERFACE_INFO(0x03f0, 0xe207, USB_CLASS_VIDEO, 1, 0),
> .driver_info = (kernel_ulong_t)&uvc_quirk_stream_no_fid },
> @@ -2580,18 +2585,6 @@ static const struct usb_device_id uvc_ids[] = {
> /* Logitech, Webcam B910 */
> { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x0823, USB_CLASS_VIDEO, 1, 0),
> .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_WAKE_AUTOSUSPEND) },
> - /* Logitech Quickcam Fusion */
> - { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c1, USB_CLASS_VENDOR_SPEC, 1, 0) },
> - /* Logitech Quickcam Orbit MP */
> - { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c2, USB_CLASS_VENDOR_SPEC, 1, 0) },
> - /* Logitech Quickcam Pro for Notebook */
> - { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c3, USB_CLASS_VENDOR_SPEC, 1, 0) },
> - /* Logitech Quickcam Pro 5000 */
> - { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c5, USB_CLASS_VENDOR_SPEC, 1, 0) },
> - /* Logitech Quickcam OEM Dell Notebook */
> - { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c6, USB_CLASS_VENDOR_SPEC, 1, 0) },
> - /* Logitech Quickcam OEM Cisco VT Camera II */
> - { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c7, USB_CLASS_VENDOR_SPEC, 1, 0) },
> /* Logitech HD Pro Webcam C920 */
> { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x082d, USB_CLASS_VIDEO, 1, 0),
> .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_RESTORE_CTRLS_ON_INIT
> @@ -2608,6 +2601,18 @@ static const struct usb_device_id uvc_ids[] = {
> /* Logitech Rally Bar */
> { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x089b, USB_CLASS_VIDEO, 1, 0),
> .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_NO_RESET_RESUME) },
> + /* Logitech Quickcam Fusion */
> + { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c1, USB_CLASS_VENDOR_SPEC, 1, 0) },
> + /* Logitech Quickcam Orbit MP */
> + { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c2, USB_CLASS_VENDOR_SPEC, 1, 0) },
> + /* Logitech Quickcam Pro for Notebook */
> + { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c3, USB_CLASS_VENDOR_SPEC, 1, 0) },
> + /* Logitech Quickcam Pro 5000 */
> + { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c5, USB_CLASS_VENDOR_SPEC, 1, 0) },
> + /* Logitech Quickcam OEM Dell Notebook */
> + { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c6, USB_CLASS_VENDOR_SPEC, 1, 0) },
> + /* Logitech Quickcam OEM Cisco VT Camera II */
> + { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08c7, USB_CLASS_VENDOR_SPEC, 1, 0) },
> /* Logitech Rally Bar Mini */
> { USB_DEVICE_AND_INTERFACE_INFO(0x046d, 0x08d3, USB_CLASS_VIDEO, 1, 0),
> .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_NO_RESET_RESUME) },
> @@ -2729,17 +2734,6 @@ static const struct usb_device_id uvc_ids[] = {
> .driver_info = (kernel_ulong_t)&uvc_quirk_probe_def },
> /* The Imaging Source USB CCD cameras */
> { USB_DEVICE_AND_INTERFACE_INFO(0x199e, 0x8102, USB_CLASS_VENDOR_SPEC, 1, 0) },
> - /* Bodelin ProScopeHR */
> - { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> - | USB_DEVICE_ID_MATCH_DEV_HI
> - | USB_DEVICE_ID_MATCH_INT_INFO,
> - .idVendor = 0x19ab,
> - .idProduct = 0x1000,
> - .bcdDevice_hi = 0x0126,
> - .bInterfaceClass = USB_CLASS_VIDEO,
> - .bInterfaceSubClass = 1,
> - .bInterfaceProtocol = 0,
> - .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_STATUS_INTERVAL) },
> /* MSI StarCam 370i */
> { USB_DEVICE_AND_INTERFACE_INFO(0x1b3b, 0x2951, USB_CLASS_VIDEO, 1, 0),
> .driver_info = (kernel_ulong_t)&uvc_quirk_probe_minmax },
> @@ -2807,6 +2801,23 @@ static const struct usb_device_id uvc_ids[] = {
> /* Intel Realsense D436 Camera */
> { USB_DEVICE_AND_INTERFACE_INFO(0x8086, 0x1156, USB_CLASS_VIDEO, 1, 0),
> .driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },
> + /* keep-sorted end */
> +
> + /* Devices that cannot use USB_DEVICE_AND_INTERFACE_INFO() */
> + /* keep-sorted start block=yes by_regex=\.idVendor\s*=\s*(\w+),\.idProduct\s*=\s*(\w+) */
> + /* Bodelin ProScopeHR */
> + { .match_flags = USB_DEVICE_ID_MATCH_DEVICE
> + | USB_DEVICE_ID_MATCH_DEV_HI
> + | USB_DEVICE_ID_MATCH_INT_INFO,
> + .idVendor = 0x19ab,
> + .idProduct = 0x1000,
> + .bcdDevice_hi = 0x0126,
> + .bInterfaceClass = USB_CLASS_VIDEO,
> + .bInterfaceSubClass = 1,
> + .bInterfaceProtocol = 0,
> + .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_STATUS_INTERVAL) },
> + /* keep-sorted end */
> +
> /* Generic USB Video Class */
> { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_UNDEFINED) },
> { USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2026-12-01 3:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 14:46 [PATCH v2 0/3] media: uvcvideo: Automate quirk sorting Ricardo Ribalda
2026-11-30 14:46 ` [PATCH v2 1/3] media: uvcvideo: Use USB_DEVICE_AND_INTERFACE_INFO macro Ricardo Ribalda
2026-12-01 3:22 ` Laurent Pinchart
2026-11-30 14:46 ` [PATCH v2 2/3] media: uvcvideo: Relax the 80 columns rules for the quirk db Ricardo Ribalda
2026-12-01 3:21 ` Laurent Pinchart
2026-11-30 14:46 ` [PATCH v2 3/3] media: uvcvideo: Sort all the uvc_ids quirks Ricardo Ribalda
2026-12-01 3:23 ` Laurent Pinchart [this message]
2026-11-30 15:40 ` [PATCH v2 0/3] media: uvcvideo: Automate quirk sorting Hans de Goede
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=20261201032307.GO24781@killaraus.ideasonboard.com \
--to=laurent.pinchart@ideasonboard.com \
--cc=hansg@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=ribalda@chromium.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