]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
media: uvcvideo: Document how to format GUIDs
authorRicardo Ribalda <ribalda@chromium.org>
Wed, 19 Nov 2025 19:37:13 +0000 (19:37 +0000)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 5 Jan 2026 11:21:21 +0000 (12:21 +0100)
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 <ribalda@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
include/linux/usb/uvc.h

index 22e0dab0809e296e089940620ae0e8838e109701..ea92ac623a454c7cfa21a47deed7c48c6d3e077d 100644 (file)
 
 /* ------------------------------------------------------------------------
  * 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, \