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.
Fixes: 53e38fe73f ("pwm: stm32: Add capture support")
Signed-off-by: Olivier Moysan <olivier.moysan@foss.st.com>
Change-Id: Idc07958b5ae709063e11b711c93f7f9fbf2ed37f
Reviewed-on: https://gerrit.st.com/c/mpu/oe/st/linux-stm32/+/188885
Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
Reviewed-by: Olivier MOYSAN <olivier.moysan@st.com>
Reviewed-by: Fabrice GASNIER <fabrice.gasnier@st.com>
Tested-by: Olivier MOYSAN <olivier.moysan@st.com>