counter: Introduce the Generic Counter interface
This patch introduces the Generic Counter interface for supporting counter devices. In the context of the Generic Counter interface, a counter is defined as a device that reports one or more "counts" based on the state changes of one or more "signals" as evaluated by a defined "count function." Driver callbacks should be provided to communicate with the device: to read and write various Signals and Counts, and to set and get the "action mode" and "count function" for various Synapses and Counts respectively. To support a counter device, a driver must first allocate the available Counter Signals via counter_signal structures. These Signals should be stored as an array and set to the signals array member of an allocated counter_device structure before the Counter is registered to the system. Counter Counts may be allocated via counter_count structures, and respective Counter Signal associations (Synapses) made via counter_synapse structures. Associated co...
Showing
- MAINTAINERS 8 additions, 0 deletionsMAINTAINERS
- drivers/Kconfig 2 additions, 0 deletionsdrivers/Kconfig
- drivers/Makefile 1 addition, 0 deletionsdrivers/Makefile
- drivers/counter/Kconfig 10 additions, 0 deletionsdrivers/counter/Kconfig
- drivers/counter/Makefile 5 additions, 0 deletionsdrivers/counter/Makefile
- drivers/counter/counter.c 1567 additions, 0 deletionsdrivers/counter/counter.c
- include/linux/counter.h 510 additions, 0 deletionsinclude/linux/counter.h
- include/linux/counter_enum.h 45 additions, 0 deletionsinclude/linux/counter_enum.h
Please register or sign in to comment