Lines Matching refs:counter

90 	struct counter_device counter;  member
95 static int ti_eqep_count_read(struct counter_device *counter, in ti_eqep_count_read() argument
98 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_count_read()
107 static int ti_eqep_count_write(struct counter_device *counter, in ti_eqep_count_write() argument
110 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_count_write()
120 static int ti_eqep_function_get(struct counter_device *counter, in ti_eqep_function_get() argument
123 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_function_get()
132 static int ti_eqep_function_set(struct counter_device *counter, in ti_eqep_function_set() argument
135 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_function_set()
141 static int ti_eqep_action_get(struct counter_device *counter, in ti_eqep_action_get() argument
145 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_action_get()
150 err = ti_eqep_function_get(counter, count, &function); in ti_eqep_action_get()
208 static ssize_t ti_eqep_position_ceiling_read(struct counter_device *counter, in ti_eqep_position_ceiling_read() argument
212 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_position_ceiling_read()
220 static ssize_t ti_eqep_position_ceiling_write(struct counter_device *counter, in ti_eqep_position_ceiling_write() argument
225 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_position_ceiling_write()
238 static ssize_t ti_eqep_position_floor_read(struct counter_device *counter, in ti_eqep_position_floor_read() argument
242 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_position_floor_read()
250 static ssize_t ti_eqep_position_floor_write(struct counter_device *counter, in ti_eqep_position_floor_write() argument
255 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_position_floor_write()
268 static ssize_t ti_eqep_position_enable_read(struct counter_device *counter, in ti_eqep_position_enable_read() argument
272 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_position_enable_read()
280 static ssize_t ti_eqep_position_enable_write(struct counter_device *counter, in ti_eqep_position_enable_write() argument
285 struct ti_eqep_cnt *priv = counter->priv; in ti_eqep_position_enable_write()
407 priv->counter.name = dev_name(dev); in ti_eqep_probe()
408 priv->counter.parent = dev; in ti_eqep_probe()
409 priv->counter.ops = &ti_eqep_counter_ops; in ti_eqep_probe()
410 priv->counter.counts = ti_eqep_counts; in ti_eqep_probe()
411 priv->counter.num_counts = ARRAY_SIZE(ti_eqep_counts); in ti_eqep_probe()
412 priv->counter.signals = ti_eqep_signals; in ti_eqep_probe()
413 priv->counter.num_signals = ARRAY_SIZE(ti_eqep_signals); in ti_eqep_probe()
414 priv->counter.priv = priv; in ti_eqep_probe()
426 err = counter_register(&priv->counter); in ti_eqep_probe()
441 counter_unregister(&priv->counter); in ti_eqep_remove()