• 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/drivers/media/video/em28xx/

Lines Matching defs:ir

46 		printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
51 printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
85 I2C IR based get keycodes - should be used with ir-kbd-i2c
88 int em28xx_get_key_terratec(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
93 if (1 != i2c_master_recv(ir->c, &b, 1)) {
116 int em28xx_get_key_em_haup(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
123 size = i2c_master_recv(ir->c, buf, sizeof(buf));
132 ir->old = buf[1];
156 i2cdprintk("ir hauppauge (em2840): code=0x%02x (rcv=0x%02x%02x)\n",
165 int em28xx_get_key_pinnacle_usb_grey(struct IR_i2c *ir, u32 *ir_key,
172 if (3 != i2c_master_recv(ir->c, buf, 3)) {
187 int em28xx_get_key_winfast_usbii_deluxe(struct IR_i2c *ir, u32 *ir_key, u32 *ir_raw)
191 struct i2c_msg msg[] = { { .addr = ir->c->addr, .flags = 0, .buf = &subaddr, .len = 1},
193 { .addr = ir->c->addr, .flags = I2C_M_RD, .buf = &keydetect, .len = 1} };
196 if (2 != i2c_transfer(ir->c->adapter, msg, 2)) {
205 if (2 != i2c_transfer(ir->c->adapter, msg, 2)) {
222 static int default_polling_getkey(struct em28xx_IR *ir,
225 struct em28xx *dev = ir->dev;
252 static int em2874_polling_getkey(struct em28xx_IR *ir,
255 struct em28xx *dev = ir->dev;
288 static void em28xx_ir_handle_key(struct em28xx_IR *ir)
294 result = ir->get_key(ir, &poll_result);
296 dprintk("ir->get_key() failed %d\n", result);
300 if (unlikely(poll_result.read_count != ir->last_readcount)) {
304 if (ir->full_code)
305 ir_keydown(ir->input,
310 ir_keydown(ir->input,
314 if (ir->dev->chip_id == CHIP_ID_EM2874)
320 ir->last_readcount = 0;
322 ir->last_readcount = poll_result.read_count;
328 struct em28xx_IR *ir = container_of(work, struct em28xx_IR, work.work);
330 em28xx_ir_handle_key(ir);
331 schedule_delayed_work(&ir->work, msecs_to_jiffies(ir->polling));
336 struct em28xx_IR *ir = priv;
338 INIT_DELAYED_WORK(&ir->work, em28xx_ir_work);
339 schedule_delayed_work(&ir->work, 0);
346 struct em28xx_IR *ir = priv;
348 cancel_delayed_work_sync(&ir->work);
354 struct em28xx_IR *ir = priv;
355 struct em28xx *dev = ir->dev;
362 ir->full_code = 1;
366 ir->full_code = 1;
377 ir->get_key = default_polling_getkey;
380 ir->get_key = em2874_polling_getkey;
393 struct em28xx_IR *ir;
402 ir = kzalloc(sizeof(*ir), GFP_KERNEL);
404 if (!ir || !input_dev)
408 ir->dev = dev;
409 dev->ir = ir;
411 ir->input = input_dev;
417 ir->props.allowed_protos = IR_TYPE_RC5 | IR_TYPE_NEC;
418 ir->props.priv = ir;
419 ir->props.change_protocol = em28xx_ir_change_protocol;
420 ir->props.open = em28xx_ir_start;
421 ir->props.close = em28xx_ir_stop;
424 err = em28xx_ir_change_protocol(ir, IR_TYPE_UNKNOWN);
429 ir->polling = 100; /* ms */
432 snprintf(ir->name, sizeof(ir->name), "em28xx IR (%s)",
435 usb_make_path(dev->udev, ir->phys, sizeof(ir->phys));
436 strlcat(ir->phys, "/input0", sizeof(ir->phys));
438 input_dev->name = ir->name;
439 input_dev->phys = ir->phys;
450 err = ir_input_register(ir->input, dev->board.ir_codes,
451 &ir->props, MODULE_NAME);
457 dev->ir = NULL;
459 kfree(ir);
465 struct em28xx_IR *ir = dev->ir;
468 if (!ir)
471 em28xx_ir_stop(ir);
472 ir_input_unregister(ir->input);
473 kfree(ir);
476 dev->ir = NULL;