diff options
| author | William Breathitt Gray <wbg@kernel.org> | 2025-03-06 10:05:43 +0300 |
|---|---|---|
| committer | William Breathitt Gray <wbg@kernel.org> | 2025-03-10 12:00:49 +0300 |
| commit | b5198201932635e19068cc2e83a99adf38f32c43 (patch) | |
| tree | b3d1c8cf3255e4d9fa49f711424b1585676e8b23 /include | |
| parent | 1adc6240a80278c613f655b71c6c0d447b2d5932 (diff) | |
| download | linux-b5198201932635e19068cc2e83a99adf38f32c43.tar.xz | |
counter: Introduce the compare component
Compare registers are used in devices to compare a counter channel
against a particular count value (e.g. to check if a threshold has been
reached). A macro COUNTER_COMP_COMPARE() is introduced to facilitate the
creation of compare components as Count extensions.
Link: https://lore.kernel.org/r/20250306-introduce-compare-component-v1-1-93993b3dca9c@kernel.org
Signed-off-by: William Breathitt Gray <wbg@kernel.org>
Diffstat (limited to 'include')
| -rw-r--r-- | include/linux/counter.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/counter.h b/include/linux/counter.h index 426b7d58a438..f208e867dd0f 100644 --- a/include/linux/counter.h +++ b/include/linux/counter.h @@ -580,6 +580,9 @@ struct counter_array { #define COUNTER_COMP_CEILING(_read, _write) \ COUNTER_COMP_COUNT_U64("ceiling", _read, _write) +#define COUNTER_COMP_COMPARE(_read, _write) \ + COUNTER_COMP_COUNT_U64("compare", _read, _write) + #define COUNTER_COMP_COUNT_MODE(_read, _write, _available) \ { \ .type = COUNTER_COMP_COUNT_MODE, \ |
