/linux-6.6.21/drivers/media/pci/mantis/ |
D | mantis_dvb.c | 31 int mantis_frontend_power(struct mantis_pci *mantis, enum mantis_power power) in mantis_frontend_power() argument 33 struct mantis_hwconfig *config = mantis->hwconfig; in mantis_frontend_power() 38 mantis_gpio_set_bits(mantis, config->power, POWER_ON); in mantis_frontend_power() 40 mantis_gpio_set_bits(mantis, config->power, POWER_ON); in mantis_frontend_power() 46 mantis_gpio_set_bits(mantis, config->power, POWER_OFF); in mantis_frontend_power() 59 void mantis_frontend_soft_reset(struct mantis_pci *mantis) in mantis_frontend_soft_reset() argument 61 struct mantis_hwconfig *config = mantis->hwconfig; in mantis_frontend_soft_reset() 64 mantis_gpio_set_bits(mantis, config->reset, 0); in mantis_frontend_soft_reset() 66 mantis_gpio_set_bits(mantis, config->reset, 0); in mantis_frontend_soft_reset() 68 mantis_gpio_set_bits(mantis, config->reset, 1); in mantis_frontend_soft_reset() [all …]
|
D | mantis_dma.c | 35 #define RISC_INSTR(risc_pos, opcode) (mantis->risc_cpu[risc_pos++] = cpu_to_le32(opcode)) 46 int mantis_dma_exit(struct mantis_pci *mantis) in mantis_dma_exit() argument 48 if (mantis->buf_cpu) { in mantis_dma_exit() 51 (unsigned long) mantis->buf_dma, in mantis_dma_exit() 52 mantis->buf_cpu, in mantis_dma_exit() 55 dma_free_coherent(&mantis->pdev->dev, MANTIS_BUF_SIZE, in mantis_dma_exit() 56 mantis->buf_cpu, mantis->buf_dma); in mantis_dma_exit() 58 mantis->buf_cpu = NULL; in mantis_dma_exit() 60 if (mantis->risc_cpu) { in mantis_dma_exit() 63 (unsigned long) mantis->risc_dma, in mantis_dma_exit() [all …]
|
D | mantis_cards.c | 68 struct mantis_pci *mantis; in mantis_irq_handler() local 71 mantis = (struct mantis_pci *) dev_id; in mantis_irq_handler() 72 if (unlikely(!mantis)) in mantis_irq_handler() 74 ca = mantis->mantis_ca; in mantis_irq_handler() 90 mantis->mantis_int_stat = stat; in mantis_irq_handler() 91 mantis->mantis_int_mask = mask; in mantis_irq_handler() 98 mantis->gpif_status = rst_stat; in mantis_irq_handler() 104 spin_lock(&mantis->intmask_lock); in mantis_irq_handler() 107 spin_unlock(&mantis->intmask_lock); in mantis_irq_handler() 108 schedule_work(&mantis->uart_work); in mantis_irq_handler() [all …]
|
D | hopper_cards.c | 59 struct mantis_pci *mantis; in hopper_irq_handler() local 62 mantis = (struct mantis_pci *) dev_id; in hopper_irq_handler() 63 if (unlikely(!mantis)) in hopper_irq_handler() 65 ca = mantis->mantis_ca; in hopper_irq_handler() 81 mantis->mantis_int_stat = stat; in hopper_irq_handler() 82 mantis->mantis_int_mask = mask; in hopper_irq_handler() 89 mantis->gpif_status = rst_stat; in hopper_irq_handler() 95 spin_lock(&mantis->intmask_lock); in hopper_irq_handler() 98 spin_unlock(&mantis->intmask_lock); in hopper_irq_handler() 99 schedule_work(&mantis->uart_work); in hopper_irq_handler() [all …]
|
D | mantis_pci.c | 37 int mantis_pci_init(struct mantis_pci *mantis) in mantis_pci_init() argument 40 struct mantis_hwconfig *config = mantis->hwconfig; in mantis_pci_init() 41 struct pci_dev *pdev = mantis->pdev; in mantis_pci_init() 47 mantis->pdev->bus->number, in mantis_pci_init() 48 PCI_SLOT(mantis->pdev->devfn), in mantis_pci_init() 49 PCI_FUNC(mantis->pdev->devfn)); in mantis_pci_init() 76 mantis->mmio = ioremap(pci_resource_start(pdev, 0), in mantis_pci_init() 79 if (!mantis->mmio) { in mantis_pci_init() 86 mantis->latency = latency; in mantis_pci_init() 87 mantis->revision = pdev->revision; in mantis_pci_init() [all …]
|
D | mantis_input.c | 23 void mantis_input_process(struct mantis_pci *mantis, int scancode) in mantis_input_process() argument 25 if (mantis->rc) in mantis_input_process() 26 rc_keydown(mantis->rc, RC_PROTO_UNKNOWN, scancode, 0); in mantis_input_process() 29 int mantis_input_init(struct mantis_pci *mantis) in mantis_input_init() argument 41 snprintf(mantis->device_name, sizeof(mantis->device_name), in mantis_input_init() 42 "Mantis %s IR receiver", mantis->hwconfig->model_name); in mantis_input_init() 43 snprintf(mantis->input_phys, sizeof(mantis->input_phys), in mantis_input_init() 44 "pci-%s/ir0", pci_name(mantis->pdev)); in mantis_input_init() 46 dev->device_name = mantis->device_name; in mantis_input_init() 47 dev->input_phys = mantis->input_phys; in mantis_input_init() [all …]
|
D | mantis_common.h | 29 if ((mantis->verbose > MANTIS_ERROR) && (mantis->verbose > y)) \ 30 printk(KERN_ERR "%s (%d): " format "\n" , __func__ , mantis->num , ##arg); \ 31 else if ((mantis->verbose > MANTIS_NOTICE) && (mantis->verbose > y)) \ 32 printk(KERN_NOTICE "%s (%d): " format "\n" , __func__ , mantis->num , ##arg); \ 33 else if ((mantis->verbose > MANTIS_INFO) && (mantis->verbose > y)) \ 34 printk(KERN_INFO "%s (%d): " format "\n" , __func__ , mantis->num , ##arg); \ 35 else if ((mantis->verbose > MANTIS_DEBUG) && (mantis->verbose > y)) \ 36 printk(KERN_DEBUG "%s (%d): " format "\n" , __func__ , mantis->num , ##arg); \ 37 else if ((mantis->verbose > MANTIS_TMG) && (mantis->verbose > y)) \ 38 printk(KERN_DEBUG "%s (%d): " format "\n" , __func__ , mantis->num , ##arg); \ [all …]
|
D | mantis_evm.c | 30 struct mantis_pci *mantis = ca->ca_priv; in mantis_hifevm_work() local 38 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): CAM Plugin", mantis->num); in mantis_hifevm_work() 47 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): CAM Unplug", mantis->num); in mantis_hifevm_work() 56 if (mantis->gpif_status & MANTIS_GPIF_EXTIRQ) in mantis_hifevm_work() 57 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Ext IRQ", mantis->num); in mantis_hifevm_work() 59 if (mantis->gpif_status & MANTIS_SBUF_WSTO) in mantis_hifevm_work() 60 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Smart Buffer Timeout", mantis->num); in mantis_hifevm_work() 62 if (mantis->gpif_status & MANTIS_GPIF_OTHERR) in mantis_hifevm_work() 63 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Alignment Error", mantis->num); in mantis_hifevm_work() 66 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Smart Buffer Overflow", mantis->num); in mantis_hifevm_work() [all …]
|
D | mantis_i2c.c | 26 static int mantis_i2c_read(struct mantis_pci *mantis, const struct i2c_msg *msg) in mantis_i2c_read() argument 72 static int mantis_i2c_write(struct mantis_pci *mantis, const struct i2c_msg *msg) in mantis_i2c_write() argument 120 struct mantis_pci *mantis; in mantis_i2c_xfer() local 123 mantis = i2c_get_adapdata(adapter); in mantis_i2c_xfer() 124 BUG_ON(!mantis); in mantis_i2c_xfer() 125 config = mantis->hwconfig; in mantis_i2c_xfer() 129 mutex_lock(&mantis->i2c_lock); in mantis_i2c_xfer() 178 ret = mantis_i2c_read(mantis, &msgs[i]); in mantis_i2c_xfer() 180 ret = mantis_i2c_write(mantis, &msgs[i]); in mantis_i2c_xfer() 189 mutex_unlock(&mantis->i2c_lock); in mantis_i2c_xfer() [all …]
|
D | mantis_hif.c | 32 struct mantis_pci *mantis = ca->ca_priv; in mantis_hif_sbuf_opdone_wait() local 39 dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Smart buffer operation timeout !", mantis->num); in mantis_hif_sbuf_opdone_wait() 49 struct mantis_pci *mantis = ca->ca_priv; in mantis_hif_write_wait() local 54 mantis->gpif_status & MANTIS_GPIF_WRACK, in mantis_hif_write_wait() 57 dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Write ACK timed out !", mantis->num); in mantis_hif_write_wait() 61 mantis->gpif_status &= ~MANTIS_GPIF_WRACK; in mantis_hif_write_wait() 67 dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Write operation timed out!", mantis->num); in mantis_hif_write_wait() 79 struct mantis_pci *mantis = ca->ca_priv; in mantis_hif_read_mem() local 82 dprintk(MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF Mem Read", mantis->num); in mantis_hif_read_mem() 95 dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): GPIF Smart Buffer operation failed", mantis->num); in mantis_hif_read_mem() [all …]
|
D | mantis_uart.c | 52 static void mantis_uart_read(struct mantis_pci *mantis) in mantis_uart_read() argument 54 struct mantis_hwconfig *config = mantis->hwconfig; in mantis_uart_read() 76 mantis_input_process(mantis, scancode); in mantis_uart_read() 81 struct mantis_pci *mantis = container_of(work, struct mantis_pci, uart_work); in mantis_uart_work() local 98 mantis_uart_read(mantis); in mantis_uart_work() 106 mantis_unmask_ints(mantis, MANTIS_INT_IRQ1); in mantis_uart_work() 109 static int mantis_uart_setup(struct mantis_pci *mantis, in mantis_uart_setup() argument 143 int mantis_uart_init(struct mantis_pci *mantis) in mantis_uart_init() argument 145 struct mantis_hwconfig *config = mantis->hwconfig; in mantis_uart_init() 155 INIT_WORK(&mantis->uart_work, mantis_uart_work); in mantis_uart_init() [all …]
|
D | mantis_vp1034.c | 37 struct mantis_pci *mantis = fe->dvb->priv; in vp1034_set_voltage() local 42 mantis_gpio_set_bits(mantis, 13, 1); in vp1034_set_voltage() 43 mantis_gpio_set_bits(mantis, 14, 0); in vp1034_set_voltage() 47 mantis_gpio_set_bits(mantis, 13, 1); in vp1034_set_voltage() 48 mantis_gpio_set_bits(mantis, 14, 1); in vp1034_set_voltage() 62 static int vp1034_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp1034_frontend_init() argument 64 struct i2c_adapter *adapter = &mantis->adapter; in vp1034_frontend_init() 68 err = mantis_frontend_power(mantis, POWER_ON); in vp1034_frontend_init() 70 mantis_frontend_soft_reset(mantis); in vp1034_frontend_init() 90 mantis->fe = fe; in vp1034_frontend_init()
|
D | mantis_pcmcia.c | 32 struct mantis_pci *mantis = ca->ca_priv; in mantis_event_cam_plugin() local 37 dprintk(MANTIS_DEBUG, 1, "Event: CAM Plugged IN: Adapter(%d) Slot(0)", mantis->num); in mantis_event_cam_plugin() 56 struct mantis_pci *mantis = ca->ca_priv; in mantis_event_cam_unplug() local 61 dprintk(MANTIS_DEBUG, 1, "Event: CAM Unplugged: Adapter(%d) Slot(0)", mantis->num); in mantis_event_cam_unplug() 76 struct mantis_pci *mantis = ca->ca_priv; in mantis_pcmcia_init() local 80 mantis_unmask_ints(mantis, MANTIS_INT_IRQ0); in mantis_pcmcia_init() 85 dprintk(MANTIS_DEBUG, 1, "CAM found on Adapter(%d) Slot(0)", mantis->num); in mantis_pcmcia_init() 92 dprintk(MANTIS_DEBUG, 1, "Empty Slot on Adapter(%d) Slot(0)", mantis->num); in mantis_pcmcia_init() 105 struct mantis_pci *mantis = ca->ca_priv; in mantis_pcmcia_exit() local 108 mantis_mask_ints(mantis, MANTIS_INT_IRQ0); in mantis_pcmcia_exit()
|
D | mantis_ca.c | 31 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_read_attr_mem() local 44 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_write_attr_mem() local 57 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_read_cam_ctl() local 70 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_write_cam_ctl() local 83 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_slot_reset() local 99 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_slot_shutdown() local 109 struct mantis_pci *mantis = ca->ca_priv; in mantis_ts_control() local 119 struct mantis_pci *mantis = ca->ca_priv; in mantis_slot_status() local 133 int mantis_ca_init(struct mantis_pci *mantis) in mantis_ca_init() argument 135 struct dvb_adapter *dvb_adapter = &mantis->dvb_adapter; in mantis_ca_init() [all …]
|
D | mantis_ioc.c | 27 static int read_eeprom_bytes(struct mantis_pci *mantis, u8 reg, u8 *data, u8 length) in read_eeprom_bytes() argument 29 struct i2c_adapter *adapter = &mantis->adapter; in read_eeprom_bytes() 48 int mantis_get_mac(struct mantis_pci *mantis) in mantis_get_mac() argument 53 err = read_eeprom_bytes(mantis, 0x08, mac_addr, 6); in mantis_get_mac() 67 void mantis_gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value) in mantis_gpio_set_bits() argument 74 mantis->gpio_status = cur | (1 << bitpos); in mantis_gpio_set_bits() 76 mantis->gpio_status = cur & (~(1 << bitpos)); in mantis_gpio_set_bits() 78 dprintk(MANTIS_DEBUG, 1, "GPIO Value <%02x>", mantis->gpio_status); in mantis_gpio_set_bits() 79 mmwrite(mantis->gpio_status, MANTIS_GPIF_ADDR); in mantis_gpio_set_bits() 84 int mantis_stream_control(struct mantis_pci *mantis, enum mantis_stream_control stream_ctl) in mantis_stream_control() argument
|
D | mantis_vp2033.c | 38 static u8 read_pwm(struct mantis_pci *mantis) in read_pwm() argument 40 struct i2c_adapter *adapter = &mantis->adapter; in read_pwm() 59 struct mantis_pci *mantis = fe->dvb->priv; in tda1002x_cu1216_tuner_set() local 60 struct i2c_adapter *adapter = &mantis->adapter; in tda1002x_cu1216_tuner_set() 112 static int vp2033_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp2033_frontend_init() argument 114 struct i2c_adapter *adapter = &mantis->adapter; in vp2033_frontend_init() 118 err = mantis_frontend_power(mantis, POWER_ON); in vp2033_frontend_init() 120 mantis_frontend_soft_reset(mantis); in vp2033_frontend_init() 126 read_pwm(mantis)); in vp2033_frontend_init() 135 read_pwm(mantis)); in vp2033_frontend_init() [all …]
|
D | mantis_vp2040.c | 41 struct mantis_pci *mantis = fe->dvb->priv; in tda1002x_cu1216_tuner_set() local 42 struct i2c_adapter *adapter = &mantis->adapter; in tda1002x_cu1216_tuner_set() 94 static u8 read_pwm(struct mantis_pci *mantis) in read_pwm() argument 96 struct i2c_adapter *adapter = &mantis->adapter; in read_pwm() 112 static int vp2040_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp2040_frontend_init() argument 114 struct i2c_adapter *adapter = &mantis->adapter; in vp2040_frontend_init() 118 err = mantis_frontend_power(mantis, POWER_ON); in vp2040_frontend_init() 120 mantis_frontend_soft_reset(mantis); in vp2040_frontend_init() 126 read_pwm(mantis)); in vp2040_frontend_init() 135 read_pwm(mantis)); in vp2040_frontend_init() [all …]
|
D | hopper_vp3028.c | 32 static int vp3028_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp3028_frontend_init() argument 34 struct i2c_adapter *adapter = &mantis->adapter; in vp3028_frontend_init() 35 struct mantis_hwconfig *config = mantis->hwconfig; in vp3028_frontend_init() 38 mantis_gpio_set_bits(mantis, config->reset, 0); in vp3028_frontend_init() 40 err = mantis_frontend_power(mantis, POWER_ON); in vp3028_frontend_init() 42 mantis_gpio_set_bits(mantis, config->reset, 1); in vp3028_frontend_init() 44 err = mantis_frontend_power(mantis, POWER_ON); in vp3028_frontend_init()
|
D | mantis_core.h | 36 extern int mantis_dma_init(struct mantis_pci *mantis); 37 extern int mantis_dma_exit(struct mantis_pci *mantis); 38 extern void mantis_dma_start(struct mantis_pci *mantis); 39 extern void mantis_dma_stop(struct mantis_pci *mantis); 40 extern int mantis_i2c_init(struct mantis_pci *mantis); 41 extern int mantis_i2c_exit(struct mantis_pci *mantis);
|
D | mantis_vp3030.c | 44 static int vp3030_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp3030_frontend_init() argument 46 struct i2c_adapter *adapter = &mantis->adapter; in vp3030_frontend_init() 47 struct mantis_hwconfig *config = mantis->hwconfig; in vp3030_frontend_init() 50 mantis_gpio_set_bits(mantis, config->reset, 0); in vp3030_frontend_init() 52 err = mantis_frontend_power(mantis, POWER_ON); in vp3030_frontend_init() 54 mantis_gpio_set_bits(mantis, config->reset, 1); in vp3030_frontend_init() 73 mantis->fe = fe; in vp3030_frontend_init()
|
D | mantis_vp1033.c | 77 struct mantis_pci *mantis = fe->dvb->priv; in lgtdqcs001f_tuner_set() local 78 struct i2c_adapter *adapter = &mantis->adapter; in lgtdqcs001f_tuner_set() 152 static int vp1033_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp1033_frontend_init() argument 154 struct i2c_adapter *adapter = &mantis->adapter; in vp1033_frontend_init() 158 err = mantis_frontend_power(mantis, POWER_ON); in vp1033_frontend_init() 160 mantis_frontend_soft_reset(mantis); in vp1033_frontend_init() 182 mantis->fe = fe; in vp1033_frontend_init()
|
D | mantis_dma.h | 12 extern int mantis_dma_init(struct mantis_pci *mantis); 13 extern int mantis_dma_exit(struct mantis_pci *mantis); 14 extern void mantis_dma_start(struct mantis_pci *mantis); 15 extern void mantis_dma_stop(struct mantis_pci *mantis);
|
D | mantis_dvb.h | 17 extern int mantis_frontend_power(struct mantis_pci *mantis, enum mantis_power power); 18 extern void mantis_frontend_soft_reset(struct mantis_pci *mantis); 20 extern int mantis_dvb_init(struct mantis_pci *mantis); 21 extern int mantis_dvb_exit(struct mantis_pci *mantis);
|
D | mantis_vp1041.c | 296 static int vp1041_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp1041_frontend_init() argument 298 struct i2c_adapter *adapter = &mantis->adapter; in vp1041_frontend_init() 302 err = mantis_frontend_power(mantis, POWER_ON); in vp1041_frontend_init() 304 mantis_frontend_soft_reset(mantis); in vp1041_frontend_init() 306 mantis->fe = dvb_attach(stb0899_attach, &vp1041_stb0899_config, adapter); in vp1041_frontend_init() 307 if (mantis->fe) { in vp1041_frontend_init() 312 if (dvb_attach(stb6100_attach, mantis->fe, &vp1041_stb6100_config, adapter)) { in vp1041_frontend_init() 313 if (!dvb_attach(lnbp21_attach, mantis->fe, adapter, 0, 0)) in vp1041_frontend_init()
|
D | mantis_input.h | 12 int mantis_input_init(struct mantis_pci *mantis); 13 void mantis_input_exit(struct mantis_pci *mantis); 14 void mantis_input_process(struct mantis_pci *mantis, int scancode);
|