[PATCH 0/2] counter: Introduce the compare component

From: William Breathitt Gray
Date: Thu Mar 06 2025 - 02:06:02 EST


In previous drivers, we have exposed compare operations as part of a
larger set of functionalities; such as preseting a Count channel,
defining ceiling and floor boundaries, etc. However, we've lacked a
standard way to expose the compare operation in its strict sense as a
threshold comparison.

The need has become apparent in the microchip-tcb-capture module, which
requires a way to configure the threshold value provided by the RC
register for compare operations. To that end, a new compare component is
introduced with a helper macro COUNTER_COMP_COMPARE() to create such.

Signed-off-by: William Breathitt Gray <wbg@xxxxxxxxxx>
---
William Breathitt Gray (2):
counter: Introduce the compare component
counter: microchip-tcb-capture: Add support for RC Compare

Documentation/ABI/testing/sysfs-bus-counter | 9 ++++++++
drivers/counter/microchip-tcb-capture.c | 33 +++++++++++++++++++++++++++++
include/linux/counter.h | 3 +++
3 files changed, 45 insertions(+)
---
base-commit: c2a756660324fceca26780a50950e6d91dfdc210
change-id: 20250306-introduce-compare-component-11f22ace88b1

Best regards,
--
William Breathitt Gray <wbg@xxxxxxxxxx>