mirror of
https://github.com/torvalds/linux.git
synced 2024-12-04 18:13:04 +00:00
7aa2ba0df6
The LSI/CSI LS7266R1 chip provides programmable output via the FLG pins. When interrupts are enabled on the ACCES 104-QUAD-8, they occur whenever FLG1 is active. Four functions are available for the FLG1 signal: Carry, Compare, Carry-Borrow, and Index. Carry: Interrupt generated on active low Carry signal. Carry signal toggles every time the respective channel's counter overflows. Compare: Interrupt generated on active low Compare signal. Compare signal toggles every time respective channel's preset register is equal to the respective channel's counter. Carry-Borrow: Interrupt generated on active low Carry signal and active low Borrow signal. Carry signal toggles every time the respective channel's counter overflows. Borrow signal toggles every time the respective channel's counter underflows. Index: Interrupt generated on active high Index signal. These four functions correspond respectivefly to the following four Counter event types: COUNTER_EVENT_OVERFLOW, COUNTER_EVENT_THRESHOLD, COUNTER_EVENT_OVERFLOW_UNDERFLOW, and COUNTER_EVENT_INDEX. Interrupts push Counter events to event channel X, where 'X' is the respective channel whose FLG1 activated. This patch adds IRQ support for the ACCES 104-QUAD-8. The interrupt line numbers for the devices may be configured via the irq array module parameter. Acked-by: Syed Nayyar Waris <syednwaris@gmail.com> Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com> Link: https://lore.kernel.org/r/e3a28e100840e3a336fa93fce77445f0e9d9a674.1632884256.git.vilhelm.gray@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
105 lines
3.1 KiB
Plaintext
105 lines
3.1 KiB
Plaintext
# SPDX-License-Identifier: GPL-2.0-only
|
|
#
|
|
# Counter devices
|
|
#
|
|
|
|
menuconfig COUNTER
|
|
tristate "Counter support"
|
|
help
|
|
This enables counter device support through the Generic Counter
|
|
interface. You only need to enable this, if you also want to enable
|
|
one or more of the counter device drivers below.
|
|
|
|
if COUNTER
|
|
|
|
config 104_QUAD_8
|
|
tristate "ACCES 104-QUAD-8 driver"
|
|
depends on PC104 && X86
|
|
select ISA_BUS_API
|
|
help
|
|
Say yes here to build support for the ACCES 104-QUAD-8 quadrature
|
|
encoder counter/interface device family (104-QUAD-8, 104-QUAD-4).
|
|
|
|
A counter's respective error flag may be cleared by performing a write
|
|
operation on the respective count value attribute. Although the
|
|
104-QUAD-8 counters have a 25-bit range, only the lower 24 bits may be
|
|
set, either directly or via the counter's preset attribute.
|
|
|
|
The base port addresses for the devices may be configured via the base
|
|
array module parameter. The interrupt line numbers for the devices may
|
|
be configured via the irq array module parameter.
|
|
|
|
config INTERRUPT_CNT
|
|
tristate "Interrupt counter driver"
|
|
depends on GPIOLIB
|
|
help
|
|
Select this option to enable interrupt counter driver. Any interrupt
|
|
source can be used by this driver as the event source.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called interrupt-cnt.
|
|
|
|
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.
|
|
|
|
config STM32_LPTIMER_CNT
|
|
tristate "STM32 LP Timer encoder counter driver"
|
|
depends on MFD_STM32_LPTIMER || COMPILE_TEST
|
|
help
|
|
Select this option to enable STM32 Low-Power Timer quadrature encoder
|
|
and counter driver.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called stm32-lptimer-cnt.
|
|
|
|
config TI_EQEP
|
|
tristate "TI eQEP counter driver"
|
|
depends on (SOC_AM33XX || COMPILE_TEST)
|
|
select REGMAP_MMIO
|
|
help
|
|
Select this option to enable the Texas Instruments Enhanced Quadrature
|
|
Encoder Pulse (eQEP) counter driver.
|
|
|
|
To compile this driver as a module, choose M here: the module will be
|
|
called ti-eqep.
|
|
|
|
config FTM_QUADDEC
|
|
tristate "Flex Timer Module Quadrature decoder driver"
|
|
depends on HAS_IOMEM && OF
|
|
help
|
|
Select this option to enable the Flex Timer Quadrature decoder
|
|
driver.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called ftm-quaddec.
|
|
|
|
config MICROCHIP_TCB_CAPTURE
|
|
tristate "Microchip Timer Counter Capture driver"
|
|
depends on HAS_IOMEM && OF
|
|
select REGMAP_MMIO
|
|
help
|
|
Select this option to enable the Microchip Timer Counter Block
|
|
capture driver.
|
|
|
|
To compile this driver as a module, choose M here: the
|
|
module will be called microchip-tcb-capture.
|
|
|
|
config INTEL_QEP
|
|
tristate "Intel Quadrature Encoder Peripheral driver"
|
|
depends on PCI
|
|
help
|
|
Select this option to enable the Intel Quadrature Encoder Peripheral
|
|
driver.
|
|
|
|
To compile this driver as a module, choose M here: the module
|
|
will be called intel-qep.
|
|
|
|
endif # COUNTER
|