xref: /linux/drivers/counter/Kconfig (revision 3760b49af5bc773a1679cd2e9dbef3c2532726af)
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
18f1d8a071SWilliam Breathitt Gray	select ISA_BUS_API
19f1d8a071SWilliam Breathitt Gray	help
20f1d8a071SWilliam Breathitt Gray	  Say yes here to build support for the ACCES 104-QUAD-8 quadrature
21f1d8a071SWilliam Breathitt Gray	  encoder counter/interface device family (104-QUAD-8, 104-QUAD-4).
22f1d8a071SWilliam Breathitt Gray
23f1d8a071SWilliam Breathitt Gray	  A counter's respective error flag may be cleared by performing a write
24f1d8a071SWilliam Breathitt Gray	  operation on the respective count value attribute. Although the
25f1d8a071SWilliam Breathitt Gray	  104-QUAD-8 counters have a 25-bit range, only the lower 24 bits may be
267aa2ba0dSWilliam Breathitt Gray	  set, either directly or via the counter's preset attribute.
27f1d8a071SWilliam Breathitt Gray
28f1d8a071SWilliam Breathitt Gray	  The base port addresses for the devices may be configured via the base
297aa2ba0dSWilliam Breathitt Gray	  array module parameter. The interrupt line numbers for the devices may
307aa2ba0dSWilliam Breathitt Gray	  be configured via the irq array module parameter.
31f1d8a071SWilliam Breathitt Gray
32a3b9a999SPatrick Havelangeconfig FTM_QUADDEC
33a3b9a999SPatrick Havelange	tristate "Flex Timer Module Quadrature decoder driver"
34*3760b49aSPeter Robinson	depends on SOC_LS1021A || COMPILE_TEST
350c75376fSPatrick Havelange	depends on HAS_IOMEM && OF
36a3b9a999SPatrick Havelange	help
37a3b9a999SPatrick Havelange	  Select this option to enable the Flex Timer Quadrature decoder
38a3b9a999SPatrick Havelange	  driver.
39a3b9a999SPatrick Havelange
40a3b9a999SPatrick Havelange	  To compile this driver as a module, choose M here: the
41a3b9a999SPatrick Havelange	  module will be called ftm-quaddec.
42a3b9a999SPatrick Havelange
439c5e51f2SPeter Robinsonconfig INTEL_QEP
449c5e51f2SPeter Robinson	tristate "Intel Quadrature Encoder Peripheral driver"
4592a33370SPeter Robinson	depends on X86
469c5e51f2SPeter Robinson	depends on PCI
479c5e51f2SPeter Robinson	help
489c5e51f2SPeter Robinson	  Select this option to enable the Intel Quadrature Encoder Peripheral
499c5e51f2SPeter Robinson	  driver.
509c5e51f2SPeter Robinson
519c5e51f2SPeter Robinson	  To compile this driver as a module, choose M here: the module
529c5e51f2SPeter Robinson	  will be called intel-qep.
539c5e51f2SPeter Robinson
549c5e51f2SPeter Robinsonconfig INTERRUPT_CNT
559c5e51f2SPeter Robinson	tristate "Interrupt counter driver"
569c5e51f2SPeter Robinson	depends on GPIOLIB
579c5e51f2SPeter Robinson	help
589c5e51f2SPeter Robinson	  Select this option to enable interrupt counter driver. Any interrupt
599c5e51f2SPeter Robinson	  source can be used by this driver as the event source.
609c5e51f2SPeter Robinson
619c5e51f2SPeter Robinson	  To compile this driver as a module, choose M here: the
629c5e51f2SPeter Robinson	  module will be called interrupt-cnt.
639c5e51f2SPeter Robinson
64106b1041SKamel Bouharaconfig MICROCHIP_TCB_CAPTURE
65106b1041SKamel Bouhara	tristate "Microchip Timer Counter Capture driver"
66106b1041SKamel Bouhara	depends on HAS_IOMEM && OF
67106b1041SKamel Bouhara	select REGMAP_MMIO
68106b1041SKamel Bouhara	help
69106b1041SKamel Bouhara	  Select this option to enable the Microchip Timer Counter Block
70106b1041SKamel Bouhara	  capture driver.
71106b1041SKamel Bouhara
72106b1041SKamel Bouhara	  To compile this driver as a module, choose M here: the
73106b1041SKamel Bouhara	  module will be called microchip-tcb-capture.
74106b1041SKamel Bouhara
759c5e51f2SPeter Robinsonconfig STM32_LPTIMER_CNT
769c5e51f2SPeter Robinson	tristate "STM32 LP Timer encoder counter driver"
779c5e51f2SPeter Robinson	depends on MFD_STM32_LPTIMER || COMPILE_TEST
78b711f687SJarkko Nikula	help
799c5e51f2SPeter Robinson	  Select this option to enable STM32 Low-Power Timer quadrature encoder
809c5e51f2SPeter Robinson	  and counter driver.
81b711f687SJarkko Nikula
829c5e51f2SPeter Robinson	  To compile this driver as a module, choose M here: the
839c5e51f2SPeter Robinson	  module will be called stm32-lptimer-cnt.
849c5e51f2SPeter Robinson
859c5e51f2SPeter Robinsonconfig STM32_TIMER_CNT
869c5e51f2SPeter Robinson	tristate "STM32 Timer encoder counter driver"
879c5e51f2SPeter Robinson	depends on MFD_STM32_TIMERS || COMPILE_TEST
889c5e51f2SPeter Robinson	help
899c5e51f2SPeter Robinson	  Select this option to enable STM32 Timer quadrature encoder
909c5e51f2SPeter Robinson	  and counter driver.
919c5e51f2SPeter Robinson
929c5e51f2SPeter Robinson	  To compile this driver as a module, choose M here: the
939c5e51f2SPeter Robinson	  module will be called stm32-timer-cnt.
94b711f687SJarkko Nikula
954e2f42aaSJulien Panisconfig TI_ECAP_CAPTURE
964e2f42aaSJulien Panis	tristate "TI eCAP capture driver"
974e2f42aaSJulien Panis	depends on ARCH_OMAP2PLUS || ARCH_DAVINCI_DA8XX || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
984e2f42aaSJulien Panis	depends on HAS_IOMEM
994e2f42aaSJulien Panis	select REGMAP_MMIO
1004e2f42aaSJulien Panis	help
1014e2f42aaSJulien Panis	  Select this option to enable the Texas Instruments Enhanced Capture
1024e2f42aaSJulien Panis	  (eCAP) driver in input mode.
1034e2f42aaSJulien Panis
1044e2f42aaSJulien Panis	  It can be used to timestamp events (falling/rising edges) detected
1054e2f42aaSJulien Panis	  on ECAP input signal.
1064e2f42aaSJulien Panis
1074e2f42aaSJulien Panis	  To compile this driver as a module, choose M here: the module
1084e2f42aaSJulien Panis	  will be called ti-ecap-capture.
1094e2f42aaSJulien Panis
1109c5e51f2SPeter Robinsonconfig TI_EQEP
1119c5e51f2SPeter Robinson	tristate "TI eQEP counter driver"
1129c5e51f2SPeter Robinson	depends on (SOC_AM33XX || COMPILE_TEST)
1139c5e51f2SPeter Robinson	select REGMAP_MMIO
1149c5e51f2SPeter Robinson	help
1159c5e51f2SPeter Robinson	  Select this option to enable the Texas Instruments Enhanced Quadrature
1169c5e51f2SPeter Robinson	  Encoder Pulse (eQEP) counter driver.
1179c5e51f2SPeter Robinson
1189c5e51f2SPeter Robinson	  To compile this driver as a module, choose M here: the module will be
1199c5e51f2SPeter Robinson	  called ti-eqep.
1209c5e51f2SPeter Robinson
121f1d8a071SWilliam Breathitt Grayendif # COUNTER
122