Home
last modified time | relevance | path

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

1234

/drivers/media/rc/
Diguanair.c82 static void process_ir_data(struct iguanair *ir, unsigned len) in process_ir_data() argument
84 if (len >= 4 && ir->buf_in[0] == 0 && ir->buf_in[1] == 0) { in process_ir_data()
85 switch (ir->buf_in[3]) { in process_ir_data()
88 ir->version = (ir->buf_in[5] << 8) | in process_ir_data()
89 ir->buf_in[4]; in process_ir_data()
90 complete(&ir->completion); in process_ir_data()
95 ir->bufsize = ir->buf_in[4]; in process_ir_data()
96 complete(&ir->completion); in process_ir_data()
101 ir->cycle_overhead = ir->buf_in[5]; in process_ir_data()
102 complete(&ir->completion); in process_ir_data()
[all …]
Dmceusb.c596 static void mceusb_dev_printdata(struct mceusb_dev *ir, u8 *buf, int buf_len, in mceusb_dev_printdata() argument
602 struct device *dev = ir->dev; in mceusb_dev_printdata()
619 if (ir->flags.microsoft_gen1 && !out && !offset) { in mceusb_dev_printdata()
774 static void mceusb_defer_kevent(struct mceusb_dev *ir, int kevent) in mceusb_defer_kevent() argument
776 set_bit(kevent, &ir->kevent_flags); in mceusb_defer_kevent()
778 if (test_bit(EVENT_RST_PEND, &ir->kevent_flags)) { in mceusb_defer_kevent()
779 dev_dbg(ir->dev, "kevent %d dropped pending USB Reset Device", in mceusb_defer_kevent()
784 if (!schedule_work(&ir->kevent)) in mceusb_defer_kevent()
785 dev_dbg(ir->dev, "kevent %d already scheduled", kevent); in mceusb_defer_kevent()
787 dev_dbg(ir->dev, "kevent %d scheduled", kevent); in mceusb_defer_kevent()
[all …]
Dmtk-cir.c145 static inline u32 mtk_chkdata_reg(struct mtk_ir *ir, u32 i) in mtk_chkdata_reg() argument
147 return ir->data->regs[MTK_CHKDATA_REG] + 4 * i; in mtk_chkdata_reg()
150 static inline u32 mtk_chk_period(struct mtk_ir *ir) in mtk_chk_period() argument
156 clk_get_rate(ir->bus) / ir->data->div); in mtk_chk_period()
164 dev_dbg(ir->dev, "@pwm clk = \t%lu\n", in mtk_chk_period()
165 clk_get_rate(ir->bus) / ir->data->div); in mtk_chk_period()
166 dev_dbg(ir->dev, "@chkperiod = %08x\n", val); in mtk_chk_period()
171 static void mtk_w32_mask(struct mtk_ir *ir, u32 val, u32 mask, unsigned int reg) in mtk_w32_mask() argument
175 tmp = __raw_readl(ir->base + reg); in mtk_w32_mask()
177 __raw_writel(tmp, ir->base + reg); in mtk_w32_mask()
[all …]
Dsunxi-cir.c61 #define REG_RXSTA_GET_AC(val) (((val) >> 8) & (ir->fifo_size * 2 - 1))
109 struct sunxi_ir *ir = dev_id; in sunxi_ir_irq() local
112 spin_lock(&ir->ir_lock); in sunxi_ir_irq()
114 status = readl(ir->base + SUNXI_IR_RXSTA_REG); in sunxi_ir_irq()
117 writel(status | REG_RXSTA_CLEARALL, ir->base + SUNXI_IR_RXSTA_REG); in sunxi_ir_irq()
123 rc = rc > ir->fifo_size ? ir->fifo_size : rc; in sunxi_ir_irq()
127 dt = readb(ir->base + SUNXI_IR_RXFIFO_REG); in sunxi_ir_irq()
130 ir->rc->rx_resolution; in sunxi_ir_irq()
131 ir_raw_event_store_with_filter(ir->rc, &rawir); in sunxi_ir_irq()
136 ir_raw_event_reset(ir->rc); in sunxi_ir_irq()
[all …]
Digorplugusb.c46 static void igorplugusb_cmd(struct igorplugusb *ir, int cmd);
48 static void igorplugusb_irdata(struct igorplugusb *ir, unsigned len) in igorplugusb_irdata() argument
53 dev_dbg(ir->dev, "irdata: %*ph (len=%u)", len, ir->buf_in, len); in igorplugusb_irdata()
61 overflow = ir->buf_in[2]; in igorplugusb_irdata()
65 dev_err(ir->dev, "receive overflow invalid: %u", overflow); in igorplugusb_irdata()
68 dev_warn(ir->dev, "receive overflow, at least %u lost", in igorplugusb_irdata()
72 rawir.duration = ir->buf_in[i] * 85333; in igorplugusb_irdata()
75 ir_raw_event_store_with_filter(ir->rc, &rawir); in igorplugusb_irdata()
82 rawir.duration = ir->rc->timeout; in igorplugusb_irdata()
84 ir_raw_event_store_with_filter(ir->rc, &rawir); in igorplugusb_irdata()
[all …]
Dmeson-ir.c68 static void meson_ir_set_mask(struct meson_ir *ir, unsigned int reg, in meson_ir_set_mask() argument
73 data = readl(ir->reg + reg); in meson_ir_set_mask()
76 writel(data, ir->reg + reg); in meson_ir_set_mask()
81 struct meson_ir *ir = dev_id; in meson_ir_irq() local
85 spin_lock(&ir->lock); in meson_ir_irq()
87 duration = readl_relaxed(ir->reg + IR_DEC_REG1); in meson_ir_irq()
91 status = readl_relaxed(ir->reg + IR_DEC_STATUS); in meson_ir_irq()
94 ir_raw_event_store_with_timeout(ir->rc, &rawir); in meson_ir_irq()
96 spin_unlock(&ir->lock); in meson_ir_irq()
107 struct meson_ir *ir; in meson_ir_probe() local
[all …]
Dtango-ir.c55 static void tango_ir_handle_nec(struct tango_ir *ir) in tango_ir_handle_nec() argument
60 v = readl_relaxed(ir->rc5_base + IR_NEC_DATA); in tango_ir_handle_nec()
62 rc_repeat(ir->rc); in tango_ir_handle_nec()
67 rc_keydown(ir->rc, proto, code, 0); in tango_ir_handle_nec()
70 static void tango_ir_handle_rc5(struct tango_ir *ir) in tango_ir_handle_rc5() argument
74 data = readl_relaxed(ir->rc5_base + IR_RC5_DATA); in tango_ir_handle_rc5()
84 rc_keydown(ir->rc, RC_PROTO_RC5, code, toggle); in tango_ir_handle_rc5()
87 static void tango_ir_handle_rc6(struct tango_ir *ir) in tango_ir_handle_rc6() argument
91 data0 = readl_relaxed(ir->rc6_base + RC6_DATA0); in tango_ir_handle_rc6()
92 data1 = readl_relaxed(ir->rc6_base + RC6_DATA1); in tango_ir_handle_rc6()
[all …]
DMakefile6 rc-core-y := rc-main.o rc-ir-raw.o
9 obj-$(CONFIG_IR_NEC_DECODER) += ir-nec-decoder.o
10 obj-$(CONFIG_IR_RC5_DECODER) += ir-rc5-decoder.o
11 obj-$(CONFIG_IR_RC6_DECODER) += ir-rc6-decoder.o
12 obj-$(CONFIG_IR_JVC_DECODER) += ir-jvc-decoder.o
13 obj-$(CONFIG_IR_SONY_DECODER) += ir-sony-decoder.o
14 obj-$(CONFIG_IR_SANYO_DECODER) += ir-sanyo-decoder.o
15 obj-$(CONFIG_IR_SHARP_DECODER) += ir-sharp-decoder.o
16 obj-$(CONFIG_IR_MCE_KBD_DECODER) += ir-mce_kbd-decoder.o
17 obj-$(CONFIG_IR_XMP_DECODER) += ir-xmp-decoder.o
[all …]
/drivers/media/pci/cx88/
Dcx88-input.c58 printk(KERN_DEBUG "%s IR: " fmt, ir->core->name, ##arg);\
68 static void cx88_ir_handle_key(struct cx88_IR *ir) in cx88_ir_handle_key() argument
70 struct cx88_core *core = ir->core; in cx88_ir_handle_key()
74 gpio = cx_read(ir->gpio_addr); in cx88_ir_handle_key()
107 if (ir->polling) { in cx88_ir_handle_key()
108 if (ir->last_gpio == auxgpio) in cx88_ir_handle_key()
110 ir->last_gpio = auxgpio; in cx88_ir_handle_key()
114 data = ir_extract_bits(gpio, ir->mask_keycode); in cx88_ir_handle_key()
117 ir->polling ? "poll" : "irq", in cx88_ir_handle_key()
118 (gpio & ir->mask_keydown) ? " down" : "", in cx88_ir_handle_key()
[all …]
/drivers/media/usb/tm6000/
Dtm6000-input.c39 printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
66 struct tm6000_IR *ir = dev->ir; in tm6000_ir_wait() local
68 if (!dev->ir) in tm6000_ir_wait()
71 dprintk(2, "%s: %i\n",__func__, ir->wait); in tm6000_ir_wait()
74 ir->wait = 1; in tm6000_ir_wait()
76 ir->wait = 0; in tm6000_ir_wait()
79 static int tm6000_ir_config(struct tm6000_IR *ir) in tm6000_ir_config() argument
81 struct tm6000_core *dev = ir->dev; in tm6000_ir_config()
98 switch (ir->rc_proto) { in tm6000_ir_config()
112 if (ir->rc_proto == RC_PROTO_BIT_NEC) in tm6000_ir_config()
[all …]
/drivers/media/pci/bt8xx/
Dbttv-input.c42 struct bttv_ir *ir = btv->remote; in ir_handle_key() local
47 if (ir->polling) { in ir_handle_key()
48 if (ir->last_gpio == gpio) in ir_handle_key()
50 ir->last_gpio = gpio; in ir_handle_key()
54 data = ir_extract_bits(gpio, ir->mask_keycode); in ir_handle_key()
57 ir->polling ? "poll" : "irq", in ir_handle_key()
58 (gpio & ir->mask_keydown) ? " down" : "", in ir_handle_key()
59 (gpio & ir->mask_keyup) ? " up" : ""); in ir_handle_key()
61 if ((ir->mask_keydown && (gpio & ir->mask_keydown)) || in ir_handle_key()
62 (ir->mask_keyup && !(gpio & ir->mask_keyup))) { in ir_handle_key()
[all …]
/drivers/media/usb/au0828/
Dau0828-input.c36 int (*get_key_i2c)(struct au0828_rc *ir);
43 static int au8522_rc_write(struct au0828_rc *ir, u16 reg, u8 data) in au8522_rc_write() argument
47 struct i2c_msg msg = { .addr = ir->i2c_dev_addr, .flags = 0, in au8522_rc_write()
50 rc = i2c_transfer(ir->dev->i2c_client.adapter, &msg, 1); in au8522_rc_write()
58 static int au8522_rc_read(struct au0828_rc *ir, u16 reg, int val, in au8522_rc_read() argument
63 struct i2c_msg msg[2] = { { .addr = ir->i2c_dev_addr, .flags = 0, in au8522_rc_read()
65 { .addr = ir->i2c_dev_addr, .flags = I2C_M_RD, in au8522_rc_read()
75 rc = i2c_transfer(ir->dev->i2c_client.adapter, msg, 2); in au8522_rc_read()
83 static int au8522_rc_andor(struct au0828_rc *ir, u16 reg, u8 mask, u8 value) in au8522_rc_andor() argument
88 rc = au8522_rc_read(ir, reg, -1, &buf, 1); in au8522_rc_andor()
[all …]
/drivers/media/i2c/
Dir-kbd-i2c.c59 static int get_key_haup_common(struct IR_i2c *ir, enum rc_proto *protocol, in get_key_haup_common() argument
66 if (size != i2c_master_recv(ir->c, buf, size)) in get_key_haup_common()
96 dev_dbg(&ir->rc->dev, in get_key_haup_common()
114 dev_dbg(&ir->rc->dev, in get_key_haup_common()
120 dev_dbg(&ir->rc->dev, in get_key_haup_common()
133 static int get_key_haup(struct IR_i2c *ir, enum rc_proto *protocol, in get_key_haup() argument
136 return get_key_haup_common(ir, protocol, scancode, toggle, 3); in get_key_haup()
139 static int get_key_haup_xvr(struct IR_i2c *ir, enum rc_proto *protocol, in get_key_haup_xvr() argument
151 ret = i2c_master_send(ir->c, buf, 1); in get_key_haup_xvr()
155 return get_key_haup_common(ir, protocol, scancode, toggle, 6); in get_key_haup_xvr()
[all …]
/drivers/media/pci/smipcie/
Dsmipcie-ir.c13 static void smi_ir_enableInterrupt(struct smi_rc *ir) in smi_ir_enableInterrupt() argument
15 struct smi_dev *dev = ir->dev; in smi_ir_enableInterrupt()
20 static void smi_ir_disableInterrupt(struct smi_rc *ir) in smi_ir_disableInterrupt() argument
22 struct smi_dev *dev = ir->dev; in smi_ir_disableInterrupt()
27 static void smi_ir_clearInterrupt(struct smi_rc *ir) in smi_ir_clearInterrupt() argument
29 struct smi_dev *dev = ir->dev; in smi_ir_clearInterrupt()
34 static void smi_ir_stop(struct smi_rc *ir) in smi_ir_stop() argument
36 struct smi_dev *dev = ir->dev; in smi_ir_stop()
38 smi_ir_disableInterrupt(ir); in smi_ir_stop()
59 static void smi_ir_decode(struct smi_rc *ir) in smi_ir_decode() argument
[all …]
/drivers/media/usb/em28xx/
Dem28xx-input.c43 dev_printk(KERN_DEBUG, &ir->dev->intf->dev, \
73 int (*get_key_i2c)(struct i2c_client *ir, enum rc_proto *protocol,
75 int (*get_key)(struct em28xx_IR *ir, struct em28xx_ir_poll_result *r);
204 static int default_polling_getkey(struct em28xx_IR *ir, in default_polling_getkey() argument
207 struct em28xx *dev = ir->dev; in default_polling_getkey()
227 switch (ir->rc_proto) { in default_polling_getkey()
247 static int em2874_polling_getkey(struct em28xx_IR *ir, in em2874_polling_getkey() argument
250 struct em28xx *dev = ir->dev; in em2874_polling_getkey()
273 switch (ir->rc_proto) { in em2874_polling_getkey()
303 static int em28xx_i2c_ir_handle_key(struct em28xx_IR *ir) in em28xx_i2c_ir_handle_key() argument
[all …]
/drivers/media/pci/saa7134/
Dsaa7134-input.c34 #define ir_dbg(ir, fmt, arg...) do { \ argument
36 printk(KERN_DEBUG pr_fmt("ir %s: " fmt), ir->rc->device_name, \
47 struct saa7134_card_ir *ir = dev->remote; in build_key() local
62 if (ir->polling) { in build_key()
63 if (ir->last_gpio == gpio) in build_key()
65 ir->last_gpio = gpio; in build_key()
68 data = ir_extract_bits(gpio, ir->mask_keycode); in build_key()
70 gpio, ir->mask_keycode, data); in build_key()
74 if (data == ir->mask_keycode) in build_key()
75 rc_keyup(ir->dev); in build_key()
[all …]
/drivers/media/rc/img-ir/
DMakefile2 img-ir-y := img-ir-core.o
3 img-ir-$(CONFIG_IR_IMG_RAW) += img-ir-raw.o
4 img-ir-$(CONFIG_IR_IMG_HW) += img-ir-hw.o
5 img-ir-$(CONFIG_IR_IMG_NEC) += img-ir-nec.o
6 img-ir-$(CONFIG_IR_IMG_JVC) += img-ir-jvc.o
7 img-ir-$(CONFIG_IR_IMG_SONY) += img-ir-sony.o
8 img-ir-$(CONFIG_IR_IMG_SHARP) += img-ir-sharp.o
9 img-ir-$(CONFIG_IR_IMG_SANYO) += img-ir-sanyo.o
10 img-ir-$(CONFIG_IR_IMG_RC5) += img-ir-rc5.o
11 img-ir-$(CONFIG_IR_IMG_RC6) += img-ir-rc6.o
[all …]
/drivers/media/common/siano/
Dsmsir.c34 ir_raw_event_store(coredev->ir.dev, &ev); in sms_ir_event()
36 ir_raw_event_handle(coredev->ir.dev); in sms_ir_event()
50 coredev->ir.controller = 0; /* Todo: vega/nova SPI number */ in sms_ir_init()
51 coredev->ir.timeout = IR_DEFAULT_TIMEOUT; in sms_ir_init()
53 coredev->ir.controller, coredev->ir.timeout); in sms_ir_init()
55 snprintf(coredev->ir.name, sizeof(coredev->ir.name), in sms_ir_init()
58 strscpy(coredev->ir.phys, coredev->devpath, sizeof(coredev->ir.phys)); in sms_ir_init()
59 strlcat(coredev->ir.phys, "/ir0", sizeof(coredev->ir.phys)); in sms_ir_init()
61 dev->device_name = coredev->ir.name; in sms_ir_init()
62 dev->input_phys = coredev->ir.phys; in sms_ir_init()
[all …]
/drivers/media/pci/ttpci/
Dav7110_ir.c23 struct rc_dev *rcdev = av7110->ir.rcdev; in av7110_ir_handler()
31 switch (av7110->ir.ir_config) { in av7110_ir_handler()
63 av7110->ir.ir_config); in av7110_ir_handler()
73 dprintk(4, "ir config = %08x\n", av7110->ir.ir_config); in av7110_set_ir_config()
76 av7110->ir.ir_config); in av7110_set_ir_config()
97 if (ir_config == av7110->ir.ir_config) in change_protocol()
100 av7110->ir.ir_config = ir_config; in change_protocol()
117 snprintf(av7110->ir.input_phys, sizeof(av7110->ir.input_phys), in av7110_ir_init()
122 rcdev->input_phys = av7110->ir.input_phys; in av7110_ir_init()
139 av7110->ir.rcdev = rcdev; in av7110_ir_init()
[all …]
Dbudget-ci.c98 struct budget_ci_ir ir; member
105 struct rc_dev *dev = budget_ci->ir.dev; in msp430_ir_interrupt()
132 budget_ci->ir.have_command = true; in msp430_ir_interrupt()
133 budget_ci->ir.ir_key = command & 0x3f; in msp430_ir_interrupt()
138 if (!budget_ci->ir.have_command) in msp430_ir_interrupt()
140 budget_ci->ir.have_command = false; in msp430_ir_interrupt()
142 if (budget_ci->ir.rc5_device != IR_DEVICE_ANY && in msp430_ir_interrupt()
143 budget_ci->ir.rc5_device != (command & 0x1f)) in msp430_ir_interrupt()
146 if (budget_ci->ir.full_rc5) { in msp430_ir_interrupt()
148 RC_SCANCODE_RC5(budget_ci->ir.rc5_device, budget_ci->ir.ir_key), in msp430_ir_interrupt()
[all …]
/drivers/media/platform/seco-cec/
Dseco-cec.c30 struct rc_dev *ir; member
355 cec->ir = devm_rc_allocate_device(dev, RC_DRIVER_SCANCODE); in secocec_ir_probe()
356 if (!cec->ir) in secocec_ir_probe()
362 cec->ir->device_name = dev_name(dev); in secocec_ir_probe()
363 cec->ir->input_phys = cec->ir_input_phys; in secocec_ir_probe()
364 cec->ir->input_id.bustype = BUS_HOST; in secocec_ir_probe()
365 cec->ir->input_id.vendor = 0; in secocec_ir_probe()
366 cec->ir->input_id.product = 0; in secocec_ir_probe()
367 cec->ir->input_id.version = 1; in secocec_ir_probe()
368 cec->ir->driver_name = SECOCEC_DEV_NAME; in secocec_ir_probe()
[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/media/pci/cx23885/
Dcx23885-input.c45 v4l2_subdev_call(dev->sd_ir, ir, rx_read, (u8 *) ir_core_event, in cx23885_input_process_measurements()
106 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); in cx23885_input_rx_work_handler()
110 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); in cx23885_input_rx_work_handler()
121 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); in cx23885_input_rx_work_handler()
134 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); in cx23885_input_ir_start()
208 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); in cx23885_input_ir_start()
237 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); in cx23885_input_ir_stop()
242 v4l2_subdev_call(dev->sd_ir, ir, rx_s_parameters, &params); in cx23885_input_ir_stop()
243 v4l2_subdev_call(dev->sd_ir, ir, rx_g_parameters, &params); in cx23885_input_ir_stop()
/drivers/hid/
Dhid-wiimote-modules.c550 static void wiimod_ir_in_ir(struct wiimote_data *wdata, const __u8 *ir, in wiimod_ir_in_ir() argument
593 x = ir[1] | ((ir[0] & 0x03) << 8); in wiimod_ir_in_ir()
594 y = ir[2] | ((ir[0] & 0x0c) << 6); in wiimod_ir_in_ir()
596 x = ir[0] | ((ir[2] & 0x30) << 4); in wiimod_ir_in_ir()
597 y = ir[1] | ((ir[2] & 0xc0) << 2); in wiimod_ir_in_ir()
600 input_report_abs(wdata->ir, xid, x); in wiimod_ir_in_ir()
601 input_report_abs(wdata->ir, yid, y); in wiimod_ir_in_ir()
604 input_sync(wdata->ir); in wiimod_ir_in_ir()
738 wdata->ir = input_allocate_device(); in wiimod_ir_probe()
739 if (!wdata->ir) in wiimod_ir_probe()
[all …]
/drivers/media/usb/cx231xx/
Dcx231xx-input.c17 static int get_key_isdbt(struct IR_i2c *ir, enum rc_proto *protocol, in get_key_isdbt() argument
23 dev_dbg(&ir->rc->dev, "%s\n", __func__); in get_key_isdbt()
26 rc = i2c_master_recv(ir->c, &cmd, 1); in get_key_isdbt()
41 dev_dbg(&ir->rc->dev, "cmd %02x, scan = %02x\n", cmd, scancode); in get_key_isdbt()

1234