Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+12
+9
Documentation/ABI/testing/sysfs-bus-counter
··· 34 34 Description: 35 35 Count data of Count Y represented as a string. 36 36 37 + What: /sys/bus/counter/devices/counterX/countY/compare 38 + KernelVersion: 6.15 39 + Contact: linux-iio@vger.kernel.org 40 + Description: 41 + If the counter device supports compare registers -- registers 42 + used to compare counter channels against a particular count -- 43 + the compare count for channel Y is provided by this attribute. 44 + 37 45 What: /sys/bus/counter/devices/counterX/countY/capture 38 46 KernelVersion: 6.1 39 47 Contact: linux-iio@vger.kernel.org ··· 309 301 310 302 What: /sys/bus/counter/devices/counterX/cascade_counts_enable_component_id 311 303 What: /sys/bus/counter/devices/counterX/external_input_phase_clock_select_component_id 304 + What: /sys/bus/counter/devices/counterX/countY/compare_component_id 312 305 What: /sys/bus/counter/devices/counterX/countY/capture_component_id 313 306 What: /sys/bus/counter/devices/counterX/countY/ceiling_component_id 314 307 What: /sys/bus/counter/devices/counterX/countY/floor_component_id
+3
include/linux/counter.h
··· 580 580 #define COUNTER_COMP_CEILING(_read, _write) \ 581 581 COUNTER_COMP_COUNT_U64("ceiling", _read, _write) 582 582 583 + #define COUNTER_COMP_COMPARE(_read, _write) \ 584 + COUNTER_COMP_COUNT_U64("compare", _read, _write) 585 + 583 586 #define COUNTER_COMP_COUNT_MODE(_read, _write, _available) \ 584 587 { \ 585 588 .type = COUNTER_COMP_COUNT_MODE, \