Lines Matching refs:counter

140 static int stm32_lptim_cnt_read(struct counter_device *counter,  in stm32_lptim_cnt_read()  argument
143 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_read()
156 static int stm32_lptim_cnt_function_read(struct counter_device *counter, in stm32_lptim_cnt_function_read() argument
160 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_function_read()
175 static int stm32_lptim_cnt_function_write(struct counter_device *counter, in stm32_lptim_cnt_function_write() argument
179 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_function_write()
198 static int stm32_lptim_cnt_enable_read(struct counter_device *counter, in stm32_lptim_cnt_enable_read() argument
202 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_enable_read()
214 static int stm32_lptim_cnt_enable_write(struct counter_device *counter, in stm32_lptim_cnt_enable_write() argument
218 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_enable_write()
239 static int stm32_lptim_cnt_ceiling_read(struct counter_device *counter, in stm32_lptim_cnt_ceiling_read() argument
243 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_ceiling_read()
250 static int stm32_lptim_cnt_ceiling_write(struct counter_device *counter, in stm32_lptim_cnt_ceiling_write() argument
254 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_ceiling_write()
274 static int stm32_lptim_cnt_action_read(struct counter_device *counter, in stm32_lptim_cnt_action_read() argument
279 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_action_read()
283 err = stm32_lptim_cnt_function_read(counter, count, &function); in stm32_lptim_cnt_action_read()
318 static int stm32_lptim_cnt_action_write(struct counter_device *counter, in stm32_lptim_cnt_action_write() argument
323 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_action_write()
330 err = stm32_lptim_cnt_function_read(counter, count, &function); in stm32_lptim_cnt_action_write()
413 struct counter_device *counter; in stm32_lptim_cnt_probe() local
420 counter = devm_counter_alloc(&pdev->dev, sizeof(*priv)); in stm32_lptim_cnt_probe()
421 if (!counter) in stm32_lptim_cnt_probe()
423 priv = counter_priv(counter); in stm32_lptim_cnt_probe()
431 counter->name = dev_name(&pdev->dev); in stm32_lptim_cnt_probe()
432 counter->parent = &pdev->dev; in stm32_lptim_cnt_probe()
433 counter->ops = &stm32_lptim_cnt_ops; in stm32_lptim_cnt_probe()
435 counter->counts = &stm32_lptim_enc_counts; in stm32_lptim_cnt_probe()
436 counter->num_signals = ARRAY_SIZE(stm32_lptim_cnt_signals); in stm32_lptim_cnt_probe()
438 counter->counts = &stm32_lptim_in1_counts; in stm32_lptim_cnt_probe()
439 counter->num_signals = 1; in stm32_lptim_cnt_probe()
441 counter->num_counts = 1; in stm32_lptim_cnt_probe()
442 counter->signals = stm32_lptim_cnt_signals; in stm32_lptim_cnt_probe()
446 ret = devm_counter_add(&pdev->dev, counter); in stm32_lptim_cnt_probe()