Lines Matching refs:counter
23 struct counter_device counter; member
141 static int stm32_lptim_cnt_read(struct counter_device *counter, in stm32_lptim_cnt_read() argument
144 struct stm32_lptim_cnt *const priv = counter->priv; in stm32_lptim_cnt_read()
157 static int stm32_lptim_cnt_function_read(struct counter_device *counter, in stm32_lptim_cnt_function_read() argument
161 struct stm32_lptim_cnt *const priv = counter->priv; in stm32_lptim_cnt_function_read()
176 static int stm32_lptim_cnt_function_write(struct counter_device *counter, in stm32_lptim_cnt_function_write() argument
180 struct stm32_lptim_cnt *const priv = counter->priv; in stm32_lptim_cnt_function_write()
199 static int stm32_lptim_cnt_enable_read(struct counter_device *counter, in stm32_lptim_cnt_enable_read() argument
203 struct stm32_lptim_cnt *const priv = counter->priv; in stm32_lptim_cnt_enable_read()
215 static int stm32_lptim_cnt_enable_write(struct counter_device *counter, in stm32_lptim_cnt_enable_write() argument
219 struct stm32_lptim_cnt *const priv = counter->priv; in stm32_lptim_cnt_enable_write()
240 static int stm32_lptim_cnt_ceiling_read(struct counter_device *counter, in stm32_lptim_cnt_ceiling_read() argument
244 struct stm32_lptim_cnt *const priv = counter->priv; in stm32_lptim_cnt_ceiling_read()
251 static int stm32_lptim_cnt_ceiling_write(struct counter_device *counter, in stm32_lptim_cnt_ceiling_write() argument
255 struct stm32_lptim_cnt *const priv = counter->priv; in stm32_lptim_cnt_ceiling_write()
275 static int stm32_lptim_cnt_action_read(struct counter_device *counter, in stm32_lptim_cnt_action_read() argument
280 struct stm32_lptim_cnt *const priv = counter->priv; in stm32_lptim_cnt_action_read()
284 err = stm32_lptim_cnt_function_read(counter, count, &function); in stm32_lptim_cnt_action_read()
319 static int stm32_lptim_cnt_action_write(struct counter_device *counter, in stm32_lptim_cnt_action_write() argument
324 struct stm32_lptim_cnt *const priv = counter->priv; in stm32_lptim_cnt_action_write()
331 err = stm32_lptim_cnt_function_read(counter, count, &function); in stm32_lptim_cnt_action_write()
429 priv->counter.name = dev_name(&pdev->dev); in stm32_lptim_cnt_probe()
430 priv->counter.parent = &pdev->dev; in stm32_lptim_cnt_probe()
431 priv->counter.ops = &stm32_lptim_cnt_ops; in stm32_lptim_cnt_probe()
433 priv->counter.counts = &stm32_lptim_enc_counts; in stm32_lptim_cnt_probe()
434 priv->counter.num_signals = ARRAY_SIZE(stm32_lptim_cnt_signals); in stm32_lptim_cnt_probe()
436 priv->counter.counts = &stm32_lptim_in1_counts; in stm32_lptim_cnt_probe()
437 priv->counter.num_signals = 1; in stm32_lptim_cnt_probe()
439 priv->counter.num_counts = 1; in stm32_lptim_cnt_probe()
440 priv->counter.signals = stm32_lptim_cnt_signals; in stm32_lptim_cnt_probe()
441 priv->counter.priv = priv; in stm32_lptim_cnt_probe()
445 return devm_counter_register(&pdev->dev, &priv->counter); in stm32_lptim_cnt_probe()