Fabrice Gasnier 53e38fe73f pwm: stm32: Add capture support
Add support for PMW input mode on pwm-stm32. STM32 timers support
period and duty cycle capture as long as they have at least two PWM
channels. One capture channel is used for period (rising-edge), one
for duty-cycle (falling-edge).
When there's only one channel available, only period can be captured.
Duty-cycle is simply zero'ed in such a case.

Capture requires exclusive access (e.g. no pwm output running at the
same time, to protect common prescaler).
Timer DMA burst mode (from MFD core) is being used, to take two
snapshots of capture registers (upon each period rising edge).

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>
2018-05-16 09:10:53 +01:00
..
2018-04-12 11:04:35 -07:00
2018-05-16 09:10:53 +01:00
2018-04-10 10:10:30 -07:00
2018-04-05 15:05:53 -07:00
2018-04-05 21:29:35 -07:00
2018-04-05 10:42:07 -07:00
2018-04-12 12:55:50 -07:00