History

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

Greg Kroah-Hartman committed 1 year ago

Commit 34ff7992 parents 046cc01 ba27a029 files · +253 −0Browse files

Showing the changes to include/uapi/linux (2 of 9 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/counter.h +2 −0
  2. include/uapi/linux/counter/microchip-tcb-capture.h +40 −0
include/uapi/linux/counter.h+2−0
@@ -65,6 +65,8 @@ enum counter_event_type { · 64 unmodified lines
6565 COUNTER_EVENT_CHANGE_OF_STATE,
6666 /* Count value captured */
6767 COUNTER_EVENT_CAPTURE,
68+ /* Direction change detected */
69+ COUNTER_EVENT_DIRECTION_CHANGE,
6870 };
6971
7072 /**
include/uapi/linux/counter/microchip-tcb-capture.h+40−0
@@ -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_ */