Skip to content
Commit 48402830 authored by Guillaume Gautier's avatar Guillaume Gautier Committed by Fabio Baltieri
Browse files

drivers: adc: stm32: use dts to set the clock prescaler



Now that everything is in place, the prescaler value picked from dts is
used to properly configure the clock.
The code is moved into its own function.
There are four main cases:
- F1 and F37x don't have prescaler (in ADC register) so nothing is done.
- F0 only has individual registers.
- C0, G0, L0, WB1x and WL have both invidual and common registers. The
  individual one is used to define either synchronous mode with its
  prescaler, or asynchronous mode. The common one is only used to store
  the value of the asynchronous prescaler.
- All others only have a common register where both the mode and the
  prescaler is stored.

Signed-off-by: default avatarGuillaume Gautier <guillaume.gautier-ext@st.com>
parent e8c49906
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment