Lines Matching refs:counter
46 static int stm32_count_read(struct counter_device *counter, in stm32_count_read() argument
49 struct stm32_timer_cnt *const priv = counter_priv(counter); in stm32_count_read()
58 static int stm32_count_write(struct counter_device *counter, in stm32_count_write() argument
61 struct stm32_timer_cnt *const priv = counter_priv(counter); in stm32_count_write()
71 static int stm32_count_function_read(struct counter_device *counter, in stm32_count_function_read() argument
75 struct stm32_timer_cnt *const priv = counter_priv(counter); in stm32_count_function_read()
98 static int stm32_count_function_write(struct counter_device *counter, in stm32_count_function_write() argument
102 struct stm32_timer_cnt *const priv = counter_priv(counter); in stm32_count_function_write()
138 static int stm32_count_direction_read(struct counter_device *counter, in stm32_count_direction_read() argument
142 struct stm32_timer_cnt *const priv = counter_priv(counter); in stm32_count_direction_read()
152 static int stm32_count_ceiling_read(struct counter_device *counter, in stm32_count_ceiling_read() argument
155 struct stm32_timer_cnt *const priv = counter_priv(counter); in stm32_count_ceiling_read()
165 static int stm32_count_ceiling_write(struct counter_device *counter, in stm32_count_ceiling_write() argument
168 struct stm32_timer_cnt *const priv = counter_priv(counter); in stm32_count_ceiling_write()
180 static int stm32_count_enable_read(struct counter_device *counter, in stm32_count_enable_read() argument
183 struct stm32_timer_cnt *const priv = counter_priv(counter); in stm32_count_enable_read()
193 static int stm32_count_enable_write(struct counter_device *counter, in stm32_count_enable_write() argument
196 struct stm32_timer_cnt *const priv = counter_priv(counter); in stm32_count_enable_write()
231 static int stm32_action_read(struct counter_device *counter, in stm32_action_read() argument
239 err = stm32_count_function_read(counter, count, &function); in stm32_action_read()
319 struct counter_device *counter; in stm32_timer_cnt_probe() local
325 counter = devm_counter_alloc(dev, sizeof(*priv)); in stm32_timer_cnt_probe()
326 if (!counter) in stm32_timer_cnt_probe()
329 priv = counter_priv(counter); in stm32_timer_cnt_probe()
335 counter->name = dev_name(dev); in stm32_timer_cnt_probe()
336 counter->parent = dev; in stm32_timer_cnt_probe()
337 counter->ops = &stm32_timer_cnt_ops; in stm32_timer_cnt_probe()
338 counter->counts = &stm32_counts; in stm32_timer_cnt_probe()
339 counter->num_counts = 1; in stm32_timer_cnt_probe()
340 counter->signals = stm32_signals; in stm32_timer_cnt_probe()
341 counter->num_signals = ARRAY_SIZE(stm32_signals); in stm32_timer_cnt_probe()
349 ret = devm_counter_add(dev, counter); in stm32_timer_cnt_probe()