summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFabrice Gasnier <fabrice.gasnier@st.com>2018-05-16 10:36:00 +0300
committerLee Jones <lee.jones@linaro.org>2018-05-16 11:11:19 +0300
commitab3a897847834bf3e864fb07b733c444895a24ba (patch)
treeb451c46ce5f7250e455fd71a3598267b8a7f5514 /include
parentd66ffb91c374fc500fe666645184e278774bad38 (diff)
downloadlinux-ab3a897847834bf3e864fb07b733c444895a24ba.tar.xz
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')
-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