Lines Matching refs:kq
53 struct knav_queue_inst *kq, in knav_acc_set_notify() argument
64 if (!enabled || atomic_read(&kq->desc_count) <= 0) in knav_acc_set_notify()
67 kq->notify_needed = 1; in knav_acc_set_notify()
68 atomic_inc(&kq->acc->retrigger_count); in knav_acc_set_notify()
69 mask = BIT(kq->acc->channel % 32); in knav_acc_set_notify()
70 offset = ACC_INTD_OFFSET_STATUS(kq->acc->channel); in knav_acc_set_notify()
72 kq->acc->name); in knav_acc_set_notify()
80 struct knav_queue_inst *kq = NULL; in knav_acc_int_handler() local
101 kq = knav_range_offset_to_inst(kdev, range, queue); in knav_acc_int_handler()
158 kq = knav_range_offset_to_inst(kdev, range, in knav_acc_int_handler()
162 if (atomic_inc_return(&kq->desc_count) >= ACC_DESCS_MAX) { in knav_acc_int_handler()
163 atomic_dec(&kq->desc_count); in knav_acc_int_handler()
170 idx = atomic_inc_return(&kq->desc_tail) & ACC_DESCS_MASK; in knav_acc_int_handler()
171 kq->descs[idx] = val; in knav_acc_int_handler()
172 kq->notify_needed = 1; in knav_acc_int_handler()
396 struct knav_queue_inst *kq) in knav_acc_init_queue() argument
398 unsigned id = kq->id - range->queue_base; in knav_acc_init_queue()
400 kq->descs = devm_kcalloc(range->kdev->dev, in knav_acc_init_queue()
402 if (!kq->descs) in knav_acc_init_queue()
405 kq->acc = range->acc; in knav_acc_init_queue()
407 kq->acc += id; in knav_acc_init_queue()