From: Ricardo Ribalda Date: Wed, 19 Nov 2025 19:37:13 +0000 (+0000) Subject: media: uvcvideo: Document how to format GUIDs X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee5b462b97162dbb6c536e18a37b3048f6520019;p=thirdparty%2Fkernel%2Flinux.git media: uvcvideo: Document how to format GUIDs Manual formatting the GUIDs can lead to errors, document a programmatically way to format the GUIDs from lsusb into something that the driver can use. Signed-off-by: Ricardo Ribalda Reviewed-by: Laurent Pinchart Reviewed-by: Hans de Goede Signed-off-by: Hans de Goede Signed-off-by: Hans Verkuil --- diff --git a/include/linux/usb/uvc.h b/include/linux/usb/uvc.h index 22e0dab0809e2..ea92ac623a454 100644 --- a/include/linux/usb/uvc.h +++ b/include/linux/usb/uvc.h @@ -10,6 +10,14 @@ /* ------------------------------------------------------------------------ * GUIDs + * + * The GUID returned by lsusb can be converted to this format with the + * following python snippet: + * + * import uuid + * id = "{01234567-89ab-cdef-0123-456789abcdef}" + * le = uuid.UUID(id).bytes_le + * print("{" + ", ".join([f"0x{b:02x}" for b in le]) + "}") */ #define UVC_GUID_UVC_CAMERA \ {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, \