Lines Matching full:a
10 Counter devices are prevalent among a diverse spectrum of industries.
11 The ubiquitous presence of these devices necessitates a common interface
14 drivers by introducing a generic counter interface for consumption. The
15 Generic Counter interface enables drivers to support and expose a common
23 counter devices consist of a core set of components. This core set of
27 There are three core components to a counter:
33 Association of a Signal, and evaluation trigger, with a Count.
40 A Signal represents a stream of data. This is the input data that is
41 evaluated by the counter to determine the count data; e.g. a quadrature
42 signal output line of a rotary encoder. Not all counter devices provide
49 Signal line is in a low state.
52 Signal line is in a high state.
54 A Signal may be associated with one or more Counts.
58 A Synapse represents the association of a Signal with a Count. Signal
80 A counter is defined as a set of input signals associated with count
83 context of the Generic Counter interface, a counter consists of Counts
84 each associated with a set of Signals, whose respective Synapse
88 A Synapse associates one Signal with one Count.
92 A Count represents the accumulation of the effects of connected
93 Synapses; i.e. the count data for a set of Signals. The Generic
94 Counter interface represents the count data as a natural number.
96 A Count has a count function mode which represents the update behavior
107 Rising edges on signal A updates the respective count. The input level
111 A pair of quadrature encoding signals are evaluated to determine
114 - x1 A:
115 If direction is forward, rising edges on quadrature pair signal A
117 edges on quadrature pair signal A updates the respective count.
126 - x2 A:
127 Any state transition on quadrature pair signal A updates the
138 A Count has a set of one or more associated Synapses.
143 The most basic counter device may be expressed as a single Count
144 associated with a single Signal via a single Synapse. Take for example
145 a counter device which simply accumulates a count of rising edges on a
156 In this example, the Signal is a source input line with a pulsing
157 voltage, while the Count is a persistent count value which is repeatedly
158 incremented. The Signal is associated with the respective Count via a
160 specified by the Synapse -- in this case a rising edge condition on the
163 components: a rising edge condition triggers an increase function on an
166 A counter device is not limited to a single Signal; in fact, in theory
167 many Signals may be associated with even a single Count. For example, a
175 | Function: Quadrature x4 | <------------ / A \
183 In this example, two Signals (quadrature encoder lines A and B) are
184 associated with a single Count: a rising or falling edge on either A or
192 mode conditions. For example, a quadrature encoder counter device
193 operating in a non-quadrature Pulse-Direction mode could have one input
194 line dedicated for movement and a second input line dedicated for
201 | Function: Pulse-Direction | <------------- / A \ (Movement)
209 Only Signal A triggers the "Pulse-Direction" update function, but the
214 triggers the respective count function while the other is left with a
220 respective physical sources. This allows the user of a counter to
245 for defining a counter device.
256 To support a counter device, a driver must first allocate the available
271 a constant counter_ops structure in order to communicate with the
276 A defined counter_device structure may be registered to the system by
288 exposure and configuration of a specific Count or Signal respectively.
290 Determining the type of extension to create is a matter of scope.
293 specific to a Signal. These types of attributes will exist under a
296 For example, if you have an invert feature for a Signal, you can have
297 a Signal extension called "invert" that toggles that feature:
301 specific to a Count. These type of attributes will exist under a
304 For example, if you want to pause/unpause a Count from updating, you
305 can have a Count extension called "enable" that toggles such:
309 non-specific to a particular Count or Signal. This is where you would
313 chip overheated via a device extension called "error_overtemp":
320 counter_init function is called which registers a bus_type named
327 counter_register function establishes a unique ID for the Counter
328 device and creates a respective sysfs directory, where X is the
338 Each Signal has a directory created to house its relevant sysfs
343 Similarly, each Count has a directory created to house its relevant
348 For a more detailed breakdown of the available Generic Counter interface
359 attributes. If a driver callback is left undefined, then the respective