diff options
author | 2025-03-11 11:01:57 +0100 | |
---|---|---|
committer | 2025-03-11 11:01:57 +0100 | |
commit | 34ff7999dc4a3da6fe96821031975b8170dd36ee (patch) | |
tree | 8d21ea24b7c20e69c84ece7f1b6e3530766cc030 /tools | |
parent | Merge 6.14-rc6 into char-misc-next (diff) | |
parent | counter: microchip-tcb-capture: Add support for RC Compare (diff) | |
download | wireguard-linux-34ff7999dc4a3da6fe96821031975b8170dd36ee.tar.xz wireguard-linux-34ff7999dc4a3da6fe96821031975b8170dd36ee.zip |
Merge tag 'counter-updates-for-6.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter into char-misc-next
William writes:
Counter updates for 6.15
counter:
- Introduce the COUNTER_EVENT_DIRECTION_CHANGE event
- Introduce the COUNTER_COMP_COMPARE helper macro
microchip-tcb-cpature:
- Add IRQ handling
- Add support for capture extensions
- Add support for compare extension
ti-eqep:
- Add support for reading and detecting changes in direction
tools/counter:
- Add counter_watch_events executable to .gitignore
- Support COUNTER_EVENT_DIRECTION_CHANGE in counter_watch_events tool
* tag 'counter-updates-for-6.15' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/wbg/counter:
counter: microchip-tcb-capture: Add support for RC Compare
counter: Introduce the compare component
counter: microchip-tcb-capture: Add capture extensions for registers RA/RB
counter: microchip-tcb-capture: Add IRQ handling
counter: ti-eqep: add direction support
tools/counter: add direction change event to watcher
counter: add direction change event
tools/counter: gitignore counter_watch_events
Diffstat (limited to 'tools')
-rw-r--r-- | tools/counter/.gitignore | 1 | ||||
-rw-r--r-- | tools/counter/counter_watch_events.c | 5 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tools/counter/.gitignore b/tools/counter/.gitignore index 9fd290d4bf43..22d8727d2696 100644 --- a/tools/counter/.gitignore +++ b/tools/counter/.gitignore @@ -1,2 +1,3 @@ /counter_example +/counter_watch_events /include/linux/counter.h diff --git a/tools/counter/counter_watch_events.c b/tools/counter/counter_watch_events.c index 107631e0f2e3..15e21b0c5ffd 100644 --- a/tools/counter/counter_watch_events.c +++ b/tools/counter/counter_watch_events.c @@ -38,6 +38,7 @@ static const char * const counter_event_type_name[] = { "COUNTER_EVENT_INDEX", "COUNTER_EVENT_CHANGE_OF_STATE", "COUNTER_EVENT_CAPTURE", + "COUNTER_EVENT_DIRECTION_CHANGE", }; static const char * const counter_component_type_name[] = { @@ -118,6 +119,7 @@ static void print_usage(void) " evt_index (COUNTER_EVENT_INDEX)\n" " evt_change_of_state (COUNTER_EVENT_CHANGE_OF_STATE)\n" " evt_capture (COUNTER_EVENT_CAPTURE)\n" + " evt_direction_change (COUNTER_EVENT_DIRECTION_CHANGE)\n" "\n" " chan=<n> channel <n> for this watch [default: 0]\n" " id=<n> component id <n> for this watch [default: 0]\n" @@ -157,6 +159,7 @@ enum { WATCH_EVENT_INDEX, WATCH_EVENT_CHANGE_OF_STATE, WATCH_EVENT_CAPTURE, + WATCH_EVENT_DIRECTION_CHANGE, WATCH_CHANNEL, WATCH_ID, WATCH_PARENT, @@ -183,6 +186,7 @@ static char * const counter_watch_subopts[WATCH_SUBOPTS_MAX + 1] = { [WATCH_EVENT_INDEX] = "evt_index", [WATCH_EVENT_CHANGE_OF_STATE] = "evt_change_of_state", [WATCH_EVENT_CAPTURE] = "evt_capture", + [WATCH_EVENT_DIRECTION_CHANGE] = "evt_direction_change", /* channel, id, parent */ [WATCH_CHANNEL] = "chan", [WATCH_ID] = "id", @@ -278,6 +282,7 @@ int main(int argc, char **argv) case WATCH_EVENT_INDEX: case WATCH_EVENT_CHANGE_OF_STATE: case WATCH_EVENT_CAPTURE: + case WATCH_EVENT_DIRECTION_CHANGE: /* match counter_event_type: subtract enum value */ ret -= WATCH_EVENT_OVERFLOW; watches[i].event = ret; |