• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /asuswrt-rt-n18u-9.0.0.4.380.2695/release/src-rt-6.x.4708/linux/linux-2.6.36/drivers/media/IR/

Lines Matching defs:ir

0 /* ir-raw-event.c - handle IR Pulse/Space event
19 #include "ir-core-priv.h"
64 * ir_raw_event_store() - pass a pulse/space duration to the raw ir decoders
69 * pulse/space duration for the raw ir decoding state machines. Pulses are
75 struct ir_input_dev *ir = input_get_drvdata(input_dev);
77 if (!ir->raw)
83 if (kfifo_in(&ir->raw->kfifo, ev, sizeof(*ev)) != sizeof(*ev))
91 * ir_raw_event_store_edge() - notify raw ir decoders of the start of a pulse/space
96 * store the beginning of an ir pulse or space (or the start/end of ir
97 * reception) for the raw ir decoding state machines. This is used by
103 struct ir_input_dev *ir = input_get_drvdata(input_dev);
109 if (!ir->raw)
113 delta = ktime_to_ns(ktime_sub(now, ir->raw->last_event));
120 if (delta > IR_MAX_DURATION || !ir->raw->last_type)
127 else if (ir->raw->last_type & IR_SPACE) {
130 } else if (ir->raw->last_type & IR_PULSE) {
136 ir->raw->last_event = now;
137 ir->raw->last_type = type;
155 struct ir_input_dev *ir = input_get_drvdata(input_dev);
156 struct ir_raw_event_ctrl *raw = ir->raw;
158 if (!raw || !ir->props)
162 if (ir->idle && !ev->pulse)
164 else if (ir->idle)
177 if (!ev->pulse && ir->props->timeout &&
178 raw->this_ev.duration >= ir->props->timeout)
186 struct ir_input_dev *ir = input_get_drvdata(input_dev);
187 struct ir_raw_event_ctrl *raw = ir->raw;
191 if (!ir->props)
194 if (!ir->raw)
204 delta = ktime_to_ns(ktime_sub(now, ir->raw->last_event));
220 if (ir->props->s_idle)
221 ir->props->s_idle(ir->props->priv, idle);
222 ir->idle = idle;
227 * ir_raw_event_handle() - schedules the decoding of stored ir data
230 * This routine will signal the workqueue to start decoding stored ir data.
234 struct ir_input_dev *ir = input_get_drvdata(input_dev);
236 if (!ir->raw)
239 wake_up_process(ir->raw->thread);
259 struct ir_input_dev *ir = input_get_drvdata(input_dev);
263 ir->raw = kzalloc(sizeof(*ir->raw), GFP_KERNEL);
264 if (!ir->raw)
267 ir->raw->input_dev = input_dev;
269 ir->raw->enabled_protocols = ~0;
270 rc = kfifo_alloc(&ir->raw->kfifo, sizeof(s64) * MAX_IR_EVENT_SIZE,
273 kfree(ir->raw);
274 ir->raw = NULL;
278 ir->raw->thread = kthread_run(ir_raw_event_thread, ir->raw,
279 "rc%u", (unsigned int)ir->devno);
281 if (IS_ERR(ir->raw->thread)) {
282 int ret = PTR_ERR(ir->raw->thread);
284 kfree(ir->raw);
285 ir->raw = NULL;
290 list_add_tail(&ir->raw->list, &ir_raw_client_list);
293 handler->raw_register(ir->raw->input_dev);
301 struct ir_input_dev *ir = input_get_drvdata(input_dev);
304 if (!ir->raw)
307 kthread_stop(ir->raw->thread);
310 list_del(&ir->raw->list);
313 handler->raw_unregister(ir->raw->input_dev);
316 kfifo_free(&ir->raw->kfifo);
317 kfree(ir->raw);
318 ir->raw = NULL;
368 it is needed to change the CONFIG_MODULE test at ir-core.h