| From: |
| Bence Csókás <csokas.bence-AT-prolan.hu> |
| To: |
| <linux-arm-kernel-AT-lists.infradead.org>, <linux-iio-AT-vger.kernel.org>, <linux-kernel-AT-vger.kernel.org> |
| Subject: |
| [PATCH v5 0/3] microchip-tcb-capture: Add Capture, Compare, Overflow etc. events |
| Date: |
| Thu, 27 Feb 2025 15:27:45 +0100 |
| Message-ID: |
| <20250227142751.61496-1-csokas.bence@prolan.hu> |
| Cc: |
| Bence Csókás <csokas.bence-AT-prolan.hu>, "Kamel Bouhara" <kamel.bouhara-AT-bootlin.com>, William Breathitt Gray <wbg-AT-kernel.org>, <Dharma.B-AT-microchip.com> |
| Archive-link: |
| Article |
The TCB has three R/W-able "general purpose" hardware registers:
RA, RB and RC. The hardware is capable of:
* sampling Counter Value Register (CV) to RA/RB on a trigger edge
* sending an interrupt of this change
* sending an interrupt on CV change due to trigger
* triggering an interrupt on CV compare to RC
* stop counting after sampling to RB
To enable using these features in user-space, an interrupt handler
was added, generating the necessary counter events. On top, RA/RB
registers are added as Count Extensions. To aid interoperation, a
uapi header was also added, containing the various numeral IDs of
the Extensions, Event channels etc.
Bence Csókás (3):
include: uapi: counter: Add microchip-tcb-capture.h
counter: microchip-tcb-capture: Add IRQ handling
counter: microchip-tcb-capture: Add capture extensions for registers
RA-RC
MAINTAINERS | 1 +
drivers/counter/microchip-tcb-capture.c | 137 ++++++++++++++++++
.../linux/counter/microchip-tcb-capture.h | 49 +++++++
3 files changed, 187 insertions(+)
create mode 100644 include/uapi/linux/counter/microchip-tcb-capture.h
--
2.48.1