usb: device_next: rename Kconfig template instances count

The name and wording used in template can be misleading.
Use more accurate word instance instead of device since
an implementation does not necessarily have to implement
a device (in the sense of Zephyr device model), and if it
does then devicetree should be used to describe number of
instances as in the case of CDC ACM implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit is contained in:
Johann Fischer 2022-12-21 21:31:30 +01:00 committed by Carles Cufí
parent fe3efbc6a2
commit e9bab613cc
4 changed files with 13 additions and 14 deletions

View file

@ -14,5 +14,5 @@ module-str = usbd loopback
default-count = 1
source "subsys/logging/Kconfig.template.log_config"
rsource "Kconfig.template.composite_device_number"
rsource "Kconfig.template.instances_count"
endif

View file

@ -1,11 +0,0 @@
# Kconfig template file for setting device count for
# various USB classes.
# Copyright (c) 2019 Intel Corporation.
# SPDX-License-Identifier: Apache-2.0
config $(module)_DEVICE_COUNT
int "Number of $(module) Devices"
default $(default-count)
help
Number of instances of this USB Device class.

View file

@ -0,0 +1,10 @@
# Kconfig template file for setting instances count for various USB classes.
# Copyright (c) 2019 Intel Corporation.
# SPDX-License-Identifier: Apache-2.0
config $(module)_INSTANCES_COUNT
int "Number of $(module) instances"
default $(default-count)
help
Number of instances of this USB class implementation.

View file

@ -297,5 +297,5 @@ struct usbd_class_api lb_api = {
\
USBD_DEFINE_CLASS(loopback_##x, &lb_api, &lb_class_##x);
LISTIFY(CONFIG_USBD_LOOPBACK_DEVICE_COUNT, DEFINE_LOOPBACK_DESCRIPTOR, ())
LISTIFY(CONFIG_USBD_LOOPBACK_DEVICE_COUNT, DEFINE_LOOPBACK_CLASS_DATA, ())
LISTIFY(CONFIG_USBD_LOOPBACK_INSTANCES_COUNT, DEFINE_LOOPBACK_DESCRIPTOR, ())
LISTIFY(CONFIG_USBD_LOOPBACK_INSTANCES_COUNT, DEFINE_LOOPBACK_CLASS_DATA, ())