Lines Matching refs:counter_dev

438 	struct counter_device *counter_dev = dev_id;  in ecap_cnt_isr()  local
439 struct ecap_cnt_dev *ecap_dev = counter_priv(counter_dev); in ecap_cnt_isr()
449 counter_push_event(counter_dev, COUNTER_EVENT_CAPTURE, i); in ecap_cnt_isr()
458 counter_push_event(counter_dev, COUNTER_EVENT_OVERFLOW, i); in ecap_cnt_isr()
477 struct counter_device *counter_dev; in ecap_cnt_probe() local
482 counter_dev = devm_counter_alloc(dev, sizeof(*ecap_dev)); in ecap_cnt_probe()
483 if (!counter_dev) in ecap_cnt_probe()
486 counter_dev->name = ECAP_DRV_NAME; in ecap_cnt_probe()
487 counter_dev->parent = dev; in ecap_cnt_probe()
488 counter_dev->ops = &ecap_cnt_ops; in ecap_cnt_probe()
489 counter_dev->signals = ecap_cnt_signals; in ecap_cnt_probe()
490 counter_dev->num_signals = ARRAY_SIZE(ecap_cnt_signals); in ecap_cnt_probe()
491 counter_dev->counts = ecap_cnt_counts; in ecap_cnt_probe()
492 counter_dev->num_counts = ARRAY_SIZE(ecap_cnt_counts); in ecap_cnt_probe()
494 ecap_dev = counter_priv(counter_dev); in ecap_cnt_probe()
520 ret = devm_request_irq(dev, ret, ecap_cnt_isr, 0, pdev->name, counter_dev); in ecap_cnt_probe()
524 platform_set_drvdata(pdev, counter_dev); in ecap_cnt_probe()
533 ret = devm_counter_add(dev, counter_dev); in ecap_cnt_probe()
542 struct counter_device *counter_dev = platform_get_drvdata(pdev); in ecap_cnt_remove() local
543 struct ecap_cnt_dev *ecap_dev = counter_priv(counter_dev); in ecap_cnt_remove()
546 ecap_cnt_capture_disable(counter_dev); in ecap_cnt_remove()
553 struct counter_device *counter_dev = dev_get_drvdata(dev); in ecap_cnt_suspend() local
554 struct ecap_cnt_dev *ecap_dev = counter_priv(counter_dev); in ecap_cnt_suspend()
564 ecap_cnt_capture_disable(counter_dev); in ecap_cnt_suspend()
565 ecap_dev->pm_ctx.time_cntr = ecap_cnt_count_get_val(counter_dev, ECAP_TSCNT_REG); in ecap_cnt_suspend()
568 ecap_dev->pm_ctx.ev_mode = ecap_cnt_capture_get_evmode(counter_dev); in ecap_cnt_suspend()
577 struct counter_device *counter_dev = dev_get_drvdata(dev); in ecap_cnt_resume() local
578 struct ecap_cnt_dev *ecap_dev = counter_priv(counter_dev); in ecap_cnt_resume()
582 ecap_cnt_capture_set_evmode(counter_dev, ecap_dev->pm_ctx.ev_mode); in ecap_cnt_resume()
586 ecap_cnt_count_set_val(counter_dev, ECAP_TSCNT_REG, ecap_dev->pm_ctx.time_cntr); in ecap_cnt_resume()
587 ecap_cnt_capture_enable(counter_dev); in ecap_cnt_resume()