Skip to content

Commit bd73879

Browse files
erwangogalak
authored andcommitted
drivers/gpio: stm32: Remove redundant AFIO bit for STM32F1
Specific code is present GPIO_DEVICE_INIT_STM32 in GPIO_DEVICE_INIT_STM32 to handle LL_APB2_GRP1_PERIPH_AFIO bit. Though, this bit is already included in device tree information, in clocks property, 'bits' field, which carries for each GPIO, both LL_APB2_GRP1_PERIPH_GPIOX and LL_APB2_GRP1_PERIPH_AFIO. Hence, it is already taken into account in CONFIG_GPIO_STM32_GPIO##__SUFFIX##_CLOCK_BITS and it is redundant to handle it in GPIO_DEVICE_INIT_STM32 macro. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent a45212a commit bd73879

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

drivers/gpio/gpio_stm32.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,18 +211,11 @@ DEVICE_AND_API_INIT(gpio_stm32_## __suffix, \
211211
&gpio_stm32_driver);
212212

213213

214-
#ifdef CONFIG_SOC_SERIES_STM32F1X
215-
#define GPIO_STM32_EXTRA_CLOCK_BITS LL_APB2_GRP1_PERIPH_AFIO
216-
#else
217-
#define GPIO_STM32_EXTRA_CLOCK_BITS 0u
218-
#endif /* CONFIG_SOC_SERIES_STM32F1X */
219-
220214
#define GPIO_DEVICE_INIT_STM32(__suffix, __SUFFIX) \
221215
GPIO_DEVICE_INIT(CONFIG_GPIO_STM32_GPIO##__SUFFIX##_LABEL, \
222216
__suffix, \
223217
CONFIG_GPIO_STM32_GPIO##__SUFFIX##_BASE_ADDRESS, \
224218
STM32_PORT##__SUFFIX, \
225-
GPIO_STM32_EXTRA_CLOCK_BITS | \
226219
CONFIG_GPIO_STM32_GPIO##__SUFFIX##_CLOCK_BITS, \
227220
CONFIG_GPIO_STM32_GPIO##__SUFFIX##_CLOCK_BUS)
228221

0 commit comments

Comments
 (0)