Lines Matching refs:counter
24 struct counter_device counter; member
50 static int stm32_count_read(struct counter_device *counter, in stm32_count_read() argument
54 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_read()
63 static int stm32_count_write(struct counter_device *counter, in stm32_count_write() argument
67 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_write()
81 static int stm32_count_function_get(struct counter_device *counter, in stm32_count_function_get() argument
85 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_function_get()
105 static int stm32_count_function_set(struct counter_device *counter, in stm32_count_function_set() argument
109 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_function_set()
147 static ssize_t stm32_count_direction_read(struct counter_device *counter, in stm32_count_direction_read() argument
151 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_direction_read()
161 static ssize_t stm32_count_ceiling_read(struct counter_device *counter, in stm32_count_ceiling_read() argument
165 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_ceiling_read()
173 static ssize_t stm32_count_ceiling_write(struct counter_device *counter, in stm32_count_ceiling_write() argument
178 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_ceiling_write()
194 static ssize_t stm32_count_enable_read(struct counter_device *counter, in stm32_count_enable_read() argument
198 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_enable_read()
206 static ssize_t stm32_count_enable_write(struct counter_device *counter, in stm32_count_enable_write() argument
211 struct stm32_timer_cnt *const priv = counter->priv; in stm32_count_enable_write()
264 static int stm32_action_get(struct counter_device *counter, in stm32_action_get() argument
275 err = stm32_count_function_get(counter, count, &function); in stm32_action_get()
359 priv->counter.name = dev_name(dev); in stm32_timer_cnt_probe()
360 priv->counter.parent = dev; in stm32_timer_cnt_probe()
361 priv->counter.ops = &stm32_timer_cnt_ops; in stm32_timer_cnt_probe()
362 priv->counter.counts = &stm32_counts; in stm32_timer_cnt_probe()
363 priv->counter.num_counts = 1; in stm32_timer_cnt_probe()
364 priv->counter.signals = stm32_signals; in stm32_timer_cnt_probe()
365 priv->counter.num_signals = ARRAY_SIZE(stm32_signals); in stm32_timer_cnt_probe()
366 priv->counter.priv = priv; in stm32_timer_cnt_probe()
369 return devm_counter_register(dev, &priv->counter); in stm32_timer_cnt_probe()