Skip to content

usb: device_next: allow to initialize multiple CDC ACM instances#104697

Closed
jfischer-no wants to merge 1 commit intozephyrproject-rtos:mainfrom
jfischer-no:pr-cdc-acm-serial-instances-number
Closed

usb: device_next: allow to initialize multiple CDC ACM instances#104697
jfischer-no wants to merge 1 commit intozephyrproject-rtos:mainfrom
jfischer-no:pr-cdc-acm-serial-instances-number

Conversation

@jfischer-no
Copy link
Copy Markdown
Contributor

Allow to initialize multiple CDC ACM instances.

@jfischer-no jfischer-no requested a review from josuah February 27, 2026 23:29
@zephyrbot zephyrbot added the area: USB Universal Serial Bus label Feb 27, 2026
Several users have requested the ability to register and initialize
multiple CDC ACM instances, which would be used as serial backends
for different subsystems.

It should be noted that these instances will not be available for other
configurations or USB device contexts.

The order of the instances is also not guaranteed. For identification
purposes, a host application needs to use the label property of the CDC
ACM UART node.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
@jfischer-no jfischer-no force-pushed the pr-cdc-acm-serial-instances-number branch from 8822e1c to 0ebfc5a Compare March 2, 2026 11:09
Comment on lines +100 to +105
The number of initialized CDC ACM instances is one by default.
If the application requires multiple CDC ACM serial backends, the number of
registered and initialized instances can be increased using
:kconfig:option:`CONFIG_CDC_ACM_SERIAL_INSTANCES_NUMBER`.
The order of the instances is not guaranteed. For identification purposes, a
host application needs to use the label property of the CDC ACM UART node.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link to the source behind "Several users have requested the ability to register and initialize multiple CDC ACM instances"? The solution here is very questionable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tmon-nordic I can provide more details :).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything specific to require having a dedicated Kconfig option? Why not just iterate over all zephyr,cdc-acm-uart compatibles?

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 2, 2026

@jfischer-no
Copy link
Copy Markdown
Contributor Author

Opened #105141 as an alternative.

@jfischer-no jfischer-no closed this Mar 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: USB Universal Serial Bus

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants