summaryrefslogtreecommitdiff
path: root/include/linux/mfd/stm32-timers.h
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@st.com>2018-05-16 09:36:00 +0200
committerLee Jones <lee.jones@linaro.org>2018-05-16 09:11:19 +0100
commitab3a897847834bf3e864fb07b733c444895a24ba (patch)
treeb451c46ce5f7250e455fd71a3598267b8a7f5514 /include/linux/mfd/stm32-timers.h
parentd66ffb91c374fc500fe666645184e278774bad38 (diff)
pwm: stm32: Use input prescaler to improve period capture
Using input prescaler, capture unit will trigger DMA once every configurable /2, /4 or /8 events (rising edge). This helps improve period (only) capture accuracy at high rates. Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com> Reviewed-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Acked-by: Thierry Reding <thierry.reding@gmail.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'include/linux/mfd/stm32-timers.h')
-rw-r--r--include/linux/mfd/stm32-timers.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mfd/stm32-timers.h b/include/linux/mfd/stm32-timers.h
index d46f5500928e..9da1d7ece079 100644
--- a/include/linux/mfd/stm32-timers.h
+++ b/include/linux/mfd/stm32-timers.h
@@ -82,6 +82,7 @@
#define TIM_DCR_DBL GENMASK(12, 8) /* DMA burst len */
#define MAX_TIM_PSC 0xFFFF
+#define MAX_TIM_ICPSC 0x3
#define TIM_CR2_MMS_SHIFT 4
#define TIM_CR2_MMS2_SHIFT 20
#define TIM_SMCR_TS_SHIFT 4