1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 20040a390SWilliam Breathitt Gray# 30040a390SWilliam Breathitt Gray# Counter devices 40040a390SWilliam Breathitt Gray# 50040a390SWilliam Breathitt Gray 6d4284874SWilliam Breathitt Grayconfig I8254 7d4284874SWilliam Breathitt Gray tristate 8d4284874SWilliam Breathitt Gray select COUNTER 9d4284874SWilliam Breathitt Gray select REGMAP 10d4284874SWilliam Breathitt Gray help 11d4284874SWilliam Breathitt Gray Enables support for the i8254 interface library functions. The i8254 12d4284874SWilliam Breathitt Gray interface library provides functions to facilitate communication with 13d4284874SWilliam Breathitt Gray interfaces compatible with the venerable Intel 8254 Programmable 14d4284874SWilliam Breathitt Gray Interval Timer (PIT). The Intel 825x family of chips was first 15d4284874SWilliam Breathitt Gray released in the early 1980s but compatible interfaces are nowadays 16d4284874SWilliam Breathitt Gray typically found embedded in larger VLSI processing chips and FPGA 17d4284874SWilliam Breathitt Gray components. 18d4284874SWilliam Breathitt Gray 19d4284874SWilliam Breathitt Gray If built as a module its name will be i8254. 20d4284874SWilliam Breathitt Gray 21*9b53a134SWilliam Breathitt Graymenuconfig COUNTER 22*9b53a134SWilliam Breathitt Gray tristate "Counter support" 23*9b53a134SWilliam Breathitt Gray help 24*9b53a134SWilliam Breathitt Gray This enables counter device support through the Generic Counter 25*9b53a134SWilliam Breathitt Gray interface. You only need to enable this, if you also want to enable 26*9b53a134SWilliam Breathitt Gray one or more of the counter device drivers below. 27*9b53a134SWilliam Breathitt Gray 28f1d8a071SWilliam Breathitt Grayif COUNTER 29f1d8a071SWilliam Breathitt Gray 30f1d8a071SWilliam Breathitt Grayconfig 104_QUAD_8 31f1d8a071SWilliam Breathitt Gray tristate "ACCES 104-QUAD-8 driver" 3295c211f0SWilliam Breathitt Gray depends on (PC104 && X86) || COMPILE_TEST 33f1d8a071SWilliam Breathitt Gray select ISA_BUS_API 3498ffe025SWilliam Breathitt Gray select REGMAP_MMIO 35f1d8a071SWilliam Breathitt Gray help 36f1d8a071SWilliam Breathitt Gray Say yes here to build support for the ACCES 104-QUAD-8 quadrature 37f1d8a071SWilliam Breathitt Gray encoder counter/interface device family (104-QUAD-8, 104-QUAD-4). 38f1d8a071SWilliam Breathitt Gray 39f1d8a071SWilliam Breathitt Gray A counter's respective error flag may be cleared by performing a write 40a4ec431fSWilliam Breathitt Gray operation on the respective count value attribute. The 104-QUAD-8 41a4ec431fSWilliam Breathitt Gray counters may be set either directly or via the counter's preset 42a4ec431fSWilliam Breathitt Gray attribute. 43f1d8a071SWilliam Breathitt Gray 44f1d8a071SWilliam Breathitt Gray The base port addresses for the devices may be configured via the base 457aa2ba0dSWilliam Breathitt Gray array module parameter. The interrupt line numbers for the devices may 467aa2ba0dSWilliam Breathitt Gray be configured via the irq array module parameter. 47f1d8a071SWilliam Breathitt Gray 48a3b9a999SPatrick Havelangeconfig FTM_QUADDEC 49a3b9a999SPatrick Havelange tristate "Flex Timer Module Quadrature decoder driver" 503760b49aSPeter Robinson depends on SOC_LS1021A || COMPILE_TEST 510c75376fSPatrick Havelange depends on HAS_IOMEM && OF 52a3b9a999SPatrick Havelange help 53a3b9a999SPatrick Havelange Select this option to enable the Flex Timer Quadrature decoder 54a3b9a999SPatrick Havelange driver. 55a3b9a999SPatrick Havelange 56a3b9a999SPatrick Havelange To compile this driver as a module, choose M here: the 57a3b9a999SPatrick Havelange module will be called ftm-quaddec. 58a3b9a999SPatrick Havelange 599c5e51f2SPeter Robinsonconfig INTEL_QEP 609c5e51f2SPeter Robinson tristate "Intel Quadrature Encoder Peripheral driver" 6192a33370SPeter Robinson depends on X86 629c5e51f2SPeter Robinson depends on PCI 639c5e51f2SPeter Robinson help 649c5e51f2SPeter Robinson Select this option to enable the Intel Quadrature Encoder Peripheral 659c5e51f2SPeter Robinson driver. 669c5e51f2SPeter Robinson 679c5e51f2SPeter Robinson To compile this driver as a module, choose M here: the module 689c5e51f2SPeter Robinson will be called intel-qep. 699c5e51f2SPeter Robinson 709c5e51f2SPeter Robinsonconfig INTERRUPT_CNT 719c5e51f2SPeter Robinson tristate "Interrupt counter driver" 729c5e51f2SPeter Robinson depends on GPIOLIB 739c5e51f2SPeter Robinson help 749c5e51f2SPeter Robinson Select this option to enable interrupt counter driver. Any interrupt 759c5e51f2SPeter Robinson source can be used by this driver as the event source. 769c5e51f2SPeter Robinson 779c5e51f2SPeter Robinson To compile this driver as a module, choose M here: the 789c5e51f2SPeter Robinson module will be called interrupt-cnt. 799c5e51f2SPeter Robinson 80106b1041SKamel Bouharaconfig MICROCHIP_TCB_CAPTURE 81106b1041SKamel Bouhara tristate "Microchip Timer Counter Capture driver" 8201f714eeSLukas Bulwahn depends on SOC_AT91SAM9 || SOC_SAM_V7 || COMPILE_TEST 83106b1041SKamel Bouhara depends on HAS_IOMEM && OF 84106b1041SKamel Bouhara select REGMAP_MMIO 85106b1041SKamel Bouhara help 86106b1041SKamel Bouhara Select this option to enable the Microchip Timer Counter Block 87106b1041SKamel Bouhara capture driver. 88106b1041SKamel Bouhara 89106b1041SKamel Bouhara To compile this driver as a module, choose M here: the 90106b1041SKamel Bouhara module will be called microchip-tcb-capture. 91106b1041SKamel Bouhara 920be89073SBiju Dasconfig RZ_MTU3_CNT 930be89073SBiju Das tristate "Renesas RZ/G2L MTU3a counter driver" 940be89073SBiju Das depends on RZ_MTU3 || COMPILE_TEST 950be89073SBiju Das help 960be89073SBiju Das Enable support for MTU3a counter driver found on Renesas RZ/G2L alike 970be89073SBiju Das SoCs. This IP supports both 16-bit and 32-bit phase counting mode 980be89073SBiju Das support. 990be89073SBiju Das 1000be89073SBiju Das To compile this driver as a module, choose M here: the 1010be89073SBiju Das module will be called rz-mtu3-cnt. 1020be89073SBiju Das 1039c5e51f2SPeter Robinsonconfig STM32_LPTIMER_CNT 1049c5e51f2SPeter Robinson tristate "STM32 LP Timer encoder counter driver" 1059c5e51f2SPeter Robinson depends on MFD_STM32_LPTIMER || COMPILE_TEST 106b711f687SJarkko Nikula help 1079c5e51f2SPeter Robinson Select this option to enable STM32 Low-Power Timer quadrature encoder 1089c5e51f2SPeter Robinson and counter driver. 109b711f687SJarkko Nikula 1109c5e51f2SPeter Robinson To compile this driver as a module, choose M here: the 1119c5e51f2SPeter Robinson module will be called stm32-lptimer-cnt. 1129c5e51f2SPeter Robinson 1139c5e51f2SPeter Robinsonconfig STM32_TIMER_CNT 1149c5e51f2SPeter Robinson tristate "STM32 Timer encoder counter driver" 1159c5e51f2SPeter Robinson depends on MFD_STM32_TIMERS || COMPILE_TEST 1169c5e51f2SPeter Robinson help 1179c5e51f2SPeter Robinson Select this option to enable STM32 Timer quadrature encoder 1189c5e51f2SPeter Robinson and counter driver. 1199c5e51f2SPeter Robinson 1209c5e51f2SPeter Robinson To compile this driver as a module, choose M here: the 1219c5e51f2SPeter Robinson module will be called stm32-timer-cnt. 122b711f687SJarkko Nikula 1234e2f42aaSJulien Panisconfig TI_ECAP_CAPTURE 1244e2f42aaSJulien Panis tristate "TI eCAP capture driver" 1254e2f42aaSJulien Panis depends on ARCH_OMAP2PLUS || ARCH_DAVINCI_DA8XX || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST 1264e2f42aaSJulien Panis depends on HAS_IOMEM 1274e2f42aaSJulien Panis select REGMAP_MMIO 1284e2f42aaSJulien Panis help 1294e2f42aaSJulien Panis Select this option to enable the Texas Instruments Enhanced Capture 1304e2f42aaSJulien Panis (eCAP) driver in input mode. 1314e2f42aaSJulien Panis 1324e2f42aaSJulien Panis It can be used to timestamp events (falling/rising edges) detected 1334e2f42aaSJulien Panis on ECAP input signal. 1344e2f42aaSJulien Panis 1354e2f42aaSJulien Panis To compile this driver as a module, choose M here: the module 1364e2f42aaSJulien Panis will be called ti-ecap-capture. 1374e2f42aaSJulien Panis 1389c5e51f2SPeter Robinsonconfig TI_EQEP 1399c5e51f2SPeter Robinson tristate "TI eQEP counter driver" 1409c5e51f2SPeter Robinson depends on (SOC_AM33XX || COMPILE_TEST) 1419c5e51f2SPeter Robinson select REGMAP_MMIO 1429c5e51f2SPeter Robinson help 1439c5e51f2SPeter Robinson Select this option to enable the Texas Instruments Enhanced Quadrature 1449c5e51f2SPeter Robinson Encoder Pulse (eQEP) counter driver. 1459c5e51f2SPeter Robinson 1469c5e51f2SPeter Robinson To compile this driver as a module, choose M here: the module will be 1479c5e51f2SPeter Robinson called ti-eqep. 1489c5e51f2SPeter Robinson 149f1d8a071SWilliam Breathitt Grayendif # COUNTER 150