Home
last modified time | relevance | path

Searched full:ir (Results 1 – 25 of 1432) sorted by relevance

12345678910>>...58

/kernel/linux/linux-4.19/drivers/media/rc/
Diguanair.c2 * IguanaWorks USB IR Transceiver support
91 static void process_ir_data(struct iguanair *ir, unsigned len) in process_ir_data() argument
93 if (len >= 4 && ir->buf_in[0] == 0 && ir->buf_in[1] == 0) { in process_ir_data()
94 switch (ir->buf_in[3]) { in process_ir_data()
97 ir->version = (ir->buf_in[5] << 8) | in process_ir_data()
98 ir->buf_in[4]; in process_ir_data()
99 complete(&ir->completion); in process_ir_data()
104 ir->bufsize = ir->buf_in[4]; in process_ir_data()
105 complete(&ir->completion); in process_ir_data()
110 ir->cycle_overhead = ir->buf_in[5]; in process_ir_data()
[all …]
Dsunxi-cir.c2 * Driver for Allwinner sunXi IR controller
7 * Based on sun5i-ir.c:
29 #define SUNXI_IR_DEV "sunxi-ir"
32 /* IR Control */
64 #define REG_RXSTA_GET_AC(val) (((val) >> 8) & (ir->fifo_size * 2 - 1))
68 /* IR Sample Config */
101 struct sunxi_ir *ir = dev_id; in sunxi_ir_irq() local
104 spin_lock(&ir->ir_lock); in sunxi_ir_irq()
106 status = readl(ir->base + SUNXI_IR_RXSTA_REG); in sunxi_ir_irq()
109 writel(status | REG_RXSTA_CLEARALL, ir->base + SUNXI_IR_RXSTA_REG); in sunxi_ir_irq()
[all …]
Dmtk-cir.c2 * Driver for Mediatek IR Receiver Controller
26 /* Register to enable PWM and IR */
29 /* Bit to enable IR pulse width detection */
34 * indicating IR receiving completion and then making IRQ fires
38 /* Bit to enable IR hardware function */
41 /* Bit to restart IR receiving */
47 /* IR threshold */
60 /* Indicate the end of IR message */
79 /* Register to enable IR interrupt */
81 /* Register to ack IR interrupt */
[all …]
Dmceusb.c13 * Initial port from lirc driver to ir-core drivery by Jarod, based
14 * partially on a port to an earlier proposed IR infrastructure by
16 * incoming IR buffer parsing routines.
21 * Windows-Media-Center-RC-IR-Collection-Green-Button-Specification-03-08-2011-V2.pdf
56 #define MCE_IRBUF_SIZE 128 /* TX IR buffer length */
61 #define MCE_IRDATA_TRAILER 0x80 /* End of IR data */
69 * The interface between the host and the IR hardware is command-response
87 #define MCE_CMD_PORT_IR 0x9f /* IR-related cmd/rsp */
88 #define MCE_CMD_PORT_SYS 0xff /* System (non-IR) device cmd/rsp */
149 * then we're looking at a raw IR data sample */
[all …]
Dmeson-ir.c2 * Driver for Amlogic Meson IR remote receiver
26 #define DRIVER_NAME "meson-ir"
74 static void meson_ir_set_mask(struct meson_ir *ir, unsigned int reg, in meson_ir_set_mask() argument
79 data = readl(ir->reg + reg); in meson_ir_set_mask()
82 writel(data, ir->reg + reg); in meson_ir_set_mask()
87 struct meson_ir *ir = dev_id; in meson_ir_irq() local
91 spin_lock(&ir->lock); in meson_ir_irq()
93 duration = readl_relaxed(ir->reg + IR_DEC_REG1); in meson_ir_irq()
97 status = readl_relaxed(ir->reg + IR_DEC_STATUS); in meson_ir_irq()
100 ir_raw_event_store_with_timeout(ir->rc, &rawir); in meson_ir_irq()
[all …]
Digorplugusb.c2 * IgorPlug-USB IR Receiver
30 #define DRIVER_DESC "IgorPlug-USB IR Receiver"
55 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()
[all …]
/kernel/linux/linux-5.10/drivers/media/rc/
Diguanair.c3 * IguanaWorks USB IR Transceiver support
79 static void process_ir_data(struct iguanair *ir, unsigned len) in process_ir_data() argument
81 if (len >= 4 && ir->buf_in[0] == 0 && ir->buf_in[1] == 0) { in process_ir_data()
82 switch (ir->buf_in[3]) { in process_ir_data()
85 ir->version = (ir->buf_in[5] << 8) | in process_ir_data()
86 ir->buf_in[4]; in process_ir_data()
87 complete(&ir->completion); in process_ir_data()
92 ir->bufsize = ir->buf_in[4]; in process_ir_data()
93 complete(&ir->completion); in process_ir_data()
98 ir->cycle_overhead = ir->buf_in[5]; in process_ir_data()
[all …]
Dmtk-cir.c3 * Driver for Mediatek IR Receiver Controller
17 /* Register to enable PWM and IR */
20 /* Bit to enable IR pulse width detection */
25 * indicating IR receiving completion and then making IRQ fires
29 /* Bit to enable IR hardware function */
32 /* Bit to restart IR receiving */
38 /* IR threshold */
51 /* Indicate the end of IR message */
70 /* Register to enable IR interrupt */
72 /* Register to ack IR interrupt */
[all …]
Dsunxi-cir.c3 * Driver for Allwinner sunXi IR controller
8 * Based on sun5i-ir.c:
20 #define SUNXI_IR_DEV "sunxi-ir"
23 /* IR Control */
61 #define REG_RXSTA_GET_AC(val) (((val) >> 8) & (ir->fifo_size * 2 - 1))
65 /* IR Sample Config */
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()
[all …]
Dmceusb.c14 * Initial port from lirc driver to ir-core drivery by Jarod, based
15 * partially on a port to an earlier proposed IR infrastructure by
17 * incoming IR buffer parsing routines.
22 * Windows-Media-Center-RC-IR-Collection-Green-Button-Specification-03-08-2011-V2.pdf
45 #define MCE_IRBUF_SIZE 128 /* TX IR buffer length */
50 #define MCE_IRDATA_TRAILER 0x80 /* End of IR data */
58 * The interface between the host and the IR hardware is command-response
76 #define MCE_CMD_PORT_IR 0x9f /* IR-related cmd/rsp */
77 #define MCE_CMD_PORT_SYS 0xff /* System (non-IR) device cmd/rsp */
138 * then we're looking at a raw IR data sample */
[all …]
Digorplugusb.c3 * IgorPlug-USB IR Receiver
21 #define DRIVER_DESC "IgorPlug-USB IR Receiver"
46 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] * 85; in igorplugusb_irdata()
75 ir_raw_event_store_with_filter(ir->rc, &rawir); in igorplugusb_irdata()
[all …]
Dmeson-ir.c3 * Driver for Amlogic Meson IR remote receiver
20 #define DRIVER_NAME "meson-ir"
68 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()
[all …]
Dtango-ir.c15 #define DRIVER_NAME "tango-ir"
55 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()
[all …]
/kernel/linux/linux-4.19/drivers/media/usb/tm6000/
Dtm6000-input.c34 MODULE_PARM_DESC(enable_ir, "enable ir (default is enable)");
38 MODULE_PARM_DESC(ir_clock_mhz, "ir clock, in MHz");
47 printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
68 /* IR device properties */
74 struct tm6000_IR *ir = dev->ir; in tm6000_ir_wait() local
76 if (!dev->ir) in tm6000_ir_wait()
79 dprintk(2, "%s: %i\n",__func__, ir->wait); in tm6000_ir_wait()
82 ir->wait = 1; in tm6000_ir_wait()
84 ir->wait = 0; in tm6000_ir_wait()
87 static int tm6000_ir_config(struct tm6000_IR *ir) in tm6000_ir_config() argument
[all …]
/kernel/linux/linux-5.10/drivers/media/usb/tm6000/
Dtm6000-input.c26 MODULE_PARM_DESC(enable_ir, "enable ir (default is enable)");
30 MODULE_PARM_DESC(ir_clock_mhz, "ir clock, in MHz");
39 printk(KERN_DEBUG "%s/ir: " fmt, ir->name , ## arg); \
60 /* IR device properties */
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
[all …]
/kernel/linux/linux-4.19/drivers/media/pci/cx88/
Dcx88-input.c59 MODULE_PARM_DESC(ir_samplerate, "IR samplerate in kHz, 1 - 20, default 4");
62 module_param(ir_debug, int, 0644); /* debug level [IR] */
63 MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
67 printk(KERN_DEBUG "%s IR: " fmt, ir->core->name, ##arg);\
72 printk(KERN_DEBUG "cx88 IR: " fmt, ##arg); \
77 static void cx88_ir_handle_key(struct cx88_IR *ir) in cx88_ir_handle_key() argument
79 struct cx88_core *core = ir->core; in cx88_ir_handle_key()
83 gpio = cx_read(ir->gpio_addr); in cx88_ir_handle_key()
116 if (ir->polling) { in cx88_ir_handle_key()
117 if (ir->last_gpio == auxgpio) in cx88_ir_handle_key()
[all …]
/kernel/linux/linux-5.10/drivers/media/pci/cx88/
Dcx88-input.c50 MODULE_PARM_DESC(ir_samplerate, "IR samplerate in kHz, 1 - 20, default 4");
53 module_param(ir_debug, int, 0644); /* debug level [IR] */
54 MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
58 printk(KERN_DEBUG "%s IR: " fmt, ir->core->name, ##arg);\
63 printk(KERN_DEBUG "cx88 IR: " fmt, ##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()
[all …]
/kernel/linux/linux-5.10/drivers/media/usb/au0828/
Dau0828-input.c2 // handle au0828 IR remotes via linux kernel input layer.
36 int (*get_key_i2c)(struct au0828_rc *ir);
40 * AU8522 has a builtin IR receiver. Add functions to get IR from it
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()
[all …]
/kernel/linux/linux-4.19/drivers/media/usb/au0828/
Dau0828-input.c2 // handle au0828 IR remotes via linux kernel input layer.
36 int (*get_key_i2c)(struct au0828_rc *ir);
40 * AU8522 has a builtin IR receiver. Add functions to get IR from it
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()
[all …]
/kernel/linux/linux-4.19/drivers/media/pci/bt8xx/
Dbttv-input.c51 struct bttv_ir *ir = btv->remote; in ir_handle_key() local
56 if (ir->polling) { in ir_handle_key()
57 if (ir->last_gpio == gpio) in ir_handle_key()
59 ir->last_gpio = gpio; in ir_handle_key()
63 data = ir_extract_bits(gpio, ir->mask_keycode); in ir_handle_key()
66 ir->polling ? "poll" : "irq", in ir_handle_key()
67 (gpio & ir->mask_keydown) ? " down" : "", in ir_handle_key()
68 (gpio & ir->mask_keyup) ? " up" : ""); in ir_handle_key()
70 if ((ir->mask_keydown && (gpio & ir->mask_keydown)) || in ir_handle_key()
71 (ir->mask_keyup && !(gpio & ir->mask_keyup))) { in ir_handle_key()
[all …]
/kernel/linux/linux-5.10/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 …]
/kernel/linux/linux-5.10/drivers/media/i2c/
Dir-kbd-i2c.c4 * keyboard input driver for i2c IR remote controls
51 #include <media/i2c/ir-kbd-i2c.h>
59 static int get_key_haup_common(struct IR_i2c *ir, enum rc_proto *protocol, in get_key_haup_common() argument
65 /* poll IR chip */ in get_key_haup_common()
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()
97 "ir hauppauge (rc5): s%d r%d t%d dev=%d code=%d\n", in get_key_haup_common()
114 dev_dbg(&ir->rc->dev, in get_key_haup_common()
115 "ir hauppauge (rc6-mce): t%d vendor=%d dev=%d code=%d\n", in get_key_haup_common()
120 dev_dbg(&ir->rc->dev, in get_key_haup_common()
[all …]
/kernel/linux/linux-4.19/drivers/media/i2c/
Dir-kbd-i2c.c3 * keyboard input driver for i2c IR remote controls
61 #include <media/i2c/ir-kbd-i2c.h>
69 static int get_key_haup_common(struct IR_i2c *ir, enum rc_proto *protocol, in get_key_haup_common() argument
75 /* poll IR chip */ in get_key_haup_common()
76 if (size != i2c_master_recv(ir->c, buf, size)) in get_key_haup_common()
106 dev_dbg(&ir->rc->dev, in get_key_haup_common()
107 "ir hauppauge (rc5): s%d r%d t%d dev=%d code=%d\n", in get_key_haup_common()
124 dev_dbg(&ir->rc->dev, in get_key_haup_common()
125 "ir hauppauge (rc6-mce): t%d vendor=%d dev=%d code=%d\n", in get_key_haup_common()
130 dev_dbg(&ir->rc->dev, in get_key_haup_common()
[all …]
/kernel/linux/linux-4.19/drivers/media/pci/ttpci/
Dav7110_ir.c44 /* Note: enable ir debugging by or'ing debug with 16 */
89 struct infrared *ir = from_timer(ir, t, keyup_timer); in av7110_emit_keyup() local
91 if (!ir || !ir->keypressed) in av7110_emit_keyup()
94 input_report_key(ir->input_dev, ir->last_key, 0); in av7110_emit_keyup()
95 input_sync(ir->input_dev); in av7110_emit_keyup()
96 ir->keypressed = false; in av7110_emit_keyup()
103 struct infrared *ir = (struct infrared *) parm; in av7110_emit_key() local
104 u32 ircom = ir->ir_command; in av7110_emit_key()
111 switch (ir->protocol) { in av7110_emit_key()
134 printk("%s invalid protocol %x\n", __func__, ir->protocol); in av7110_emit_key()
[all …]
/kernel/linux/linux-5.10/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 …]

12345678910>>...58