Commit ad29937e authored by Benjamin Gaignard's avatar Benjamin Gaignard Committed by Greg Kroah-Hartman

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: default avatarBenjamin Gaignard <benjamin.gaignard@st.com>
Co-authored-by: default avatarFabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: default avatarWilliam Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7e798ef9
......@@ -28,4 +28,14 @@ config 104_QUAD_8
The base port addresses for the devices may be configured via the base
array module parameter.
config STM32_TIMER_CNT
tristate "STM32 Timer encoder counter driver"
depends on MFD_STM32_TIMERS || COMPILE_TEST
help
Select this option to enable STM32 Timer quadrature encoder
and counter driver.
To compile this driver as a module, choose M here: the
module will be called stm32-timer-cnt.
endif # COUNTER
......@@ -5,3 +5,4 @@
obj-$(CONFIG_COUNTER) += counter.o
obj-$(CONFIG_104_QUAD_8) += 104-quad-8.o
obj-$(CONFIG_STM32_TIMER_CNT) += stm32-timer-cnt.o
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment