mbox series

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

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

Message

Csókás Bence March 6, 2025, 1:44 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       | 132 ++++++++++++++++++
 .../linux/counter/microchip-tcb-capture.h     |  40 ++++++
 3 files changed, 173 insertions(+)
 create mode 100644 include/uapi/linux/counter/microchip-tcb-capture.h

Comments

William Breathitt Gray March 8, 2025, 12:17 a.m. UTC | #1
On Thu, 06 Mar 2025 14:44:35 +0100, Bence Csókás wrote:
> 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
> 
> [...]

Applied to counter-next, thanks!

[1/2] counter: microchip-tcb-capture: Add IRQ handling
      commit: e5d5813968217b99ef2b83f13353967b218e3841
[2/2] counter: microchip-tcb-capture: Add capture extensions for registers RA/RB
      commit: 1adc6240a80278c613f655b71c6c0d447b2d5932

Bence, I've submitted a patchset adding support for the RC Compare as a
new 'compare' Count extension.[^1] If it works for you, please Ack that
series and we can hopefully get everything picked up by the 6.15 merge
window.

William Breathitt Gray <wbg@kernel.org>

[^1] https://lore.kernel.org/linux-iio/20250306-introduce-compare-component-v1-0-93993b3dca9c@kernel.org/