mbox series

[v7,0/2] microchip-tcb-capture: Add Capture, Compare, Overflow etc. events

Message ID 20250304155156.374150-1-csokas.bence@prolan.hu (mailing list archive)
Headers show
Series microchip-tcb-capture: Add Capture, Compare, Overflow etc. events | expand

Message

Bence Csókás March 4, 2025, 3:51 p.m. UTC
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 (2):
  counter: microchip-tcb-capture: Add IRQ handling
  counter: microchip-tcb-capture: Add capture extensions for registers
    RA/RB

 MAINTAINERS                                   |   1 +
 drivers/counter/microchip-tcb-capture.c       | 133 ++++++++++++++++++
 .../linux/counter/microchip-tcb-capture.h     |  40 ++++++
 3 files changed, 174 insertions(+)
 create mode 100644 include/uapi/linux/counter/microchip-tcb-capture.h