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
This commit is contained in:
@@ -65,6 +65,8 @@ enum counter_event_type {
|
||||
COUNTER_EVENT_CHANGE_OF_STATE,
|
||||
/* Count value captured */
|
||||
COUNTER_EVENT_CAPTURE,
|
||||
/* Direction change detected */
|
||||
COUNTER_EVENT_DIRECTION_CHANGE,
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Channel numbers used by the microchip-tcb-capture driver
|
||||
* Copyright (C) 2025 Bence Csókás
|
||||
*/
|
||||
#ifndef _UAPI_COUNTER_MCHP_TCB_H_
|
||||
#define _UAPI_COUNTER_MCHP_TCB_H_
|
||||
|
||||
/*
|
||||
* The driver defines the following components:
|
||||
*
|
||||
* Count 0
|
||||
* \__ Synapse 0 -- Signal 0 (Channel A, i.e. TIOA)
|
||||
* \__ Synapse 1 -- Signal 1 (Channel B, i.e. TIOB)
|
||||
* \__ Extension capture0 (RA register)
|
||||
* \__ Extension capture1 (RB register)
|
||||
*
|
||||
* It also supports the following events:
|
||||
*
|
||||
* Channel 0:
|
||||
* - CV register changed
|
||||
* - CV overflowed
|
||||
* - RA captured
|
||||
* Channel 1:
|
||||
* - RB captured
|
||||
* Channel 2:
|
||||
* - RC compare triggered
|
||||
*/
|
||||
|
||||
/* Capture extensions */
|
||||
#define COUNTER_MCHP_EXCAP_RA 0
|
||||
#define COUNTER_MCHP_EXCAP_RB 1
|
||||
|
||||
/* Event channels */
|
||||
#define COUNTER_MCHP_EVCHN_CV 0
|
||||
#define COUNTER_MCHP_EVCHN_RA 0
|
||||
#define COUNTER_MCHP_EVCHN_RB 1
|
||||
#define COUNTER_MCHP_EVCHN_RC 2
|
||||
|
||||
#endif /* _UAPI_COUNTER_MCHP_TCB_H_ */
|
||||
Reference in New Issue
Block a user