Lines Matching defs:counter

9 #include <linux/counter.h>
90 struct counter_device counter;
95 static int ti_eqep_count_read(struct counter_device *counter,
98 struct ti_eqep_cnt *priv = counter->priv;
107 static int ti_eqep_count_write(struct counter_device *counter,
110 struct ti_eqep_cnt *priv = counter->priv;
120 static int ti_eqep_function_get(struct counter_device *counter,
123 struct ti_eqep_cnt *priv = counter->priv;
132 static int ti_eqep_function_set(struct counter_device *counter,
135 struct ti_eqep_cnt *priv = counter->priv;
141 static int ti_eqep_action_get(struct counter_device *counter,
145 struct ti_eqep_cnt *priv = counter->priv;
150 err = ti_eqep_function_get(counter, count, &function);
208 static ssize_t ti_eqep_position_ceiling_read(struct counter_device *counter,
212 struct ti_eqep_cnt *priv = counter->priv;
220 static ssize_t ti_eqep_position_ceiling_write(struct counter_device *counter,
225 struct ti_eqep_cnt *priv = counter->priv;
238 static ssize_t ti_eqep_position_enable_read(struct counter_device *counter,
242 struct ti_eqep_cnt *priv = counter->priv;
250 static ssize_t ti_eqep_position_enable_write(struct counter_device *counter,
255 struct ti_eqep_cnt *priv = counter->priv;
372 priv->counter.name = dev_name(dev);
373 priv->counter.parent = dev;
374 priv->counter.ops = &ti_eqep_counter_ops;
375 priv->counter.counts = ti_eqep_counts;
376 priv->counter.num_counts = ARRAY_SIZE(ti_eqep_counts);
377 priv->counter.signals = ti_eqep_signals;
378 priv->counter.num_signals = ARRAY_SIZE(ti_eqep_signals);
379 priv->counter.priv = priv;
391 err = counter_register(&priv->counter);
406 counter_unregister(&priv->counter);
430 MODULE_DESCRIPTION("TI eQEP counter driver");