Lines Matching refs:ev
23 struct ir_raw_event ev; in ir_raw_event_thread() local
30 while (kfifo_out(&raw->kfifo, &ev, 1)) { in ir_raw_event_thread()
31 if (is_timing_event(ev)) { in ir_raw_event_thread()
32 if (ev.duration == 0) in ir_raw_event_thread()
35 !is_transition(&ev, &raw->prev_ev)) in ir_raw_event_thread()
37 TO_STR(ev.pulse)); in ir_raw_event_thread()
42 handler->decode(dev, ev); in ir_raw_event_thread()
43 lirc_raw_event(dev, ev); in ir_raw_event_thread()
44 raw->prev_ev = ev; in ir_raw_event_thread()
72 int ir_raw_event_store(struct rc_dev *dev, struct ir_raw_event *ev) in ir_raw_event_store() argument
78 ev->duration, TO_STR(ev->pulse)); in ir_raw_event_store()
80 if (!kfifo_put(&dev->raw->kfifo, *ev)) { in ir_raw_event_store()
103 struct ir_raw_event ev = {}; in ir_raw_event_store_edge() local
109 ev.duration = ktime_to_us(ktime_sub(now, dev->raw->last_event)); in ir_raw_event_store_edge()
110 ev.pulse = !pulse; in ir_raw_event_store_edge()
112 return ir_raw_event_store_with_timeout(dev, &ev); in ir_raw_event_store_edge()
127 int ir_raw_event_store_with_timeout(struct rc_dev *dev, struct ir_raw_event *ev) in ir_raw_event_store_with_timeout() argument
138 rc = ir_raw_event_store(dev, ev); in ir_raw_event_store_with_timeout()
167 int ir_raw_event_store_with_filter(struct rc_dev *dev, struct ir_raw_event *ev) in ir_raw_event_store_with_filter() argument
173 if (dev->idle && !ev->pulse) in ir_raw_event_store_with_filter()
179 dev->raw->this_ev = *ev; in ir_raw_event_store_with_filter()
180 else if (ev->pulse == dev->raw->this_ev.pulse) in ir_raw_event_store_with_filter()
181 dev->raw->this_ev.duration += ev->duration; in ir_raw_event_store_with_filter()
184 dev->raw->this_ev = *ev; in ir_raw_event_store_with_filter()
188 if (!ev->pulse && dev->timeout && in ir_raw_event_store_with_filter()
316 int ir_raw_gen_manchester(struct ir_raw_event **ev, unsigned int max, in ir_raw_gen_manchester() argument
329 init_ir_raw_event_duration((*ev), 1, timings->leader_pulse); in ir_raw_gen_manchester()
333 init_ir_raw_event_duration(++(*ev), 0, in ir_raw_gen_manchester()
338 --(*ev); in ir_raw_gen_manchester()
346 if (need_pulse == !!(*ev)->pulse) { in ir_raw_gen_manchester()
347 (*ev)->duration += timings->clock; in ir_raw_gen_manchester()
351 init_ir_raw_event_duration(++(*ev), need_pulse, in ir_raw_gen_manchester()
357 init_ir_raw_event_duration(++(*ev), !need_pulse, in ir_raw_gen_manchester()
363 if (!(*ev)->pulse) in ir_raw_gen_manchester()
364 (*ev)->duration += timings->trailer_space; in ir_raw_gen_manchester()
368 init_ir_raw_event_duration(++(*ev), 0, in ir_raw_gen_manchester()
375 ++(*ev); in ir_raw_gen_manchester()
398 int ir_raw_gen_pd(struct ir_raw_event **ev, unsigned int max, in ir_raw_gen_pd() argument
407 ret = ir_raw_gen_pulse_space(ev, &max, timings->header_pulse, in ir_raw_gen_pd()
416 ret = ir_raw_gen_pulse_space(ev, &max, in ir_raw_gen_pd()
425 ret = ir_raw_gen_pulse_space(ev, &max, in ir_raw_gen_pd()
433 ret = ir_raw_gen_pulse_space(ev, &max, timings->trailer_pulse, in ir_raw_gen_pd()
457 int ir_raw_gen_pl(struct ir_raw_event **ev, unsigned int max, in ir_raw_gen_pl() argument
468 init_ir_raw_event_duration((*ev)++, 1, timings->header_pulse); in ir_raw_gen_pl()
474 init_ir_raw_event_duration((*ev)++, 0, in ir_raw_gen_pl()
479 init_ir_raw_event_duration((*ev)++, 1, pulse); in ir_raw_gen_pl()
485 init_ir_raw_event_duration((*ev)++, 0, in ir_raw_gen_pl()
490 init_ir_raw_event_duration((*ev)++, 1, pulse); in ir_raw_gen_pl()
497 init_ir_raw_event_duration((*ev)++, 0, timings->trailer_space); in ir_raw_gen_pl()
563 struct ir_raw_event ev = { in ir_raw_edge_handle() local
568 ir_raw_event_store(dev, &ev); in ir_raw_edge_handle()