Files
kernel_arpi/include/linux
William Breathitt Gray 0040a390d2 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 counter_synapse structures are
stored as an array and set to the the synapses array member of the
respective counter_count structure. These counter_count structures are
set to the counts array member of an allocated counter_device structure
before the Counter is registered to the system.

A counter device is registered to the system by passing the respective
initialized counter_device structure to the counter_register function;
similarly, the counter_unregister function unregisters the respective
Counter. The devm_counter_register and devm_counter_unregister functions
serve as device memory-managed versions of the counter_register and
counter_unregister functions respectively.

Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: William Breathitt Gray <vilhelm.gray@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-25 21:33:37 +02:00
..
2019-03-29 12:24:41 -07:00
2019-02-28 09:16:12 +01:00
2019-03-18 10:44:48 -06:00
2019-03-18 07:07:30 +01:00
2019-02-28 03:28:53 -05:00
2019-03-12 18:59:17 -07:00
2019-02-28 08:24:23 -07:00
2019-03-12 10:04:02 -07:00
2019-03-05 21:07:16 -08:00
2019-03-12 10:04:00 -07:00
2019-03-09 19:52:47 -08:00
2019-02-24 08:20:17 -07:00
2019-04-16 15:38:07 +02:00
2019-03-07 18:32:03 -08:00
2019-03-15 15:29:47 -07:00
2019-02-20 07:22:17 -07:00
2019-02-20 07:22:10 -07:00
2019-03-05 21:07:19 -08:00
2019-03-03 21:47:57 -08:00
2019-03-12 10:04:03 -07:00
2019-02-25 21:20:45 +01:00
2019-03-15 15:29:47 -07:00
2019-04-05 16:02:30 -10:00
2019-02-26 12:53:55 +01:00