diff options
author | Olivier Moysan <olivier.moysan@foss.st.com> | 2022-12-13 11:27:07 +0100 |
---|---|---|
committer | Thierry Reding <thierry.reding@gmail.com> | 2023-04-06 16:35:01 +0200 |
commit | d0a4564bd024eaa81cab8c7255e7c44230bdd8a2 (patch) | |
tree | b40d147bb43e000c7fd0d5f401e8a9283d60f177 /include/linux/mfd/stm32-timers.h | |
parent | de614ac31955fe20f71021fd5f4a9a811e90028f (diff) |
pwm: stm32: Enforce settings for PWM capture
The PWM capture assumes that the input selector is set to default
input and that the slave mode is disabled. Force reset state for
TISEL and SMCR registers to match this requirement.
Note that slave mode disabling is not a pre-requisite by itself
for capture mode, as hardware supports it for PWM capture.
However, the current implementation of the driver does not
allow slave mode for PWM capture. Setting slave mode for PWM
capture results in wrong capture values.
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Acked-by: Lee Jones <lee@kernel.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
Diffstat (limited to 'include/linux/mfd/stm32-timers.h')
-rw-r--r-- | include/linux/mfd/stm32-timers.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mfd/stm32-timers.h b/include/linux/mfd/stm32-timers.h index 5f5c43fd69dd..1b94325febb3 100644 --- a/include/linux/mfd/stm32-timers.h +++ b/include/linux/mfd/stm32-timers.h @@ -31,6 +31,7 @@ #define TIM_BDTR 0x44 /* Break and Dead-Time Reg */ #define TIM_DCR 0x48 /* DMA control register */ #define TIM_DMAR 0x4C /* DMA register for transfer */ +#define TIM_TISEL 0x68 /* Input Selection */ #define TIM_CR1_CEN BIT(0) /* Counter Enable */ #define TIM_CR1_DIR BIT(4) /* Counter Direction */ |