• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500v2-V1.0.0.60_1.0.38/src/linux/linux-2.6/drivers/media/video/bt8xx/

Lines Matching defs:btv

48 static void ir_handle_key(struct bttv *btv)
50 struct card_ir *ir = btv->remote;
54 gpio = bttv_gpio_read(&btv->c);
78 void bttv_input_irq(struct bttv *btv)
80 struct card_ir *ir = btv->remote;
83 ir_handle_key(btv);
88 struct bttv *btv = (struct bttv*)data;
89 struct card_ir *ir = btv->remote;
91 ir_handle_key(btv);
97 static int bttv_rc5_irq(struct bttv *btv)
99 struct card_ir *ir = btv->remote;
106 gpio = bttv_gpio_read(&btv->c);
145 bttv_gpio_write(&btv->c, gpio & ~(1 << 4));
146 bttv_gpio_write(&btv->c, gpio | (1 << 4));
152 static void bttv_ir_start(struct bttv *btv, struct card_ir *ir)
155 setup_timer(&ir->timer, bttv_input_timer, (unsigned long)btv);
175 static void bttv_ir_stop(struct bttv *btv)
177 if (btv->remote->polling) {
178 del_timer_sync(&btv->remote->timer);
182 if (btv->remote->rc5_gpio) {
185 del_timer_sync(&btv->remote->timer_end);
188 gpio = bttv_gpio_read(&btv->c);
189 bttv_gpio_write(&btv->c, gpio & ~(1 << 4));
193 int bttv_input_init(struct bttv *btv)
201 if (!btv->has_remote)
210 switch (btv->c.type) {
268 btv->custom_irq = bttv_rc5_irq;
279 dprintk(KERN_INFO "Ooops: IR config error [card=%d]\n", btv->c.type);
287 bttv_gpio_inout(&btv->c, (1 << 4), 1 << 4);
288 gpio = bttv_gpio_read(&btv->c);
289 bttv_gpio_write(&btv->c, gpio & ~(1 << 4));
290 bttv_gpio_write(&btv->c, gpio | (1 << 4));
293 bttv_gpio_inout(&btv->c, ir->mask_keycode | ir->mask_keydown, 0);
300 btv->c.type);
302 pci_name(btv->c.pci));
309 if (btv->c.pci->subsystem_vendor) {
310 input_dev->id.vendor = btv->c.pci->subsystem_vendor;
311 input_dev->id.product = btv->c.pci->subsystem_device;
313 input_dev->id.vendor = btv->c.pci->vendor;
314 input_dev->id.product = btv->c.pci->device;
316 input_dev->cdev.dev = &btv->c.pci->dev;
318 btv->remote = ir;
319 bttv_ir_start(btv, ir);
322 err = input_register_device(btv->remote->dev);
333 bttv_ir_stop(btv);
334 btv->remote = NULL;
341 void bttv_input_fini(struct bttv *btv)
343 if (btv->remote == NULL)
346 bttv_ir_stop(btv);
347 input_unregister_device(btv->remote->dev);
348 kfree(btv->remote);
349 btv->remote = NULL;