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
Showing the changes to include/uapi/linux (2 of 9 files). Show all
Unified · Split
| @@ -65,6 +65,8 @@ enum counter_event_type { · 64 unmodified lines | |||
| 65 | COUNTER_EVENT_CHANGE_OF_STATE, | 65 | COUNTER_EVENT_CHANGE_OF_STATE, |
| 66 | /* Count value captured */ | 66 | /* Count value captured */ |
| 67 | COUNTER_EVENT_CAPTURE, | 67 | COUNTER_EVENT_CAPTURE, |
| 68 | /* Direction change detected */ | ||
| 69 | COUNTER_EVENT_DIRECTION_CHANGE, | ||
| 68 | }; | 70 | }; |
| 69 | 71 | ||
| 70 | /** | 72 | /** |
| @@ -0,0 +1,40 @@ | |||
| 1 | /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ | ||
| 2 | /* | ||
| 3 | * Channel numbers used by the microchip-tcb-capture driver | ||
| 4 | * Copyright (C) 2025 Bence Csókás | ||
| 5 | */ | ||
| 6 | #ifndef _UAPI_COUNTER_MCHP_TCB_H_ | ||
| 7 | #define _UAPI_COUNTER_MCHP_TCB_H_ | ||
| 8 | |||
| 9 | /* | ||
| 10 | * The driver defines the following components: | ||
| 11 | * | ||
| 12 | * Count 0 | ||
| 13 | * \__ Synapse 0 -- Signal 0 (Channel A, i.e. TIOA) | ||
| 14 | * \__ Synapse 1 -- Signal 1 (Channel B, i.e. TIOB) | ||
| 15 | * \__ Extension capture0 (RA register) | ||
| 16 | * \__ Extension capture1 (RB register) | ||
| 17 | * | ||
| 18 | * It also supports the following events: | ||
| 19 | * | ||
| 20 | * Channel 0: | ||
| 21 | * - CV register changed | ||
| 22 | * - CV overflowed | ||
| 23 | * - RA captured | ||
| 24 | * Channel 1: | ||
| 25 | * - RB captured | ||
| 26 | * Channel 2: | ||
| 27 | * - RC compare triggered | ||
| 28 | */ | ||
| 29 | |||
| 30 | /* Capture extensions */ | ||
| 31 | #define COUNTER_MCHP_EXCAP_RA 0 | ||
| 32 | #define COUNTER_MCHP_EXCAP_RB 1 | ||
| 33 | |||
| 34 | /* Event channels */ | ||
| 35 | #define COUNTER_MCHP_EVCHN_CV 0 | ||
| 36 | #define COUNTER_MCHP_EVCHN_RA 0 | ||
| 37 | #define COUNTER_MCHP_EVCHN_RB 1 | ||
| 38 | #define COUNTER_MCHP_EVCHN_RC 2 | ||
| 39 | |||
| 40 | #endif /* _UAPI_COUNTER_MCHP_TCB_H_ */ | ||