• Home
  • Raw
  • Download

Lines Matching refs:btv

53 static void ir_handle_key(struct bttv *btv)  in ir_handle_key()  argument
55 struct bttv_ir *ir = btv->remote; in ir_handle_key()
59 gpio = bttv_gpio_read(&btv->c); in ir_handle_key()
80 if (btv->c.type == BTTV_BOARD_WINFAST2000) in ir_handle_key()
87 static void ir_enltv_handle_key(struct bttv *btv) in ir_enltv_handle_key() argument
89 struct bttv_ir *ir = btv->remote; in ir_enltv_handle_key()
93 gpio = bttv_gpio_read(&btv->c); in ir_enltv_handle_key()
126 static int bttv_rc5_irq(struct bttv *btv);
128 void bttv_input_irq(struct bttv *btv) in bttv_input_irq() argument
130 struct bttv_ir *ir = btv->remote; in bttv_input_irq()
133 bttv_rc5_irq(btv); in bttv_input_irq()
135 ir_handle_key(btv); in bttv_input_irq()
140 struct bttv *btv = (struct bttv*)data; in bttv_input_timer() local
141 struct bttv_ir *ir = btv->remote; in bttv_input_timer()
143 if (btv->c.type == BTTV_BOARD_ENLTV_FM_2) in bttv_input_timer()
144 ir_enltv_handle_key(btv); in bttv_input_timer()
146 ir_handle_key(btv); in bttv_input_timer()
246 static int bttv_rc5_irq(struct bttv *btv) in bttv_rc5_irq() argument
248 struct bttv_ir *ir = btv->remote; in bttv_rc5_irq()
255 gpio = bttv_gpio_read(&btv->c); in bttv_rc5_irq()
294 bttv_gpio_write(&btv->c, gpio & ~(1 << 4)); in bttv_rc5_irq()
295 bttv_gpio_write(&btv->c, gpio | (1 << 4)); in bttv_rc5_irq()
301 static void bttv_ir_start(struct bttv *btv, struct bttv_ir *ir) in bttv_ir_start() argument
304 setup_timer(&ir->timer, bttv_input_timer, (unsigned long)btv); in bttv_ir_start()
315 static void bttv_ir_stop(struct bttv *btv) in bttv_ir_stop() argument
317 if (btv->remote->polling) in bttv_ir_stop()
318 del_timer_sync(&btv->remote->timer); in bttv_ir_stop()
320 if (btv->remote->rc5_gpio) { in bttv_ir_stop()
323 del_timer_sync(&btv->remote->timer); in bttv_ir_stop()
325 gpio = bttv_gpio_read(&btv->c); in bttv_ir_stop()
326 bttv_gpio_write(&btv->c, gpio & ~(1 << 4)); in bttv_ir_stop()
369 void init_bttv_i2c_ir(struct bttv *btv) in init_bttv_i2c_ir() argument
378 if (0 != btv->i2c_rc) in init_bttv_i2c_ir()
382 memset(&btv->init_data, 0, sizeof(btv->init_data)); in init_bttv_i2c_ir()
385 switch (btv->c.type) { in init_bttv_i2c_ir()
387 btv->init_data.name = "PV951"; in init_bttv_i2c_ir()
388 btv->init_data.get_key = get_key_pv951; in init_bttv_i2c_ir()
389 btv->init_data.ir_codes = RC_MAP_PV951; in init_bttv_i2c_ir()
394 if (btv->init_data.name) { in init_bttv_i2c_ir()
395 info.platform_data = &btv->init_data; in init_bttv_i2c_ir()
396 i2c_dev = i2c_new_device(&btv->c.i2c_adap, &info); in init_bttv_i2c_ir()
406 i2c_dev = i2c_new_probed_device(&btv->c.i2c_adap, &info, addr_list, NULL); in init_bttv_i2c_ir()
416 int bttv_input_init(struct bttv *btv) in bttv_input_init() argument
423 if (!btv->has_remote) in bttv_input_init()
432 switch (btv->c.type) { in bttv_input_init()
511 ir->last_gpio = ir_extract_bits(bttv_gpio_read(&btv->c), in bttv_input_init()
517 dprintk("Ooops: IR config error [card=%d]\n", btv->c.type); in bttv_input_init()
525 bttv_gpio_inout(&btv->c, (1 << 4), 1 << 4); in bttv_input_init()
526 gpio = bttv_gpio_read(&btv->c); in bttv_input_init()
527 bttv_gpio_write(&btv->c, gpio & ~(1 << 4)); in bttv_input_init()
528 bttv_gpio_write(&btv->c, gpio | (1 << 4)); in bttv_input_init()
531 bttv_gpio_inout(&btv->c, ir->mask_keycode | ir->mask_keydown, 0); in bttv_input_init()
538 btv->c.type); in bttv_input_init()
540 pci_name(btv->c.pci)); in bttv_input_init()
546 if (btv->c.pci->subsystem_vendor) { in bttv_input_init()
547 rc->input_id.vendor = btv->c.pci->subsystem_vendor; in bttv_input_init()
548 rc->input_id.product = btv->c.pci->subsystem_device; in bttv_input_init()
550 rc->input_id.vendor = btv->c.pci->vendor; in bttv_input_init()
551 rc->input_id.product = btv->c.pci->device; in bttv_input_init()
553 rc->dev.parent = &btv->c.pci->dev; in bttv_input_init()
557 btv->remote = ir; in bttv_input_init()
558 bttv_ir_start(btv, ir); in bttv_input_init()
568 bttv_ir_stop(btv); in bttv_input_init()
569 btv->remote = NULL; in bttv_input_init()
576 void bttv_input_fini(struct bttv *btv) in bttv_input_fini() argument
578 if (btv->remote == NULL) in bttv_input_fini()
581 bttv_ir_stop(btv); in bttv_input_fini()
582 rc_unregister_device(btv->remote->dev); in bttv_input_fini()
583 kfree(btv->remote); in bttv_input_fini()
584 btv->remote = NULL; in bttv_input_fini()