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()
205 dev_err(counter->parent, "Cannot enable clock %d\n", ret); in stm32_count_enable_write()
237 static int stm32_action_read(struct counter_device *counter, in stm32_action_read() argument
245 err = stm32_count_function_read(counter, count, &function); in stm32_action_read()
325 struct counter_device *counter; in stm32_timer_cnt_probe() local
331 counter = devm_counter_alloc(dev, sizeof(*priv)); in stm32_timer_cnt_probe()
332 if (!counter) in stm32_timer_cnt_probe()
335 priv = counter_priv(counter); in stm32_timer_cnt_probe()
341 counter->name = dev_name(dev); in stm32_timer_cnt_probe()
342 counter->parent = dev; in stm32_timer_cnt_probe()
343 counter->ops = &stm32_timer_cnt_ops; in stm32_timer_cnt_probe()
344 counter->counts = &stm32_counts; in stm32_timer_cnt_probe()
345 counter->num_counts = 1; in stm32_timer_cnt_probe()
346 counter->signals = stm32_signals; in stm32_timer_cnt_probe()
347 counter->num_signals = ARRAY_SIZE(stm32_signals); in stm32_timer_cnt_probe()
355 ret = devm_counter_add(dev, counter); in stm32_timer_cnt_probe()