diff --git a/drivers/usbhost/Kconfig b/drivers/usbhost/Kconfig index 021dababb6..7b225defd0 100644 --- a/drivers/usbhost/Kconfig +++ b/drivers/usbhost/Kconfig @@ -87,6 +87,16 @@ config USBHOST_COMPOSITE NOTE: This feature is marked EXPERIMENTAL because it has not been untested +config USBHOST_COMPOSITE_STRICT + bool "Strict composite membership" + default n + depends on USBHOST_COMPOSITE + ---help--- + If selected, then the composite device will not be enumerated unless + every member class in the composite is supported. If not selected + then, for example, you could use the CDC/ACM interface of the device + with not support for the other interfaces. + config USBHOST_MSC bool "Mass Storage Class Support" default n diff --git a/drivers/usbhost/usbhost_composite.c b/drivers/usbhost/usbhost_composite.c index b2da8a9e27..d0b294d74c 100644 --- a/drivers/usbhost/usbhost_composite.c +++ b/drivers/usbhost/usbhost_composite.c @@ -771,8 +771,12 @@ int usbhost_composite(FAR struct usbhost_hubport_s *hport, if (reg == NULL) { uerr("ERROR: usbhost_findclass failed\n"); +#ifdef CONFIG_USBHOST_COMPOSITE_STRICT ret = -EINVAL; goto errout_with_cfgbuffer; +#else + continue; +#endif } /* Yes.. there is a class for this device. Get an instance of its