Skip to content

Commit f213729

Browse files
dlechJonathan Cameron
authored andcommitted
counter: new TI eQEP driver
This adds a new counter driver for the Texas Instruments Enhanced Quadrature Encoder Pulse (eQEP) module. Only very basic functionality is currently implemented - only enough to be able to read the position. The actual device has many more features which can be added to the driver on an as-needed basis. It is not possible to read the QEPA/B signal values in hardware, so that feature is omitted. The TI_PWMSS kernel option is selected in Kconfig to enable the parent bus, which is needed for power management. Signed-off-by: David Lechner <david@lechnology.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
1 parent 1517d90 commit f213729

5 files changed

Lines changed: 492 additions & 1 deletion

File tree

‎MAINTAINERS‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16202,6 +16202,12 @@ S: Maintained
1620216202
F: drivers/media/platform/davinci/
1620316203
F: include/media/davinci/
1620416204

16205+
TI ENHANCED QUADRATURE ENCODER PULSE (eQEP) DRIVER
16206+
R: David Lechner <david@lechnology.com>
16207+
L: linux-iio@vger.kernel.org
16208+
F: Documentation/devicetree/bindings/counter/ti-eqep.yaml
16209+
F: drivers/counter/ti-eqep.c
16210+
1620516211
TI ETHERNET SWITCH DRIVER (CPSW)
1620616212
R: Grygorii Strashko <grygorii.strashko@ti.com>
1620716213
L: linux-omap@vger.kernel.org

‎drivers/bus/Kconfig‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ config TEGRA_GMI
152152

153153
config TI_PWMSS
154154
bool
155-
default y if (ARCH_OMAP2PLUS) && (PWM_TIECAP || PWM_TIEHRPWM)
155+
default y if (ARCH_OMAP2PLUS) && (PWM_TIECAP || PWM_TIEHRPWM || TI_EQEP)
156156
help
157157
PWM Subsystem driver support for AM33xx SOC.
158158

‎drivers/counter/Kconfig‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ config STM32_LPTIMER_CNT
4949
To compile this driver as a module, choose M here: the
5050
module will be called stm32-lptimer-cnt.
5151

52+
config TI_EQEP
53+
tristate "TI eQEP counter driver"
54+
depends on (SOC_AM33XX || COMPILE_TEST)
55+
select REGMAP_MMIO
56+
help
57+
Select this option to enable the Texas Instruments Enhanced Quadrature
58+
Encoder Pulse (eQEP) counter driver.
59+
60+
To compile this driver as a module, choose M here: the module will be
61+
called ti-eqep.
62+
5263
config FTM_QUADDEC
5364
tristate "Flex Timer Module Quadrature decoder driver"
5465
depends on HAS_IOMEM && OF

‎drivers/counter/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ obj-$(CONFIG_COUNTER) += counter.o
88
obj-$(CONFIG_104_QUAD_8) += 104-quad-8.o
99
obj-$(CONFIG_STM32_TIMER_CNT) += stm32-timer-cnt.o
1010
obj-$(CONFIG_STM32_LPTIMER_CNT) += stm32-lptimer-cnt.o
11+
obj-$(CONFIG_TI_EQEP) += ti-eqep.o
1112
obj-$(CONFIG_FTM_QUADDEC) += ftm-quaddec.o

0 commit comments

Comments
 (0)