zephyr/arch/arm/soc/st_stm32/stm32f0
Aurelien Jarno 7688f49065 drivers: usb_dc_stm32: change all endpoints to bidirectional
The various STM32 reference manuals sometimes define the USB endpoints
as IN or OUT only and sometimes as bidirectional, even in the same
manual. This is likely because the OTG implementation has one set of
registers for the IN endpoints and one other set for OUT endpoints.
However at the end a given endpoint address can both transmit and
receive data.

This causes some confusion how to declare the endpoints in the device
tree, and depending on the SoC, they are either the same number of IN
and OUT endpoints declared, or they are declared as bidirectional. At
the end it doesn't really matter given how the driver uses those values:

    #define NUM_IN_EP (CONFIG_USB_NUM_BIDIR_ENDPOINTS + \
                       CONFIG_USB_NUM_IN_ENDPOINTS)

    #define NUM_OUT_EP (CONFIG_USB_NUM_BIDIR_ENDPOINTS + \
                        CONFIG_USB_NUM_OUT_ENDPOINTS)

    #define NUM_BIDIR_EP NUM_OUT_EP

This patch therefore cleanup the driver, the DTS, and the DTS fixups to
only define the number of bidirectional endpoints.

In addition to the cleanup, that fixes a regression introduced by commit
52eacf16a2 ("driver: usb: add check for endpoint capabilities"), which
introduced a wrong check for SoC only defining the number of
bidirectional endpoints.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2018-06-18 15:24:15 -04:00
..
CMakeLists.txt cmake: Use path-corrected version of ZEPHYR_BASE 2018-01-11 14:59:03 -05:00
Kconfig.defconfig.series soc: defconfig.series: Consistently quote string defaults 2018-05-26 19:17:48 -04:00
Kconfig.defconfig.stm32f030x8 soc: defconfig: Consistently quote string defaults 2018-05-26 19:17:48 -04:00
Kconfig.defconfig.stm32f051x8 soc: defconfig: Consistently quote string defaults 2018-05-26 19:17:48 -04:00
Kconfig.defconfig.stm32f070xb soc: defconfig: Consistently quote string defaults 2018-05-26 19:17:48 -04:00
Kconfig.defconfig.stm32f072xb soc: defconfig: Consistently quote string defaults 2018-05-26 19:17:48 -04:00
Kconfig.defconfig.stm32f091xc soc: defconfig: Consistently quote string defaults 2018-05-26 19:17:48 -04:00
Kconfig.series arch: arm: Refactor CONFIG_CORTEX_M 2018-03-10 11:42:25 -06:00
Kconfig.soc arch: arm: soc: stm32f0: add STM32F070XB SOC 2018-03-16 09:18:08 -05:00
dts.fixup drivers: usb_dc_stm32: change all endpoints to bidirectional 2018-06-18 15:24:15 -04:00
flash_registers.h ARM: stm32f0: switch flash registers to volatile 2017-12-12 12:36:08 -06:00
gpio_registers.h ARM: stm32f0: fix syscfg mapping to fix EXTI config 2017-12-07 08:08:41 -06:00
linker.ld arch: arm: soc: provide support for stm32f0. 2017-10-23 12:31:47 +02:00
soc.c arch/soc/st_stm32: Move STM32Cube HAL core funtions 2018-05-13 10:52:12 -05:00
soc.h arch/stm32: remove irq definition files 2018-06-13 11:43:56 +02:00
soc_gpio.c drivers/stm32f0x_ll_clock: Enable SYSCFG in clock_control 2018-05-14 09:45:40 -05:00
soc_registers.h arch: arm: soc: provide support for stm32f0. 2017-10-23 12:31:47 +02:00