xref: /linux/drivers/counter/Kconfig (revision 67d91a1e310afa9cbe1bb61169a2d3b8ca40ba67)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
20040a390SWilliam Breathitt Gray#
30040a390SWilliam Breathitt Gray# Counter devices
40040a390SWilliam Breathitt Gray#
50040a390SWilliam Breathitt Gray
60040a390SWilliam Breathitt Graymenuconfig COUNTER
70040a390SWilliam Breathitt Gray	tristate "Counter support"
80040a390SWilliam Breathitt Gray	help
90040a390SWilliam Breathitt Gray	  This enables counter device support through the Generic Counter
100040a390SWilliam Breathitt Gray	  interface. You only need to enable this, if you also want to enable
110040a390SWilliam Breathitt Gray	  one or more of the counter device drivers below.
12f1d8a071SWilliam Breathitt Gray
13f1d8a071SWilliam Breathitt Grayif COUNTER
14f1d8a071SWilliam Breathitt Gray
15f1d8a071SWilliam Breathitt Grayconfig 104_QUAD_8
16f1d8a071SWilliam Breathitt Gray	tristate "ACCES 104-QUAD-8 driver"
1795c211f0SWilliam Breathitt Gray	depends on (PC104 && X86) || COMPILE_TEST
18*67d91a1eSNiklas Schnelle	depends on HAS_IOPORT_MAP
19f1d8a071SWilliam Breathitt Gray	select ISA_BUS_API
20f1d8a071SWilliam Breathitt Gray	help
21f1d8a071SWilliam Breathitt Gray	  Say yes here to build support for the ACCES 104-QUAD-8 quadrature
22f1d8a071SWilliam Breathitt Gray	  encoder counter/interface device family (104-QUAD-8, 104-QUAD-4).
23f1d8a071SWilliam Breathitt Gray
24f1d8a071SWilliam Breathitt Gray	  A counter's respective error flag may be cleared by performing a write
25f1d8a071SWilliam Breathitt Gray	  operation on the respective count value attribute. Although the
26f1d8a071SWilliam Breathitt Gray	  104-QUAD-8 counters have a 25-bit range, only the lower 24 bits may be
277aa2ba0dSWilliam Breathitt Gray	  set, either directly or via the counter's preset attribute.
28f1d8a071SWilliam Breathitt Gray
29f1d8a071SWilliam Breathitt Gray	  The base port addresses for the devices may be configured via the base
307aa2ba0dSWilliam Breathitt Gray	  array module parameter. The interrupt line numbers for the devices may
317aa2ba0dSWilliam Breathitt Gray	  be configured via the irq array module parameter.
32f1d8a071SWilliam Breathitt Gray
33a3b9a999SPatrick Havelangeconfig FTM_QUADDEC
34a3b9a999SPatrick Havelange	tristate "Flex Timer Module Quadrature decoder driver"
353760b49aSPeter Robinson	depends on SOC_LS1021A || COMPILE_TEST
360c75376fSPatrick Havelange	depends on HAS_IOMEM && OF
37a3b9a999SPatrick Havelange	help
38a3b9a999SPatrick Havelange	  Select this option to enable the Flex Timer Quadrature decoder
39a3b9a999SPatrick Havelange	  driver.
40a3b9a999SPatrick Havelange
41a3b9a999SPatrick Havelange	  To compile this driver as a module, choose M here: the
42a3b9a999SPatrick Havelange	  module will be called ftm-quaddec.
43a3b9a999SPatrick Havelange
449c5e51f2SPeter Robinsonconfig INTEL_QEP
459c5e51f2SPeter Robinson	tristate "Intel Quadrature Encoder Peripheral driver"
4692a33370SPeter Robinson	depends on X86
479c5e51f2SPeter Robinson	depends on PCI
489c5e51f2SPeter Robinson	help
499c5e51f2SPeter Robinson	  Select this option to enable the Intel Quadrature Encoder Peripheral
509c5e51f2SPeter Robinson	  driver.
519c5e51f2SPeter Robinson
529c5e51f2SPeter Robinson	  To compile this driver as a module, choose M here: the module
539c5e51f2SPeter Robinson	  will be called intel-qep.
549c5e51f2SPeter Robinson
559c5e51f2SPeter Robinsonconfig INTERRUPT_CNT
569c5e51f2SPeter Robinson	tristate "Interrupt counter driver"
579c5e51f2SPeter Robinson	depends on GPIOLIB
589c5e51f2SPeter Robinson	help
599c5e51f2SPeter Robinson	  Select this option to enable interrupt counter driver. Any interrupt
609c5e51f2SPeter Robinson	  source can be used by this driver as the event source.
619c5e51f2SPeter Robinson
629c5e51f2SPeter Robinson	  To compile this driver as a module, choose M here: the
639c5e51f2SPeter Robinson	  module will be called interrupt-cnt.
649c5e51f2SPeter Robinson
65106b1041SKamel Bouharaconfig MICROCHIP_TCB_CAPTURE
66106b1041SKamel Bouhara	tristate "Microchip Timer Counter Capture driver"
6701f714eeSLukas Bulwahn	depends on SOC_AT91SAM9 || SOC_SAM_V7 || COMPILE_TEST
68106b1041SKamel Bouhara	depends on HAS_IOMEM && OF
69106b1041SKamel Bouhara	select REGMAP_MMIO
70106b1041SKamel Bouhara	help
71106b1041SKamel Bouhara	  Select this option to enable the Microchip Timer Counter Block
72106b1041SKamel Bouhara	  capture driver.
73106b1041SKamel Bouhara
74106b1041SKamel Bouhara	  To compile this driver as a module, choose M here: the
75106b1041SKamel Bouhara	  module will be called microchip-tcb-capture.
76106b1041SKamel Bouhara
770be89073SBiju Dasconfig RZ_MTU3_CNT
780be89073SBiju Das	tristate "Renesas RZ/G2L MTU3a counter driver"
790be89073SBiju Das	depends on RZ_MTU3 || COMPILE_TEST
800be89073SBiju Das	help
810be89073SBiju Das	  Enable support for MTU3a counter driver found on Renesas RZ/G2L alike
820be89073SBiju Das	  SoCs. This IP supports both 16-bit and 32-bit phase counting mode
830be89073SBiju Das	  support.
840be89073SBiju Das
850be89073SBiju Das	  To compile this driver as a module, choose M here: the
860be89073SBiju Das	  module will be called rz-mtu3-cnt.
870be89073SBiju Das
889c5e51f2SPeter Robinsonconfig STM32_LPTIMER_CNT
899c5e51f2SPeter Robinson	tristate "STM32 LP Timer encoder counter driver"
909c5e51f2SPeter Robinson	depends on MFD_STM32_LPTIMER || COMPILE_TEST
91b711f687SJarkko Nikula	help
929c5e51f2SPeter Robinson	  Select this option to enable STM32 Low-Power Timer quadrature encoder
939c5e51f2SPeter Robinson	  and counter driver.
94b711f687SJarkko Nikula
959c5e51f2SPeter Robinson	  To compile this driver as a module, choose M here: the
969c5e51f2SPeter Robinson	  module will be called stm32-lptimer-cnt.
979c5e51f2SPeter Robinson
989c5e51f2SPeter Robinsonconfig STM32_TIMER_CNT
999c5e51f2SPeter Robinson	tristate "STM32 Timer encoder counter driver"
1009c5e51f2SPeter Robinson	depends on MFD_STM32_TIMERS || COMPILE_TEST
1019c5e51f2SPeter Robinson	help
1029c5e51f2SPeter Robinson	  Select this option to enable STM32 Timer quadrature encoder
1039c5e51f2SPeter Robinson	  and counter driver.
1049c5e51f2SPeter Robinson
1059c5e51f2SPeter Robinson	  To compile this driver as a module, choose M here: the
1069c5e51f2SPeter Robinson	  module will be called stm32-timer-cnt.
107b711f687SJarkko Nikula
1084e2f42aaSJulien Panisconfig TI_ECAP_CAPTURE
1094e2f42aaSJulien Panis	tristate "TI eCAP capture driver"
1104e2f42aaSJulien Panis	depends on ARCH_OMAP2PLUS || ARCH_DAVINCI_DA8XX || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
1114e2f42aaSJulien Panis	depends on HAS_IOMEM
1124e2f42aaSJulien Panis	select REGMAP_MMIO
1134e2f42aaSJulien Panis	help
1144e2f42aaSJulien Panis	  Select this option to enable the Texas Instruments Enhanced Capture
1154e2f42aaSJulien Panis	  (eCAP) driver in input mode.
1164e2f42aaSJulien Panis
1174e2f42aaSJulien Panis	  It can be used to timestamp events (falling/rising edges) detected
1184e2f42aaSJulien Panis	  on ECAP input signal.
1194e2f42aaSJulien Panis
1204e2f42aaSJulien Panis	  To compile this driver as a module, choose M here: the module
1214e2f42aaSJulien Panis	  will be called ti-ecap-capture.
1224e2f42aaSJulien Panis
1239c5e51f2SPeter Robinsonconfig TI_EQEP
1249c5e51f2SPeter Robinson	tristate "TI eQEP counter driver"
1259c5e51f2SPeter Robinson	depends on (SOC_AM33XX || COMPILE_TEST)
1269c5e51f2SPeter Robinson	select REGMAP_MMIO
1279c5e51f2SPeter Robinson	help
1289c5e51f2SPeter Robinson	  Select this option to enable the Texas Instruments Enhanced Quadrature
1299c5e51f2SPeter Robinson	  Encoder Pulse (eQEP) counter driver.
1309c5e51f2SPeter Robinson
1319c5e51f2SPeter Robinson	  To compile this driver as a module, choose M here: the module will be
1329c5e51f2SPeter Robinson	  called ti-eqep.
1339c5e51f2SPeter Robinson
134f1d8a071SWilliam Breathitt Grayendif # COUNTER
135