Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions drivers/usb/device/usb_dc_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,11 @@ static const struct gpio_dt_spec ulpi_reset =
#define HIGH_SPEED USB_OTG_SPEED_HIGH
#endif

#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_usb)
#define FULL_SPEED PCD_SPEED_FULL
#else
#define FULL_SPEED USB_OTG_SPEED_FULL
#endif
/*
* USB, USB_OTG_FS and USB_DRD_FS are defined in STM32Cube HAL and allows to
* distinguish between two kind of USB DC. STM32 F0, F3, L0 and G4 series
Expand Down
4 changes: 4 additions & 0 deletions drivers/usb/udc/udc_stm32.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ LOG_MODULE_REGISTER(udc_stm32, CONFIG_UDC_DRIVER_LOG_LEVEL);
#define HIGH_SPEED USB_OTG_SPEED_HIGH
#endif

#if DT_HAS_COMPAT_STATUS_OKAY(st_stm32_usb)
#define FULL_SPEED PCD_SPEED_FULL
#else
#define FULL_SPEED USB_OTG_SPEED_FULL
#endif
Comment on lines +53 to +57
Copy link
Contributor

Choose a reason for hiding this comment

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

HIGH_SPEED/FULL_SPEED is a very bad choice. I see this was introduced in 01ddccd. No idea how this could get enough approvals and be merged. Not that there are no macros that are already prefixed correctly with UDC_STM32_.

Copy link
Member

Choose a reason for hiding this comment

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

@jfischer-no so you are suggesting these should be renamed to UDC_STM32_FULL_SPEED and UDC_STM32_FULL_SPEED? Not super clear to me from your comment, trying to land this to an approvable state with few turnarounds since it break the build for load of platforms.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes.

it break the build for load of platforms.

Just revert #86922

Copy link
Member

Choose a reason for hiding this comment

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

Thanks, I think it's fine to wait for a fix forward no need to rush a revert, just wanted to go straight to the right fix.

Copy link
Member

Choose a reason for hiding this comment

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

Just revert #86922

Given that there's still no progress on this, I suggest we perform a revert. This is breaking downstream users/CI.

Copy link
Contributor

Choose a reason for hiding this comment

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

Outdated, should be fixed by #88244


struct udc_stm32_data {
PCD_HandleTypeDef pcd;
Expand Down