• 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/video/cx231xx/

Lines Matching defs:ir

42 		printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
47 printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
80 static void cx231xx_ir_handle_key(struct cx231xx_IR *ir)
86 result = ir->get_key(ir, &poll_result);
88 dprintk("ir->get_key() failed %d\n", result);
92 dprintk("ir->get_key result tb=%02x rc=%02x lr=%02x data=%02x\n",
94 ir->last_readcount, poll_result.rc_data[0]);
97 poll_result.read_count != ir->last_readcount)
98 ir_keydown(ir->input,
102 if (ir->dev->chip_id == CHIP_ID_EM2874)
108 ir->last_readcount = 0;
110 ir->last_readcount = poll_result.read_count;
117 struct cx231xx_IR *ir = (struct cx231xx_IR *)data;
119 schedule_work(&ir->work);
124 struct cx231xx_IR *ir = container_of(work, struct cx231xx_IR, work);
126 cx231xx_ir_handle_key(ir);
127 mod_timer(&ir->timer, jiffies + msecs_to_jiffies(ir->polling));
130 void cx231xx_ir_start(struct cx231xx_IR *ir)
132 setup_timer(&ir->timer, ir_timer, (unsigned long)ir);
133 INIT_WORK(&ir->work, cx231xx_ir_work);
134 schedule_work(&ir->work);
137 static void cx231xx_ir_stop(struct cx231xx_IR *ir)
139 del_timer_sync(&ir->timer);
145 struct cx231xx_IR *ir;
155 ir = kzalloc(sizeof(*ir), GFP_KERNEL);
157 if (!ir || !input_dev)
160 ir->input = input_dev;
170 ir->polling = 100; /* ms */
173 snprintf(ir->name, sizeof(ir->name), "cx231xx IR (%s)", dev->name);
175 usb_make_path(dev->udev, ir->phys, sizeof(ir->phys));
176 strlcat(ir->phys, "/input0", sizeof(ir->phys));
178 input_dev->name = ir->name;
179 input_dev->phys = ir->phys;
187 ir->dev = dev;
188 dev->ir = ir;
190 cx231xx_ir_start(ir);
193 err = __ir_input_register(ir->input, dev->board.ir_codes,
200 cx231xx_ir_stop(ir);
201 dev->ir = NULL;
203 kfree(ir);
209 struct cx231xx_IR *ir = dev->ir;
212 if (!ir)
215 cx231xx_ir_stop(ir);
216 ir_input_unregister(ir->input);
217 kfree(ir);
220 dev->ir = NULL;