Skip to content

Commit d6a8bd5

Browse files
tmon-nordickartben
authored andcommitted
usb: device_next: Change speed selection Kconfig dependency
In my opinion, the user is supposed to configure the speed of the stack and drivers ough to honor that choice. However current Zephyr USB maintainer imposes that the dependency is the other way round, i.e. that user first needs to disable High-Speed chirp at driver level and only then can select Full-Speed only operation. Adhere to the arbitrarily set up rule to allow this really necessary functionality to enter Zephyr. I consider this change to be harmful because it opens up a Kconfig trap that allows configuring High-Speed capable stack with a device driver limited to Full-Speed only operation. Signed-off-by: Tomasz Moń <[email protected]>
1 parent 79f2615 commit d6a8bd5

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

drivers/usb/udc/Kconfig

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ config UDC_DRIVER_HAS_HIGH_SPEED_SUPPORT
1515
bool
1616

1717
config UDC_DRIVER_HIGH_SPEED_SUPPORT_ENABLED
18-
bool
18+
bool "Allow High-Speed chirp"
19+
default y if UDC_DRIVER_HAS_HIGH_SPEED_SUPPORT
20+
help
21+
Allow High-Speed capable device to operate at High-Speed. Disable this
22+
option to force Full-Speed only operation.
1923

2024
config UDC_BUF_COUNT
2125
int "Number of buffers in the pool"

subsys/usb/device_next/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ choice USBD_MAX_SPEED_CHOICE
2424
config USBD_MAX_SPEED_HIGH
2525
bool "High-Speed"
2626
depends on UDC_DRIVER_HAS_HIGH_SPEED_SUPPORT
27-
select UDC_DRIVER_HIGH_SPEED_SUPPORT_ENABLED
2827

2928
config USBD_MAX_SPEED_FULL
3029
bool "Full-Speed"
30+
depends on !UDC_DRIVER_HIGH_SPEED_SUPPORT_ENABLED
3131

3232
endchoice
3333

0 commit comments

Comments
 (0)