| /kernel/linux/linux-5.10/drivers/media/rc/ |
| D | iguanair.c | 3 * 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 …]
|
| D | mtk-cir.c | 3 * 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 …]
|
| D | sunxi-cir.c | 3 * 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 …]
|
| D | mceusb.c | 14 * 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 …]
|
| D | igorplugusb.c | 3 * 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() 70 ir_raw_event_reset(ir->rc); in igorplugusb_irdata() 74 rawir.duration = ir->buf_in[i] * 85; in igorplugusb_irdata() [all …]
|
| D | meson-ir.c | 3 * 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 …]
|
| D | tango-ir.c | 15 #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-6.6/drivers/media/rc/ |
| D | iguanair.c | 3 * 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 …]
|
| D | mtk-cir.c | 3 * Driver for Mediatek IR Receiver Controller 18 /* Register to enable PWM and IR */ 21 /* Bit to enable IR pulse width detection */ 26 * indicating IR receiving completion and then making IRQ fires 31 /* Bit to enable IR hardware function */ 34 /* Bit to restart IR receiving */ 40 /* IR threshold */ 53 /* Indicate the end of IR message */ 72 /* Register to enable IR interrupt */ 74 /* Register to ack IR interrupt */ [all …]
|
| D | meson-ir-tx.c | 3 * meson-ir-tx.c - Amlogic Meson IR TX driver 22 #define DEVICE_NAME "Meson IR TX" 23 #define DRIVER_NAME "meson-ir-tx" 79 static void meson_irtx_set_mod(struct meson_irtx *ir) in meson_irtx_set_mod() argument 81 unsigned int cnt = DIV_ROUND_CLOSEST(ir->clk_rate, ir->carrier); in meson_irtx_set_mod() 82 unsigned int pulse_cnt = DIV_ROUND_CLOSEST(cnt * ir->duty_cycle, 100); in meson_irtx_set_mod() 85 dev_dbg(ir->dev, "F_mod = %uHz, T_mod = %luns, duty_cycle = %u%%\n", in meson_irtx_set_mod() 86 ir->carrier, NSEC_PER_SEC / ir->clk_rate * cnt, in meson_irtx_set_mod() 90 ir->reg_base + IRB_ADDR1); in meson_irtx_set_mod() 93 static void meson_irtx_setup(struct meson_irtx *ir, unsigned int clk_nr) in meson_irtx_setup() argument [all …]
|
| D | sunxi-cir.c | 3 * Driver for Allwinner sunXi IR controller 8 * Based on sun5i-ir.c: 21 #define SUNXI_IR_DEV "sunxi-ir" 24 /* IR Control */ 62 #define REG_RXSTA_GET_AC(val) (((val) >> 8) & (ir->fifo_size * 2 - 1)) 66 /* IR Sample Config */ 105 struct sunxi_ir *ir = dev_id; in sunxi_ir_irq() local 108 status = readl(ir->base + SUNXI_IR_RXSTA_REG); in sunxi_ir_irq() 111 writel(status | REG_RXSTA_CLEARALL, ir->base + SUNXI_IR_RXSTA_REG); in sunxi_ir_irq() 117 rc = rc > ir->fifo_size ? ir->fifo_size : rc; in sunxi_ir_irq() [all …]
|
| D | igorplugusb.c | 3 * 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() 70 ir_raw_event_overflow(ir->rc); in igorplugusb_irdata() 74 rawir.duration = ir->buf_in[i] * 85; in igorplugusb_irdata() [all …]
|
| D | mceusb.c | 14 * 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 …]
|
| D | meson-ir.c | 3 * Driver for Amlogic Meson IR remote receiver 21 #define DRIVER_NAME "meson-ir" 67 struct meson_ir *ir = dev_id; in meson_ir_irq() local 71 spin_lock(&ir->lock); in meson_ir_irq() 73 regmap_read(ir->reg, IR_DEC_REG1, &duration); in meson_ir_irq() 77 regmap_read(ir->reg, IR_DEC_STATUS, &status); in meson_ir_irq() 80 ir_raw_event_store_with_timeout(ir->rc, &rawir); in meson_ir_irq() 82 spin_unlock(&ir->lock); in meson_ir_irq() 93 struct meson_ir *ir; in meson_ir_probe() local 96 ir = devm_kzalloc(dev, sizeof(struct meson_ir), GFP_KERNEL); in meson_ir_probe() [all …]
|
| /kernel/linux/linux-5.10/drivers/media/usb/tm6000/ |
| D | tm6000-input.c | 26 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-6.6/drivers/media/pci/cx88/ |
| D | cx88-input.c | 50 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/pci/cx88/ |
| D | cx88-input.c | 50 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/ |
| D | au0828-input.c | 2 // 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-6.6/drivers/media/usb/au0828/ |
| D | au0828-input.c | 2 // 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-6.6/drivers/media/pci/bt8xx/ |
| D | bttv-input.c | 42 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/pci/bt8xx/ |
| D | bttv-input.c | 42 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/ |
| D | ir-kbd-i2c.c | 4 * 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-6.6/drivers/media/i2c/ |
| D | ir-kbd-i2c.c | 4 * 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-6.6/drivers/media/pci/smipcie/ |
| D | smipcie-ir.c | 13 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 …]
|
| /kernel/linux/linux-5.10/drivers/media/pci/smipcie/ |
| D | smipcie-ir.c | 13 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 …]
|