summaryrefslogtreecommitdiff
path: root/include/linux/usb
diff options
context:
space:
mode:
authorRicardo Ribalda <ribalda@chromium.org>2025-11-19 19:37:13 +0000
committerHans Verkuil <hverkuil+cisco@kernel.org>2026-01-05 12:21:21 +0100
commitee5b462b97162dbb6c536e18a37b3048f6520019 (patch)
tree49b47e8cd9d018677d70ae27777e6f20f13050f7 /include/linux/usb
parent27ccc44a511b0cd76dc607e2a4893b876192ee1b (diff)
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 <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>
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/uvc.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/usb/uvc.h b/include/linux/usb/uvc.h
index 22e0dab0809e..ea92ac623a45 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, \