Skip to content
Commit 3328d7cb authored by Mathieu Choplain's avatar Mathieu Choplain Committed by Alberto Escolar
Browse files

drivers: adc: stm32: don't fail init if pinctrl is not provided



Commit 47187a9e made the `pinctrl` property
of STM32 ADCs optional, to allow usage of internal channels without wasting
GPIO pins. However, the driver was not adapted to support this new usecase.

(The real bug comes from commit 93956b20,
that transitioned from a custom `stm32_dt_pinctrl_configure` function to
the standard `pinctrl_apply_state`, without accounting for the fact that
the former returns 0 when pinctrl is empty, but the latter returns -ENOENT)

Modify the driver to work even if no `pinctrl` is present on the ADC node.

Signed-off-by: default avatarMathieu Choplain <mathieu.choplain@st.com>
parent 0bca1958
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment