/drivers/media/pci/mantis/ |
D | mantis_dvb.c | 43 int mantis_frontend_power(struct mantis_pci *mantis, enum mantis_power power) in mantis_frontend_power() argument 45 struct mantis_hwconfig *config = mantis->hwconfig; in mantis_frontend_power() 50 mantis_gpio_set_bits(mantis, config->power, POWER_ON); in mantis_frontend_power() 52 mantis_gpio_set_bits(mantis, config->power, POWER_ON); in mantis_frontend_power() 58 mantis_gpio_set_bits(mantis, config->power, POWER_OFF); in mantis_frontend_power() 71 void mantis_frontend_soft_reset(struct mantis_pci *mantis) in mantis_frontend_soft_reset() argument 73 struct mantis_hwconfig *config = mantis->hwconfig; in mantis_frontend_soft_reset() 76 mantis_gpio_set_bits(mantis, config->reset, 0); in mantis_frontend_soft_reset() 78 mantis_gpio_set_bits(mantis, config->reset, 0); in mantis_frontend_soft_reset() 80 mantis_gpio_set_bits(mantis, config->reset, 1); in mantis_frontend_soft_reset() [all …]
|
D | mantis_dma.c | 47 #define RISC_INSTR(risc_pos, opcode) (mantis->risc_cpu[risc_pos++] = cpu_to_le32(opcode)) 58 int mantis_dma_exit(struct mantis_pci *mantis) in mantis_dma_exit() argument 60 if (mantis->buf_cpu) { in mantis_dma_exit() 63 (unsigned long) mantis->buf_dma, in mantis_dma_exit() 64 mantis->buf_cpu, in mantis_dma_exit() 67 pci_free_consistent(mantis->pdev, MANTIS_BUF_SIZE, in mantis_dma_exit() 68 mantis->buf_cpu, mantis->buf_dma); in mantis_dma_exit() 70 mantis->buf_cpu = NULL; in mantis_dma_exit() 72 if (mantis->risc_cpu) { in mantis_dma_exit() 75 (unsigned long) mantis->risc_dma, in mantis_dma_exit() [all …]
|
D | mantis_core.c | 30 static int read_eeprom_byte(struct mantis_pci *mantis, u8 *data, u8 length) in read_eeprom_byte() argument 47 err = i2c_transfer(&mantis->adapter, msg, 2); in read_eeprom_byte() 59 static int get_mac_address(struct mantis_pci *mantis) in get_mac_address() argument 63 mantis->mac_address[0] = 0x08; in get_mac_address() 64 err = read_eeprom_byte(mantis, &mantis->mac_address[0], 6); in get_mac_address() 71 " MAC Address=[%pM]\n", mantis->mac_address); in get_mac_address() 84 static void mantis_load_config(struct mantis_pci *mantis) in mantis_load_config() argument 86 switch (mantis->subsystem_device) { in mantis_load_config() 88 mantis->hwconfig = &vp1033_mantis_config; in mantis_load_config() 91 mantis->hwconfig = &vp1034_mantis_config; in mantis_load_config() [all …]
|
D | mantis_cards.c | 81 struct mantis_pci *mantis; in mantis_irq_handler() local 84 mantis = (struct mantis_pci *) dev_id; in mantis_irq_handler() 85 if (unlikely(mantis == NULL)) { in mantis_irq_handler() 89 ca = mantis->mantis_ca; in mantis_irq_handler() 105 mantis->mantis_int_stat = stat; in mantis_irq_handler() 106 mantis->mantis_int_mask = mask; in mantis_irq_handler() 113 mantis->gpif_status = rst_stat; in mantis_irq_handler() 119 spin_lock(&mantis->intmask_lock); in mantis_irq_handler() 122 spin_unlock(&mantis->intmask_lock); in mantis_irq_handler() 123 schedule_work(&mantis->uart_work); in mantis_irq_handler() [all …]
|
D | hopper_cards.c | 71 struct mantis_pci *mantis; in hopper_irq_handler() local 74 mantis = (struct mantis_pci *) dev_id; in hopper_irq_handler() 75 if (unlikely(mantis == NULL)) { in hopper_irq_handler() 79 ca = mantis->mantis_ca; in hopper_irq_handler() 95 mantis->mantis_int_stat = stat; in hopper_irq_handler() 96 mantis->mantis_int_mask = mask; in hopper_irq_handler() 103 mantis->gpif_status = rst_stat; in hopper_irq_handler() 109 spin_lock(&mantis->intmask_lock); in hopper_irq_handler() 112 spin_unlock(&mantis->intmask_lock); in hopper_irq_handler() 113 schedule_work(&mantis->uart_work); in hopper_irq_handler() [all …]
|
D | mantis_pci.c | 49 int mantis_pci_init(struct mantis_pci *mantis) in mantis_pci_init() argument 52 struct mantis_hwconfig *config = mantis->hwconfig; in mantis_pci_init() 53 struct pci_dev *pdev = mantis->pdev; in mantis_pci_init() 59 mantis->pdev->bus->number, in mantis_pci_init() 60 PCI_SLOT(mantis->pdev->devfn), in mantis_pci_init() 61 PCI_FUNC(mantis->pdev->devfn)); in mantis_pci_init() 88 mantis->mmio = ioremap(pci_resource_start(pdev, 0), in mantis_pci_init() 91 if (!mantis->mmio) { in mantis_pci_init() 98 mantis->latency = latency; in mantis_pci_init() 99 mantis->revision = pdev->revision; in mantis_pci_init() [all …]
|
D | mantis_input.c | 31 void mantis_input_process(struct mantis_pci *mantis, int scancode) in mantis_input_process() argument 33 if (mantis->rc) in mantis_input_process() 34 rc_keydown(mantis->rc, RC_TYPE_UNKNOWN, scancode, 0); in mantis_input_process() 37 int mantis_input_init(struct mantis_pci *mantis) in mantis_input_init() argument 49 snprintf(mantis->input_name, sizeof(mantis->input_name), in mantis_input_init() 50 "Mantis %s IR receiver", mantis->hwconfig->model_name); in mantis_input_init() 51 snprintf(mantis->input_phys, sizeof(mantis->input_phys), in mantis_input_init() 52 "pci-%s/ir0", pci_name(mantis->pdev)); in mantis_input_init() 54 dev->input_name = mantis->input_name; in mantis_input_init() 55 dev->input_phys = mantis->input_phys; in mantis_input_init() [all …]
|
D | mantis_common.h | 41 if ((mantis->verbose > MANTIS_ERROR) && (mantis->verbose > y)) \ 42 printk(KERN_ERR "%s (%d): " format "\n" , __func__ , mantis->num , ##arg); \ 43 else if ((mantis->verbose > MANTIS_NOTICE) && (mantis->verbose > y)) \ 44 printk(KERN_NOTICE "%s (%d): " format "\n" , __func__ , mantis->num , ##arg); \ 45 else if ((mantis->verbose > MANTIS_INFO) && (mantis->verbose > y)) \ 46 printk(KERN_INFO "%s (%d): " format "\n" , __func__ , mantis->num , ##arg); \ 47 else if ((mantis->verbose > MANTIS_DEBUG) && (mantis->verbose > y)) \ 48 printk(KERN_DEBUG "%s (%d): " format "\n" , __func__ , mantis->num , ##arg); \ 49 else if ((mantis->verbose > MANTIS_TMG) && (mantis->verbose > y)) \ 50 printk(KERN_DEBUG "%s (%d): " format "\n" , __func__ , mantis->num , ##arg); \ [all …]
|
D | mantis_i2c.c | 38 static int mantis_i2c_read(struct mantis_pci *mantis, const struct i2c_msg *msg) in mantis_i2c_read() argument 84 static int mantis_i2c_write(struct mantis_pci *mantis, const struct i2c_msg *msg) in mantis_i2c_write() argument 132 struct mantis_pci *mantis; in mantis_i2c_xfer() local 135 mantis = i2c_get_adapdata(adapter); in mantis_i2c_xfer() 136 BUG_ON(!mantis); in mantis_i2c_xfer() 137 config = mantis->hwconfig; in mantis_i2c_xfer() 141 mutex_lock(&mantis->i2c_lock); in mantis_i2c_xfer() 190 ret = mantis_i2c_read(mantis, &msgs[i]); in mantis_i2c_xfer() 192 ret = mantis_i2c_write(mantis, &msgs[i]); in mantis_i2c_xfer() 201 mutex_unlock(&mantis->i2c_lock); in mantis_i2c_xfer() [all …]
|
D | mantis_evm.c | 42 struct mantis_pci *mantis = ca->ca_priv; in mantis_hifevm_work() local 50 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): CAM Plugin", mantis->num); in mantis_hifevm_work() 59 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): CAM Unplug", mantis->num); in mantis_hifevm_work() 68 if (mantis->gpif_status & MANTIS_GPIF_EXTIRQ) in mantis_hifevm_work() 69 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Ext IRQ", mantis->num); in mantis_hifevm_work() 71 if (mantis->gpif_status & MANTIS_SBUF_WSTO) in mantis_hifevm_work() 72 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Smart Buffer Timeout", mantis->num); in mantis_hifevm_work() 74 if (mantis->gpif_status & MANTIS_GPIF_OTHERR) in mantis_hifevm_work() 75 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Alignment Error", mantis->num); in mantis_hifevm_work() 78 dprintk(MANTIS_DEBUG, 1, "Event Mgr: Adapter(%d) Slot(0): Smart Buffer Overflow", mantis->num); in mantis_hifevm_work() [all …]
|
D | mantis_hif.c | 44 struct mantis_pci *mantis = ca->ca_priv; in mantis_hif_sbuf_opdone_wait() local 51 dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Smart buffer operation timeout !", mantis->num); in mantis_hif_sbuf_opdone_wait() 61 struct mantis_pci *mantis = ca->ca_priv; in mantis_hif_write_wait() local 66 mantis->gpif_status & MANTIS_GPIF_WRACK, in mantis_hif_write_wait() 69 dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Write ACK timed out !", mantis->num); in mantis_hif_write_wait() 73 mantis->gpif_status &= ~MANTIS_GPIF_WRACK; in mantis_hif_write_wait() 79 dprintk(MANTIS_ERROR, 1, "Adapter(%d) Slot(0): Write operation timed out!", mantis->num); in mantis_hif_write_wait() 91 struct mantis_pci *mantis = ca->ca_priv; in mantis_hif_read_mem() local 94 dprintk(MANTIS_DEBUG, 1, "Adapter(%d) Slot(0): Request HIF Mem Read", mantis->num); in mantis_hif_read_mem() 107 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 | 64 static void mantis_uart_read(struct mantis_pci *mantis) in mantis_uart_read() argument 66 struct mantis_hwconfig *config = mantis->hwconfig; in mantis_uart_read() 88 mantis_input_process(mantis, scancode); in mantis_uart_read() 93 struct mantis_pci *mantis = container_of(work, struct mantis_pci, uart_work); in mantis_uart_work() local 106 mantis_uart_read(mantis); in mantis_uart_work() 111 mantis_unmask_ints(mantis, MANTIS_INT_IRQ1); in mantis_uart_work() 114 static int mantis_uart_setup(struct mantis_pci *mantis, in mantis_uart_setup() argument 148 int mantis_uart_init(struct mantis_pci *mantis) in mantis_uart_init() argument 150 struct mantis_hwconfig *config = mantis->hwconfig; in mantis_uart_init() 160 INIT_WORK(&mantis->uart_work, mantis_uart_work); in mantis_uart_init() [all …]
|
D | mantis_vp1034.c | 49 struct mantis_pci *mantis = fe->dvb->priv; in vp1034_set_voltage() local 54 mantis_gpio_set_bits(mantis, 13, 1); in vp1034_set_voltage() 55 mantis_gpio_set_bits(mantis, 14, 0); in vp1034_set_voltage() 59 mantis_gpio_set_bits(mantis, 13, 1); in vp1034_set_voltage() 60 mantis_gpio_set_bits(mantis, 14, 1); in vp1034_set_voltage() 74 static int vp1034_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp1034_frontend_init() argument 76 struct i2c_adapter *adapter = &mantis->adapter; in vp1034_frontend_init() 80 err = mantis_frontend_power(mantis, POWER_ON); in vp1034_frontend_init() 82 mantis_frontend_soft_reset(mantis); in vp1034_frontend_init() 102 mantis->fe = fe; in vp1034_frontend_init()
|
D | mantis_ca.c | 43 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_read_attr_mem() local 56 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_write_attr_mem() local 69 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_read_cam_ctl() local 82 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_write_cam_ctl() local 95 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_slot_reset() local 111 struct mantis_pci *mantis = ca->ca_priv; in mantis_ca_slot_shutdown() local 121 struct mantis_pci *mantis = ca->ca_priv; in mantis_ts_control() local 132 struct mantis_pci *mantis = ca->ca_priv; in mantis_slot_status() local 146 int mantis_ca_init(struct mantis_pci *mantis) in mantis_ca_init() argument 148 struct dvb_adapter *dvb_adapter = &mantis->dvb_adapter; in mantis_ca_init() [all …]
|
D | mantis_pcmcia.c | 44 struct mantis_pci *mantis = ca->ca_priv; in mantis_event_cam_plugin() local 49 dprintk(MANTIS_DEBUG, 1, "Event: CAM Plugged IN: Adapter(%d) Slot(0)", mantis->num); in mantis_event_cam_plugin() 68 struct mantis_pci *mantis = ca->ca_priv; in mantis_event_cam_unplug() local 73 dprintk(MANTIS_DEBUG, 1, "Event: CAM Unplugged: Adapter(%d) Slot(0)", mantis->num); in mantis_event_cam_unplug() 88 struct mantis_pci *mantis = ca->ca_priv; in mantis_pcmcia_init() local 92 mantis_unmask_ints(mantis, MANTIS_INT_IRQ0); in mantis_pcmcia_init() 97 dprintk(MANTIS_DEBUG, 1, "CAM found on Adapter(%d) Slot(0)", mantis->num); in mantis_pcmcia_init() 104 dprintk(MANTIS_DEBUG, 1, "Empty Slot on Adapter(%d) Slot(0)", mantis->num); in mantis_pcmcia_init() 117 struct mantis_pci *mantis = ca->ca_priv; in mantis_pcmcia_exit() local 120 mantis_mask_ints(mantis, MANTIS_INT_IRQ0); in mantis_pcmcia_exit()
|
D | mantis_core.h | 48 extern int mantis_dma_init(struct mantis_pci *mantis); 49 extern int mantis_dma_exit(struct mantis_pci *mantis); 50 extern void mantis_dma_start(struct mantis_pci *mantis); 51 extern void mantis_dma_stop(struct mantis_pci *mantis); 52 extern int mantis_i2c_init(struct mantis_pci *mantis); 53 extern int mantis_i2c_exit(struct mantis_pci *mantis); 54 extern int mantis_core_init(struct mantis_pci *mantis); 55 extern int mantis_core_exit(struct mantis_pci *mantis);
|
D | mantis_ioc.c | 39 static int read_eeprom_bytes(struct mantis_pci *mantis, u8 reg, u8 *data, u8 length) in read_eeprom_bytes() argument 41 struct i2c_adapter *adapter = &mantis->adapter; in read_eeprom_bytes() 60 int mantis_get_mac(struct mantis_pci *mantis) in mantis_get_mac() argument 65 err = read_eeprom_bytes(mantis, 0x08, mac_addr, 6); in mantis_get_mac() 79 void mantis_gpio_set_bits(struct mantis_pci *mantis, u32 bitpos, u8 value) in mantis_gpio_set_bits() argument 86 mantis->gpio_status = cur | (1 << bitpos); in mantis_gpio_set_bits() 88 mantis->gpio_status = cur & (~(1 << bitpos)); in mantis_gpio_set_bits() 90 dprintk(MANTIS_DEBUG, 1, "GPIO Value <%02x>", mantis->gpio_status); in mantis_gpio_set_bits() 91 mmwrite(mantis->gpio_status, MANTIS_GPIF_ADDR); in mantis_gpio_set_bits() 96 int mantis_stream_control(struct mantis_pci *mantis, enum mantis_stream_control stream_ctl) in mantis_stream_control() argument
|
D | mantis_vp2040.c | 53 struct mantis_pci *mantis = fe->dvb->priv; in tda1002x_cu1216_tuner_set() local 54 struct i2c_adapter *adapter = &mantis->adapter; in tda1002x_cu1216_tuner_set() 106 static u8 read_pwm(struct mantis_pci *mantis) in read_pwm() argument 108 struct i2c_adapter *adapter = &mantis->adapter; in read_pwm() 124 static int vp2040_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp2040_frontend_init() argument 126 struct i2c_adapter *adapter = &mantis->adapter; in vp2040_frontend_init() 130 err = mantis_frontend_power(mantis, POWER_ON); in vp2040_frontend_init() 132 mantis_frontend_soft_reset(mantis); in vp2040_frontend_init() 138 read_pwm(mantis)); in vp2040_frontend_init() 147 read_pwm(mantis)); in vp2040_frontend_init() [all …]
|
D | mantis_vp2033.c | 50 static u8 read_pwm(struct mantis_pci *mantis) in read_pwm() argument 52 struct i2c_adapter *adapter = &mantis->adapter; in read_pwm() 71 struct mantis_pci *mantis = fe->dvb->priv; in tda1002x_cu1216_tuner_set() local 72 struct i2c_adapter *adapter = &mantis->adapter; in tda1002x_cu1216_tuner_set() 124 static int vp2033_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp2033_frontend_init() argument 126 struct i2c_adapter *adapter = &mantis->adapter; in vp2033_frontend_init() 130 err = mantis_frontend_power(mantis, POWER_ON); in vp2033_frontend_init() 132 mantis_frontend_soft_reset(mantis); in vp2033_frontend_init() 138 read_pwm(mantis)); in vp2033_frontend_init() 147 read_pwm(mantis)); in vp2033_frontend_init() [all …]
|
D | hopper_vp3028.c | 44 static int vp3028_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp3028_frontend_init() argument 46 struct i2c_adapter *adapter = &mantis->adapter; in vp3028_frontend_init() 47 struct mantis_hwconfig *config = mantis->hwconfig; in vp3028_frontend_init() 50 mantis_gpio_set_bits(mantis, config->reset, 0); in vp3028_frontend_init() 52 err = mantis_frontend_power(mantis, POWER_ON); in vp3028_frontend_init() 54 mantis_gpio_set_bits(mantis, config->reset, 1); in vp3028_frontend_init() 56 err = mantis_frontend_power(mantis, POWER_ON); in vp3028_frontend_init()
|
D | mantis_vp3030.c | 56 static int vp3030_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp3030_frontend_init() argument 58 struct i2c_adapter *adapter = &mantis->adapter; in vp3030_frontend_init() 59 struct mantis_hwconfig *config = mantis->hwconfig; in vp3030_frontend_init() 62 mantis_gpio_set_bits(mantis, config->reset, 0); in vp3030_frontend_init() 64 err = mantis_frontend_power(mantis, POWER_ON); in vp3030_frontend_init() 66 mantis_gpio_set_bits(mantis, config->reset, 1); in vp3030_frontend_init() 85 mantis->fe = fe; in vp3030_frontend_init()
|
D | mantis_vp1033.c | 89 struct mantis_pci *mantis = fe->dvb->priv; in lgtdqcs001f_tuner_set() local 90 struct i2c_adapter *adapter = &mantis->adapter; in lgtdqcs001f_tuner_set() 164 static int vp1033_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp1033_frontend_init() argument 166 struct i2c_adapter *adapter = &mantis->adapter; in vp1033_frontend_init() 170 err = mantis_frontend_power(mantis, POWER_ON); in vp1033_frontend_init() 172 mantis_frontend_soft_reset(mantis); in vp1033_frontend_init() 194 mantis->fe = fe; in vp1033_frontend_init()
|
D | mantis_dma.h | 24 extern int mantis_dma_init(struct mantis_pci *mantis); 25 extern int mantis_dma_exit(struct mantis_pci *mantis); 26 extern void mantis_dma_start(struct mantis_pci *mantis); 27 extern void mantis_dma_stop(struct mantis_pci *mantis);
|
D | mantis_dvb.h | 29 extern int mantis_frontend_power(struct mantis_pci *mantis, enum mantis_power power); 30 extern void mantis_frontend_soft_reset(struct mantis_pci *mantis); 32 extern int mantis_dvb_init(struct mantis_pci *mantis); 33 extern int mantis_dvb_exit(struct mantis_pci *mantis);
|
D | mantis_vp1041.c | 308 static int vp1041_frontend_init(struct mantis_pci *mantis, struct dvb_frontend *fe) in vp1041_frontend_init() argument 310 struct i2c_adapter *adapter = &mantis->adapter; in vp1041_frontend_init() 314 err = mantis_frontend_power(mantis, POWER_ON); in vp1041_frontend_init() 316 mantis_frontend_soft_reset(mantis); in vp1041_frontend_init() 318 mantis->fe = dvb_attach(stb0899_attach, &vp1041_stb0899_config, adapter); in vp1041_frontend_init() 319 if (mantis->fe) { in vp1041_frontend_init() 324 if (dvb_attach(stb6100_attach, mantis->fe, &vp1041_stb6100_config, adapter)) { in vp1041_frontend_init() 325 if (!dvb_attach(lnbp21_attach, mantis->fe, adapter, 0, 0)) in vp1041_frontend_init()
|