Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. (cherry picked from commit 4840283) Original-Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com> GitOrigin-RevId: 4840283 Change-Id: Ibd2e89f5f852dc9e13bc41be7253a0b6b32f8966 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/4822199 Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com> Tested-by: Yuval Peress <peress@google.com> Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com>
- Loading branch information