Lines Matching refs:counter

146 static int stm32_lptim_cnt_read(struct counter_device *counter,  in stm32_lptim_cnt_read()  argument
149 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_read()
162 static int stm32_lptim_cnt_function_read(struct counter_device *counter, in stm32_lptim_cnt_function_read() argument
166 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_function_read()
181 static int stm32_lptim_cnt_function_write(struct counter_device *counter, in stm32_lptim_cnt_function_write() argument
185 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_function_write()
204 static int stm32_lptim_cnt_enable_read(struct counter_device *counter, in stm32_lptim_cnt_enable_read() argument
208 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_enable_read()
220 static int stm32_lptim_cnt_enable_write(struct counter_device *counter, in stm32_lptim_cnt_enable_write() argument
224 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_enable_write()
245 static int stm32_lptim_cnt_ceiling_read(struct counter_device *counter, in stm32_lptim_cnt_ceiling_read() argument
249 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_ceiling_read()
256 static int stm32_lptim_cnt_ceiling_write(struct counter_device *counter, in stm32_lptim_cnt_ceiling_write() argument
260 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_ceiling_write()
280 static int stm32_lptim_cnt_action_read(struct counter_device *counter, in stm32_lptim_cnt_action_read() argument
285 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_action_read()
289 err = stm32_lptim_cnt_function_read(counter, count, &function); in stm32_lptim_cnt_action_read()
324 static int stm32_lptim_cnt_action_write(struct counter_device *counter, in stm32_lptim_cnt_action_write() argument
329 struct stm32_lptim_cnt *const priv = counter_priv(counter); in stm32_lptim_cnt_action_write()
336 err = stm32_lptim_cnt_function_read(counter, count, &function); in stm32_lptim_cnt_action_write()
419 struct counter_device *counter; in stm32_lptim_cnt_probe() local
426 counter = devm_counter_alloc(&pdev->dev, sizeof(*priv)); in stm32_lptim_cnt_probe()
427 if (!counter) in stm32_lptim_cnt_probe()
429 priv = counter_priv(counter); in stm32_lptim_cnt_probe()
437 counter->name = dev_name(&pdev->dev); in stm32_lptim_cnt_probe()
438 counter->parent = &pdev->dev; in stm32_lptim_cnt_probe()
439 counter->ops = &stm32_lptim_cnt_ops; in stm32_lptim_cnt_probe()
441 counter->counts = &stm32_lptim_enc_counts; in stm32_lptim_cnt_probe()
442 counter->num_signals = ARRAY_SIZE(stm32_lptim_cnt_signals); in stm32_lptim_cnt_probe()
444 counter->counts = &stm32_lptim_in1_counts; in stm32_lptim_cnt_probe()
445 counter->num_signals = 1; in stm32_lptim_cnt_probe()
447 counter->num_counts = 1; in stm32_lptim_cnt_probe()
448 counter->signals = stm32_lptim_cnt_signals; in stm32_lptim_cnt_probe()
452 ret = devm_counter_add(&pdev->dev, counter); in stm32_lptim_cnt_probe()