Home
last modified time | relevance | path

Searched refs:ir (Results 1 – 25 of 75) sorted by relevance

123

/drivers/media/rc/
Diguanair.c95 static void process_ir_data(struct iguanair *ir, unsigned len) in process_ir_data() argument
97 if (len >= 4 && ir->buf_in[0] == 0 && ir->buf_in[1] == 0) { in process_ir_data()
98 switch (ir->buf_in[3]) { in process_ir_data()
101 ir->version = (ir->buf_in[5] << 8) | in process_ir_data()
102 ir->buf_in[4]; in process_ir_data()
103 complete(&ir->completion); in process_ir_data()
108 ir->bufsize = ir->buf_in[4]; in process_ir_data()
109 complete(&ir->completion); in process_ir_data()
114 ir->cycle_overhead = ir->buf_in[5]; in process_ir_data()
115 complete(&ir->completion); in process_ir_data()
[all …]
Dlirc_dev.c77 static void lirc_irctl_init(struct irctl *ir) in lirc_irctl_init() argument
79 mutex_init(&ir->irctl_lock); in lirc_irctl_init()
80 ir->d.minor = NOPLUG; in lirc_irctl_init()
83 static void lirc_irctl_cleanup(struct irctl *ir) in lirc_irctl_cleanup() argument
85 device_destroy(lirc_class, MKDEV(MAJOR(lirc_base_dev), ir->d.minor)); in lirc_irctl_cleanup()
87 if (ir->buf != ir->d.rbuf) { in lirc_irctl_cleanup()
88 lirc_buffer_free(ir->buf); in lirc_irctl_cleanup()
89 kfree(ir->buf); in lirc_irctl_cleanup()
91 ir->buf = NULL; in lirc_irctl_cleanup()
98 static int lirc_add_to_buf(struct irctl *ir) in lirc_add_to_buf() argument
[all …]
Dsunxi-cir.c64 #define REG_RXSTA_GET_AC(val) (((val) >> 8) & (ir->fifo_size * 2 - 1))
105 struct sunxi_ir *ir = dev_id; in sunxi_ir_irq() local
108 spin_lock(&ir->ir_lock); in sunxi_ir_irq()
110 status = readl(ir->base + SUNXI_IR_RXSTA_REG); in sunxi_ir_irq()
113 writel(status | REG_RXSTA_CLEARALL, ir->base + SUNXI_IR_RXSTA_REG); in sunxi_ir_irq()
119 rc = rc > ir->fifo_size ? ir->fifo_size : rc; in sunxi_ir_irq()
123 dt = readb(ir->base + SUNXI_IR_RXFIFO_REG); in sunxi_ir_irq()
126 ir_raw_event_store_with_filter(ir->rc, &rawir); in sunxi_ir_irq()
131 ir_raw_event_reset(ir->rc); in sunxi_ir_irq()
133 ir_raw_event_set_idle(ir->rc, true); in sunxi_ir_irq()
[all …]
Dmceusb.c544 static void mceusb_dev_printdata(struct mceusb_dev *ir, char *buf, in mceusb_dev_printdata() argument
550 struct device *dev = ir->dev; in mceusb_dev_printdata()
555 if (ir->flags.microsoft_gen1 && !out && !offset) in mceusb_dev_printdata()
675 else if (ir->learning_enabled) in mceusb_dev_printdata()
702 dev_dbg(dev, "Raw IR data, %d pulse/space samples", ir->rem); in mceusb_dev_printdata()
708 struct mceusb_dev *ir; in mce_async_callback() local
714 ir = urb->context; in mce_async_callback()
721 mceusb_dev_printdata(ir, urb->transfer_buffer, 0, len, true); in mce_async_callback()
732 dev_err(ir->dev, "Error: request urb status = %d", urb->status); in mce_async_callback()
742 static void mce_request_packet(struct mceusb_dev *ir, unsigned char *data, in mce_request_packet() argument
[all …]
Digorplugusb.c55 static void igorplugusb_cmd(struct igorplugusb *ir, int cmd);
57 static void igorplugusb_irdata(struct igorplugusb *ir, unsigned len) in igorplugusb_irdata() argument
62 dev_dbg(ir->dev, "irdata: %*ph (len=%u)", len, ir->buf_in, len); in igorplugusb_irdata()
70 overflow = ir->buf_in[2]; in igorplugusb_irdata()
74 dev_err(ir->dev, "receive overflow invalid: %u", overflow); in igorplugusb_irdata()
77 dev_warn(ir->dev, "receive overflow, at least %u lost", in igorplugusb_irdata()
81 rawir.duration = ir->buf_in[i] * 85333; in igorplugusb_irdata()
84 ir_raw_event_store_with_filter(ir->rc, &rawir); in igorplugusb_irdata()
91 rawir.duration = ir->rc->timeout; in igorplugusb_irdata()
93 ir_raw_event_store_with_filter(ir->rc, &rawir); in igorplugusb_irdata()
[all …]
Dmeson-ir.c75 static void meson_ir_set_mask(struct meson_ir *ir, unsigned int reg, in meson_ir_set_mask() argument
80 data = readl(ir->reg + reg); in meson_ir_set_mask()
83 writel(data, ir->reg + reg); in meson_ir_set_mask()
88 struct meson_ir *ir = dev_id; in meson_ir_irq() local
92 spin_lock(&ir->lock); in meson_ir_irq()
94 duration = readl(ir->reg + IR_DEC_REG1); in meson_ir_irq()
98 rawir.pulse = !!(readl(ir->reg + IR_DEC_STATUS) & STATUS_IR_DEC_IN); in meson_ir_irq()
100 ir_raw_event_store_with_filter(ir->rc, &rawir); in meson_ir_irq()
101 ir_raw_event_handle(ir->rc); in meson_ir_irq()
103 spin_unlock(&ir->lock); in meson_ir_irq()
[all …]
DMakefile1 rc-core-objs := rc-main.o rc-ir-raw.o
7 obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
8 obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
9 obj-$(CONFIG_IR_RC6_DECODER) += ir-rc6-decoder.o
10 obj-$(CONFIG_IR_JVC_DECODER) += ir-jvc-decoder.o
11 obj-$(CONFIG_IR_SONY_DECODER) += ir-sony-decoder.o
12 obj-$(CONFIG_IR_SANYO_DECODER) += ir-sanyo-decoder.o
13 obj-$(CONFIG_IR_SHARP_DECODER) += ir-sharp-decoder.o
14 obj-$(CONFIG_IR_MCE_KBD_DECODER) += ir-mce_kbd-decoder.o
15 obj-$(CONFIG_IR_LIRC_CODEC) += ir-lirc-codec.o
[all …]
/drivers/media/pci/cx88/
Dcx88-input.c69 printk(KERN_DEBUG "%s IR: " fmt , ir->core->name , ##arg)
76 static void cx88_ir_handle_key(struct cx88_IR *ir) in cx88_ir_handle_key() argument
78 struct cx88_core *core = ir->core; in cx88_ir_handle_key()
82 gpio = cx_read(ir->gpio_addr); in cx88_ir_handle_key()
114 if (ir->polling) { in cx88_ir_handle_key()
115 if (ir->last_gpio == auxgpio) in cx88_ir_handle_key()
117 ir->last_gpio = auxgpio; in cx88_ir_handle_key()
121 data = ir_extract_bits(gpio, ir->mask_keycode); in cx88_ir_handle_key()
124 ir->polling ? "poll" : "irq", in cx88_ir_handle_key()
125 (gpio & ir->mask_keydown) ? " down" : "", in cx88_ir_handle_key()
[all …]
/drivers/media/usb/tm6000/
Dtm6000-input.c51 printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
79 struct tm6000_IR *ir = dev->ir; in tm6000_ir_wait() local
81 if (!dev->ir) in tm6000_ir_wait()
84 dprintk(2, "%s: %i\n",__func__, ir->wait); in tm6000_ir_wait()
87 ir->wait = 1; in tm6000_ir_wait()
89 ir->wait = 0; in tm6000_ir_wait()
92 static int tm6000_ir_config(struct tm6000_IR *ir) in tm6000_ir_config() argument
94 struct tm6000_core *dev = ir->dev; in tm6000_ir_config()
111 switch (ir->rc_type) { in tm6000_ir_config()
125 if (ir->rc_type == RC_BIT_NEC) in tm6000_ir_config()
[all …]
/drivers/media/pci/bt8xx/
Dbttv-input.c55 struct bttv_ir *ir = btv->remote; in ir_handle_key() local
60 if (ir->polling) { in ir_handle_key()
61 if (ir->last_gpio == gpio) in ir_handle_key()
63 ir->last_gpio = gpio; in ir_handle_key()
67 data = ir_extract_bits(gpio, ir->mask_keycode); in ir_handle_key()
70 ir->polling ? "poll" : "irq", in ir_handle_key()
71 (gpio & ir->mask_keydown) ? " down" : "", in ir_handle_key()
72 (gpio & ir->mask_keyup) ? " up" : ""); in ir_handle_key()
74 if ((ir->mask_keydown && (gpio & ir->mask_keydown)) || in ir_handle_key()
75 (ir->mask_keyup && !(gpio & ir->mask_keyup))) { in ir_handle_key()
[all …]
/drivers/media/pci/ttpci/
Dav7110_ir.c92 struct infrared *ir = (struct infrared *) parm; in av7110_emit_keyup() local
94 if (!ir || !test_bit(ir->last_key, ir->input_dev->key)) in av7110_emit_keyup()
97 input_report_key(ir->input_dev, ir->last_key, 0); in av7110_emit_keyup()
98 input_sync(ir->input_dev); in av7110_emit_keyup()
105 struct infrared *ir = (struct infrared *) parm; in av7110_emit_key() local
106 u32 ircom = ir->ir_command; in av7110_emit_key()
113 switch (ir->protocol) { in av7110_emit_key()
136 printk("%s invalid protocol %x\n", __func__, ir->protocol); in av7110_emit_key()
140 input_event(ir->input_dev, EV_MSC, MSC_RAW, (addr << 16) | data); in av7110_emit_key()
141 input_event(ir->input_dev, EV_MSC, MSC_SCAN, data); in av7110_emit_key()
[all …]
Dbudget-ci.c115 struct budget_ci_ir ir; member
122 struct rc_dev *dev = budget_ci->ir.dev; in msp430_ir_interrupt()
149 budget_ci->ir.have_command = true; in msp430_ir_interrupt()
150 budget_ci->ir.ir_key = command & 0x3f; in msp430_ir_interrupt()
155 if (!budget_ci->ir.have_command) in msp430_ir_interrupt()
157 budget_ci->ir.have_command = false; in msp430_ir_interrupt()
159 if (budget_ci->ir.rc5_device != IR_DEVICE_ANY && in msp430_ir_interrupt()
160 budget_ci->ir.rc5_device != (command & 0x1f)) in msp430_ir_interrupt()
163 if (budget_ci->ir.full_rc5) { in msp430_ir_interrupt()
165 RC_SCANCODE_RC5(budget_ci->ir.rc5_device, budget_ci->ir.ir_key), in msp430_ir_interrupt()
[all …]
/drivers/media/usb/au0828/
Dau0828-input.c47 int (*get_key_i2c)(struct au0828_rc *ir);
54 static int au8522_rc_write(struct au0828_rc *ir, u16 reg, u8 data) in au8522_rc_write() argument
58 struct i2c_msg msg = { .addr = ir->i2c_dev_addr, .flags = 0, in au8522_rc_write()
61 rc = i2c_transfer(ir->dev->i2c_client.adapter, &msg, 1); in au8522_rc_write()
69 static int au8522_rc_read(struct au0828_rc *ir, u16 reg, int val, in au8522_rc_read() argument
74 struct i2c_msg msg[2] = { { .addr = ir->i2c_dev_addr, .flags = 0, in au8522_rc_read()
76 { .addr = ir->i2c_dev_addr, .flags = I2C_M_RD, in au8522_rc_read()
86 rc = i2c_transfer(ir->dev->i2c_client.adapter, msg, 2); in au8522_rc_read()
94 static int au8522_rc_andor(struct au0828_rc *ir, u16 reg, u8 mask, u8 value) in au8522_rc_andor() argument
99 rc = au8522_rc_read(ir, reg, -1, &buf, 1); in au8522_rc_andor()
[all …]
/drivers/staging/media/lirc/
Dlirc_zilog.c71 struct IR *ir; member
87 struct IR *ir; member
163 static struct IR *get_ir_device(struct IR *ir, bool ir_devices_lock_held) in get_ir_device() argument
166 kref_get(&ir->ref); in get_ir_device()
169 kref_get(&ir->ref); in get_ir_device()
172 return ir; in get_ir_device()
177 struct IR *ir = container_of(ref, struct IR, ref); in release_ir_device() local
187 if (ir->l.minor >= 0 && ir->l.minor < MAX_IRCTL_DEVICES) { in release_ir_device()
188 lirc_unregister_driver(ir->l.minor); in release_ir_device()
189 ir->l.minor = MAX_IRCTL_DEVICES; in release_ir_device()
[all …]
DTODO.lirc_zilog1 1. Both ir-kbd-i2c and lirc_zilog provide support for RX events for
4 a. ir-kbd-i2c needs a module parameter added to allow the user to tell
5 ir-kbd-i2c to ignore Z8 IR units.
7 b. lirc_zilog should provide Rx key presses to the rc core like ir-kbd-i2c
30 Note: Both lirc_zilog and ir-kbd-i2c support the Zilog Z8 for IR, as programmed
/drivers/media/i2c/
Dir-kbd-i2c.c66 static int get_key_haup_common(struct IR_i2c *ir, enum rc_type *protocol, in get_key_haup_common() argument
73 if (size != i2c_master_recv(ir->c, buf, size)) in get_key_haup_common()
137 static int get_key_haup(struct IR_i2c *ir, enum rc_type *protocol, in get_key_haup() argument
140 return get_key_haup_common(ir, protocol, scancode, toggle, 3); in get_key_haup()
143 static int get_key_haup_xvr(struct IR_i2c *ir, enum rc_type *protocol, in get_key_haup_xvr() argument
155 ret = i2c_master_send(ir->c, buf, 1); in get_key_haup_xvr()
159 return get_key_haup_common(ir, protocol, scancode, toggle, 6); in get_key_haup_xvr()
162 static int get_key_pixelview(struct IR_i2c *ir, enum rc_type *protocol, in get_key_pixelview() argument
168 if (1 != i2c_master_recv(ir->c, &b, 1)) { in get_key_pixelview()
179 static int get_key_fusionhdtv(struct IR_i2c *ir, enum rc_type *protocol, in get_key_fusionhdtv() argument
[all …]
/drivers/media/pci/saa7134/
Dsaa7134-input.c48 #define ir_dbg(ir, fmt, arg...) do { \ argument
50 printk(KERN_DEBUG pr_fmt("ir %s: " fmt), ir->name, ## arg); \
60 struct saa7134_card_ir *ir = dev->remote; in build_key() local
75 if (ir->polling) { in build_key()
76 if (ir->last_gpio == gpio) in build_key()
78 ir->last_gpio = gpio; in build_key()
81 data = ir_extract_bits(gpio, ir->mask_keycode); in build_key()
83 gpio, ir->mask_keycode, data); in build_key()
87 if (data == ir->mask_keycode) in build_key()
88 rc_keyup(ir->dev); in build_key()
[all …]
/drivers/media/usb/em28xx/
Dem28xx-input.c46 printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
76 int (*get_key_i2c)(struct i2c_client *ir, enum rc_type *protocol, u32 *scancode);
187 static int default_polling_getkey(struct em28xx_IR *ir, in default_polling_getkey() argument
190 struct em28xx *dev = ir->dev; in default_polling_getkey()
209 switch (ir->rc_type) { in default_polling_getkey()
229 static int em2874_polling_getkey(struct em28xx_IR *ir, in em2874_polling_getkey() argument
232 struct em28xx *dev = ir->dev; in em2874_polling_getkey()
254 switch (ir->rc_type) { in em2874_polling_getkey()
294 static int em28xx_i2c_ir_handle_key(struct em28xx_IR *ir) in em28xx_i2c_ir_handle_key() argument
300 rc = ir->get_key_i2c(ir->i2c_client, &protocol, &scancode); in em28xx_i2c_ir_handle_key()
[all …]
/drivers/media/pci/smipcie/
Dsmipcie-ir.c19 static void smi_ir_enableInterrupt(struct smi_rc *ir) in smi_ir_enableInterrupt() argument
21 struct smi_dev *dev = ir->dev; in smi_ir_enableInterrupt()
26 static void smi_ir_disableInterrupt(struct smi_rc *ir) in smi_ir_disableInterrupt() argument
28 struct smi_dev *dev = ir->dev; in smi_ir_disableInterrupt()
33 static void smi_ir_clearInterrupt(struct smi_rc *ir) in smi_ir_clearInterrupt() argument
35 struct smi_dev *dev = ir->dev; in smi_ir_clearInterrupt()
40 static void smi_ir_stop(struct smi_rc *ir) in smi_ir_stop() argument
42 struct smi_dev *dev = ir->dev; in smi_ir_stop()
44 smi_ir_disableInterrupt(ir); in smi_ir_stop()
116 struct smi_rc *ir = container_of(work, struct smi_rc, work); in smi_ir_decode() local
[all …]
/drivers/media/rc/img-ir/
DMakefile1 img-ir-y := img-ir-core.o
2 img-ir-$(CONFIG_IR_IMG_RAW) += img-ir-raw.o
3 img-ir-$(CONFIG_IR_IMG_HW) += img-ir-hw.o
4 img-ir-$(CONFIG_IR_IMG_NEC) += img-ir-nec.o
5 img-ir-$(CONFIG_IR_IMG_JVC) += img-ir-jvc.o
6 img-ir-$(CONFIG_IR_IMG_SONY) += img-ir-sony.o
7 img-ir-$(CONFIG_IR_IMG_SHARP) += img-ir-sharp.o
8 img-ir-$(CONFIG_IR_IMG_SANYO) += img-ir-sanyo.o
9 img-ir-$(CONFIG_IR_IMG_RC5) += img-ir-rc5.o
10 img-ir-$(CONFIG_IR_IMG_RC6) += img-ir-rc6.o
[all …]
/drivers/media/common/siano/
Dsmsir.c49 ir_raw_event_store(coredev->ir.dev, &ev); in sms_ir_event()
51 ir_raw_event_handle(coredev->ir.dev); in sms_ir_event()
65 coredev->ir.controller = 0; /* Todo: vega/nova SPI number */ in sms_ir_init()
66 coredev->ir.timeout = IR_DEFAULT_TIMEOUT; in sms_ir_init()
68 coredev->ir.controller, coredev->ir.timeout); in sms_ir_init()
70 snprintf(coredev->ir.name, sizeof(coredev->ir.name), in sms_ir_init()
73 strlcpy(coredev->ir.phys, coredev->devpath, sizeof(coredev->ir.phys)); in sms_ir_init()
74 strlcat(coredev->ir.phys, "/ir0", sizeof(coredev->ir.phys)); in sms_ir_init()
76 dev->input_name = coredev->ir.name; in sms_ir_init()
77 dev->input_phys = coredev->ir.phys; in sms_ir_init()
[all …]
/drivers/video/fbdev/
Dbt431.h76 static inline void bt431_select_reg(struct bt431_regs *regs, int ir) in bt431_select_reg() argument
86 *lo = bt431_set_value(ir & 0xff); in bt431_select_reg()
88 *hi = bt431_set_value((ir >> 8) & 0xff); in bt431_select_reg()
116 static inline u8 bt431_read_reg(struct bt431_regs *regs, int ir) in bt431_read_reg() argument
118 bt431_select_reg(regs, ir); in bt431_read_reg()
122 static inline void bt431_write_reg(struct bt431_regs *regs, int ir, u8 value) in bt431_write_reg() argument
124 bt431_select_reg(regs, ir); in bt431_write_reg()
/drivers/hid/
Dhid-wiimote-modules.c553 static void wiimod_ir_in_ir(struct wiimote_data *wdata, const __u8 *ir, in wiimod_ir_in_ir() argument
596 x = ir[1] | ((ir[0] & 0x03) << 8); in wiimod_ir_in_ir()
597 y = ir[2] | ((ir[0] & 0x0c) << 6); in wiimod_ir_in_ir()
599 x = ir[0] | ((ir[2] & 0x30) << 4); in wiimod_ir_in_ir()
600 y = ir[1] | ((ir[2] & 0xc0) << 2); in wiimod_ir_in_ir()
603 input_report_abs(wdata->ir, xid, x); in wiimod_ir_in_ir()
604 input_report_abs(wdata->ir, yid, y); in wiimod_ir_in_ir()
607 input_sync(wdata->ir); in wiimod_ir_in_ir()
741 wdata->ir = input_allocate_device(); in wiimod_ir_probe()
742 if (!wdata->ir) in wiimod_ir_probe()
[all …]
/drivers/media/pci/cx23885/
Dcx23885-input.c54 v4l2_subdev_call(dev->sd_ir, ir, rx_read, (u8 *) ir_core_event, in cx23885_input_process_measurements()
114 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); in cx23885_input_rx_work_handler()
118 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); in cx23885_input_rx_work_handler()
129 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); in cx23885_input_rx_work_handler()
142 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); in cx23885_input_ir_start()
215 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); in cx23885_input_ir_start()
244 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); in cx23885_input_ir_stop()
249 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); in cx23885_input_ir_stop()
250 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); in cx23885_input_ir_stop()
/drivers/media/usb/cx231xx/
Dcx231xx-input.c27 static int get_key_isdbt(struct IR_i2c *ir, enum rc_type *protocol, in get_key_isdbt() argument
33 dev_dbg(&ir->rc->input_dev->dev, "%s\n", __func__); in get_key_isdbt()
36 rc = i2c_master_recv(ir->c, &cmd, 1); in get_key_isdbt()
51 dev_dbg(&ir->rc->input_dev->dev, "cmd %02x, scan = %02x\n", in get_key_isdbt()

123