[PATCH v2 7/8] lsusb: Add descriptor definition for USB3 BOS Configuration Summary.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add definition of the BOS configuration summary descriptor, as
specified by the USB 3 standard, to the descriptor definitions
for lsusb.

Signed-off-by: Michael Drake <michael.drake@xxxxxxxxxxxxxxx>
---
 desc-defs.c | 15 +++++++++++++++
 desc-defs.h |  3 +++
 2 files changed, 18 insertions(+)

diff --git a/desc-defs.c b/desc-defs.c
index 590f34a..9d3e312 100644
--- a/desc-defs.c
+++ b/desc-defs.c
@@ -978,3 +978,18 @@ const struct desc * const desc_audio_as_isochronous_audio_data_endpoint[3] = {
 	desc_audio_2_as_isochronous_audio_data_endpoint,
 	desc_audio_3_as_isochronous_audio_data_endpoint,
 };
+
+/** USB3: 9.6.2.7 Configuration Summary Descriptor; Table 9-21. */
+const struct desc desc_usb3_dc_configuration_summary[] = {
+	{ .field = "bLength",             .size = 1, .type = DESC_NUMBER },
+	{ .field = "bDescriptorType",     .size = 1, .type = DESC_CONSTANT },
+	{ .field = "bDevCapabilityType",  .size = 1, .type = DESC_NUMBER },
+	{ .field = "bcdVersion",          .size = 2, .type = DESC_BCD },
+	{ .field = "bClass",              .size = 1, .type = DESC_NUMBER },
+	{ .field = "bSubClass",           .size = 1, .type = DESC_NUMBER },
+	{ .field = "bProtocol",           .size = 1, .type = DESC_NUMBER },
+	{ .field = "bConfigurationCount", .size = 1, .type = DESC_NUMBER },
+	{ .field = "bConfigurationIndex", .size = 1, .type = DESC_NUMBER,
+			.array = { .array = true, .length_field1 = "bConfigurationCount" } },
+	{ .field = NULL }
+};
diff --git a/desc-defs.h b/desc-defs.h
index d88ebd8..2c8f1b3 100644
--- a/desc-defs.h
+++ b/desc-defs.h
@@ -151,6 +151,9 @@ extern const struct desc * const desc_audio_ac_sample_rate_converter[3];
 extern const struct desc * const desc_audio_as_interface[3];
 extern const struct desc * const desc_audio_as_isochronous_audio_data_endpoint[3];
 
+/* Device Capability (DC) descriptor definitions */
+extern const struct desc desc_usb3_dc_configuration_summary[];
+
 /* ---------------------------------------------------------------------- */
 
 #endif /* _DESC_DEFS_H */
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux