Skip to content

Commit

Permalink
counter: ti-ecap-capture: capture driver support for ECAP
Browse files Browse the repository at this point in the history
ECAP hardware on TI AM62x SoC supports capture feature. It can be used
to timestamp events (falling/rising edges) detected on input signal.

This commit adds capture driver support for ECAP hardware on AM62x SoC.

In the ECAP hardware, capture pin can also be configured to be in
PWM mode. Current implementation only supports capture operating mode.
Hardware also supports timebase sync between multiple instances, but
this driver supports simple independent capture functionality.

Signed-off-by: Julien Panis <jpanis@baylibre.com>
Link: https://lore.kernel.org/r/20220923142437.271328-4-jpanis@baylibre.com/
Signed-off-by: William Breathitt Gray <william.gray@linaro.org>
Link: https://lore.kernel.org/r/25644ce1f2fd15d116977770ede20e024f658513.1664318353.git.william.gray@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Julien Panis authored and Greg Kroah-Hartman committed Sep 30, 2022
1 parent 5a47aed commit 4e2f42a
Show file tree
Hide file tree
Showing 3 changed files with 630 additions and 0 deletions.
15 changes: 15 additions & 0 deletions drivers/counter/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,19 @@ config INTEL_QEP
To compile this driver as a module, choose M here: the module
will be called intel-qep.

config TI_ECAP_CAPTURE
tristate "TI eCAP capture driver"
depends on ARCH_OMAP2PLUS || ARCH_DAVINCI_DA8XX || ARCH_KEYSTONE || ARCH_K3 || COMPILE_TEST
depends on HAS_IOMEM
select REGMAP_MMIO
help
Select this option to enable the Texas Instruments Enhanced Capture
(eCAP) driver in input mode.

It can be used to timestamp events (falling/rising edges) detected
on ECAP input signal.

To compile this driver as a module, choose M here: the module
will be called ti-ecap-capture.

endif # COUNTER
1 change: 1 addition & 0 deletions drivers/counter/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ obj-$(CONFIG_TI_EQEP) += ti-eqep.o
obj-$(CONFIG_FTM_QUADDEC) += ftm-quaddec.o
obj-$(CONFIG_MICROCHIP_TCB_CAPTURE) += microchip-tcb-capture.o
obj-$(CONFIG_INTEL_QEP) += intel-qep.o
obj-$(CONFIG_TI_ECAP_CAPTURE) += ti-ecap-capture.o
Loading

0 comments on commit 4e2f42a

Please sign in to comment.