Skip to content

Conversation

@Girinandha-M
Copy link

WIP subsys: usb: host: add vendor-specific serial class

Add USB vendor-specific serial host class driver that matches
devices by VID, PID.

This is not a standard CDC-ACM driver - it's for vendor-specific
serial devices that use bulk endpoints instead of CDC protocol.

This is draft PR, changes to be made.

Signed-off-by: Girinandha Manivelpandiyan [email protected]

Josuah Demangeon and others added 6 commits October 29, 2025 11:18
Add a "struct usbh_status" that contains a bitmask of flags to keep
track of the global state of the host context, like done for the
device_next implementation.

Signed-off-by: Josuah Demangeon <[email protected]>
Add a "struct usbh_class_api" for the host implementation, and move all
the function poitners to it. Add more fields to "struct usbh_class_data".

Signed-off-by: Josuah Demangeon <[email protected]>
Add API wrappers around the function pointers in struct usbh_class_api,
while also documenting the USB host class internal API.

Signed-off-by: Josuah Demangeon <[email protected]>
Add functions to probe/remove all classes as part of a new usbh_class.c
and a matching usbh_class.h. These functions are called from the function
usbh_init_device_intl() in usbh_core.c to initialize every class upon
connection of a device. Every class driver provide filters to match the
interfaces of the device.

Co-authored-by: Aiden Hu <[email protected]>
Signed-off-by: Josuah Demangeon <[email protected]>
Allocate extra room at the end of the USB descriptor buffer to ensure
that the device ends with `desc->bLength == 0`. For now, validating
`desc->bLength` from the device to ensure no access past the buffer
is still not done.

Signed-off-by: Josuah Demangeon <[email protected]>
add support for the vendor specific serial support class
to the usb subsys. This implementation enable the usb host class support
the vendor specific devices for serial communication.

Signed-off-by: Girinandha Manivelpandiyan <[email protected]>
@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant