Skip to content

drivers: usb: udc: Reduce unnecessary ep config lookups#87480

Merged
kartben merged 1 commit intozephyrproject-rtos:mainfrom
tmon-nordic:epcfg
Mar 31, 2025
Merged

drivers: usb: udc: Reduce unnecessary ep config lookups#87480
kartben merged 1 commit intozephyrproject-rtos:mainfrom
tmon-nordic:epcfg

Conversation

@tmon-nordic
Copy link
Contributor

UDC API passes struct udc_ep_config to all functions. Some UDC functions were using endpoint config structure while some were using device and endpoint number. This API inconsistency led to completely unnecessary endpoint structure lookups. Remove unnecessary lookups by using endpoint config structure pointer where it makes sense.

AlessandroLuo
AlessandroLuo previously approved these changes Mar 24, 2025
Copy link
Contributor

@zeonchew zeonchew left a comment

Choose a reason for hiding this comment

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

Changes for udc_ambiq.c looks good to me.

@carlescufi
Copy link
Member

@tmon-nordic please rebase

UDC API passes struct udc_ep_config to all functions. Some UDC functions
were using endpoint config structure while some were using device and
endpoint number. This API inconsistency led to completely unnecessary
endpoint structure lookups. Remove unnecessary lookups by using endpoint
config structure pointer where it makes sense.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
@kartben kartben merged commit 1cccf28 into zephyrproject-rtos:main Mar 31, 2025
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: USB Universal Serial Bus platform: Ambiq Ambiq platform: NXP Drivers NXP Semiconductors, drivers platform: STM32 ST Micro STM32

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants

Comments