counter: Add STM32 Timer quadrature encoder
authorBenjamin Gaignard <benjamin.gaignard@st.com>
Tue, 2 Apr 2019 06:30:42 +0000 (15:30 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Apr 2019 19:33:39 +0000 (21:33 +0200)
commitad29937e206f5e3fb7ef0d123902505a680f8969
treeabe5351b277c5a69ff75c9012f05142e1de34926
parent7e798ef90c5f7bf934b8a720eeafd0226c5394e7
counter: Add STM32 Timer quadrature encoder

Implement counter part of the STM32 timer hardware block by using
counter API. Hardware only supports X2 and X4 quadrature modes. A
ceiling value can be set to define the maximum value reachable by the
counter.

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@st.com>
Co-authored-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/counter/Kconfig
drivers/counter/Makefile
drivers/counter/stm32-timer-cnt.c [new file with mode: 0644]