drivers: gpio: fix gpio warning
Implement conditional compilation to avoid the warning: - Use LL_PWR_EnableVDDIO2() for STM32U3 series. - Use LL_PWR_EnableVddIO2() for other series. Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
This commit is contained in:
parent
9b23a73184
commit
a9aa341ed5
1 changed files with 5 additions and 1 deletions
|
@ -722,8 +722,12 @@ static int gpio_stm32_init(const struct device *dev)
|
||||||
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpiog))
|
DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpiog))
|
||||||
z_stm32_hsem_lock(CFG_HW_RCC_SEMID, HSEM_LOCK_DEFAULT_RETRY);
|
z_stm32_hsem_lock(CFG_HW_RCC_SEMID, HSEM_LOCK_DEFAULT_RETRY);
|
||||||
/* Port G[15:2] requires external power supply */
|
/* Port G[15:2] requires external power supply */
|
||||||
/* Cf: L4/L5 RM, Chapter "Independent I/O supply rail" */
|
/* Cf: L4/L5/U3 RM, Chapter "Independent I/O supply rail" */
|
||||||
|
#ifdef CONFIG_SOC_SERIES_STM32U3X
|
||||||
|
LL_PWR_EnableVDDIO2();
|
||||||
|
#else
|
||||||
LL_PWR_EnableVddIO2();
|
LL_PWR_EnableVddIO2();
|
||||||
|
#endif
|
||||||
z_stm32_hsem_unlock(CFG_HW_RCC_SEMID);
|
z_stm32_hsem_unlock(CFG_HW_RCC_SEMID);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue