/linux-6.3-rc2/drivers/comedi/drivers/ |
A D | usbduxsigma.c | 214 devpriv->ai_counter = devpriv->ai_timer; in usbduxsigma_ai_handle_urb() 339 devpriv->ao_counter = devpriv->ao_timer; in usbduxsigma_ao_handle_urb() 655 devpriv->dux_commands[1] = devpriv->ai_interval; in usbduxsigma_ai_cmd() 670 devpriv->ai_counter = devpriv->ai_timer; in usbduxsigma_ai_cmd() 908 devpriv->ao_counter = devpriv->ao_timer; in usbduxsigma_ao_cmd() 1099 devpriv->dux_commands[1] = devpriv->pwm_delay; in usbduxsigma_pwm_start() 1341 if (!devpriv->dux_commands || !devpriv->in_buf || !devpriv->insn_buf || in usbduxsigma_alloc_usb_buffers() 1342 !devpriv->ai_urbs || !devpriv->ao_urbs) in usbduxsigma_alloc_usb_buffers() 1451 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in usbduxsigma_auto_attach() 1452 if (!devpriv) in usbduxsigma_auto_attach() [all …]
|
A D | ni_labpc_common.c | 110 devpriv->write_byte(dev, devpriv->cmd2, CMD2_REG); in labpc_cancel() 114 devpriv->write_byte(dev, devpriv->cmd3, CMD3_REG); in labpc_cancel() 144 devpriv->write_byte(dev, devpriv->cmd1, CMD1_REG); in labpc_ai_set_chan_and_gain() 191 devpriv->write_byte(dev, devpriv->cmd6, CMD6_REG); in labpc_setup_cmd6_reg() 218 devpriv->stat1 = devpriv->read_byte(dev, STAT1_REG); in labpc_ai_eoc() 250 devpriv->write_byte(dev, devpriv->cmd4, CMD4_REG); in labpc_ai_insn_read() 723 devpriv->write_byte(dev, devpriv->cmd3, CMD3_REG); in labpc_ai_cmd() 741 devpriv->write_byte(dev, devpriv->cmd4, CMD4_REG); in labpc_ai_cmd() 758 devpriv->write_byte(dev, devpriv->cmd2, CMD2_REG); in labpc_ai_cmd() 921 devpriv->write_byte(dev, devpriv->cmd2, CMD2_REG); in labpc_ao_insn_write() [all …]
|
A D | usbdux.c | 219 usbdux_unlink_urbs(devpriv->ai_urbs, devpriv->n_ai_urbs); in usbdux_ai_stop() 250 devpriv->ai_counter = devpriv->ai_timer; in usbduxsub_ai_handle_urb() 347 usbdux_unlink_urbs(devpriv->ao_urbs, devpriv->n_ao_urbs); in usbdux_ao_stop() 379 devpriv->ao_counter = devpriv->ao_timer; in usbduxsub_ao_handle_urb() 708 devpriv->ai_counter = devpriv->ai_timer; in usbdux_ai_cmd() 973 devpriv->ao_counter = devpriv->ao_timer; in usbdux_ao_cmd() 1254 devpriv->dux_commands[1] = devpriv->pwm_delay; in usbdux_pwm_start() 1450 if (!devpriv->dux_commands || !devpriv->in_buf || !devpriv->insn_buf || in usbdux_alloc_usb_buffers() 1451 !devpriv->ai_urbs || !devpriv->ao_urbs) in usbdux_alloc_usb_buffers() 1564 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in usbdux_auto_attach() [all …]
|
A D | vmk80xx.c | 191 ep = devpriv->ep_rx; in vmk80xx_read_packet() 212 ep = devpriv->ep_tx; in vmk80xx_write_packet() 277 up(&devpriv->limit_sem); in vmk80xx_ai_insn_read() 318 up(&devpriv->limit_sem); in vmk80xx_ao_insn_write() 655 if (!devpriv->ep_rx) in vmk80xx_find_usb_endpoints() 662 if (!devpriv->ep_tx) in vmk80xx_find_usb_endpoints() 668 if (!devpriv->ep_rx || !devpriv->ep_tx) in vmk80xx_find_usb_endpoints() 671 if (!usb_endpoint_maxp(devpriv->ep_rx) || !usb_endpoint_maxp(devpriv->ep_tx)) in vmk80xx_find_usb_endpoints() 799 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in vmk80xx_auto_attach() 800 if (!devpriv) in vmk80xx_auto_attach() [all …]
|
A D | ni_mio_common.c | 1449 if (devpriv->is_611x || devpriv->is_6143) in ni_ai_setup_MITE_dma() 1479 if (devpriv->is_611x || devpriv->is_6713) { in ni_ao_setup_MITE_dma() 1817 if (!devpriv->is_611x && !devpriv->is_6143) in ni_load_channelgain_list() 1995 if (devpriv->is_611x || devpriv->is_6143) in ni_min_ai_scan_period_ns() 2018 if (devpriv->is_611x || devpriv->is_6143) in ni_ai_cmdtest() 2070 if (devpriv->is_611x || devpriv->is_6143) { in ni_ai_cmdtest() 2120 if (!devpriv->is_611x && !devpriv->is_6143) { in ni_ai_cmdtest() 2507 if (devpriv->is_611x || devpriv->is_6143) in ni_ai_insn_config() 3195 if (devpriv->is_m_series | devpriv->is_6xxx) in ni_ao_cmd_set_channels() 4173 data[1] = devpriv->pwm_up_count * devpriv->clock_ns; in ni_get_pwm_config() [all …]
|
A D | adl_pci9118.c | 566 if (devpriv->usedma) in pci9118_ai_cancel() 586 devpriv->ai_do = 0; in pci9118_ai_cancel() 587 devpriv->usedma = 0; in pci9118_ai_cancel() 640 struct pci9118_dmabuf *dmabuf = &devpriv->dmabuf[devpriv->dma_actbuf]; in pci9118_ai_get_dma() 651 devpriv->dma_actbuf = 1 - devpriv->dma_actbuf; in pci9118_ai_get_dma() 986 if ((devpriv->usedma == 1) && (devpriv->ai_add_back == 1)) { in pci9118_ai_cmd() 1028 devpriv->ai_add_front, devpriv->ai_add_back); in pci9118_ai_cmd() 1031 devpriv->ai_do = 0; in pci9118_ai_cmd() 1492 if (!devpriv) in pci9118_free_dma() 1515 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in pci9118_common_attach() [all …]
|
A D | cb_pcidas64.c | 1557 if (!devpriv) in cb_pcidas64_free_dma() 2790 devpriv->ai_buffer_bus_addr[devpriv->ai_dma_index] || in drain_dma_buffers() 2792 devpriv->ai_buffer_bus_addr[devpriv->ai_dma_index] + in drain_dma_buffers() 2797 devpriv->ai_buffer[devpriv->ai_dma_index], in drain_dma_buffers() 2799 devpriv->ai_dma_index = (devpriv->ai_dma_index + 1) % in drain_dma_buffers() 3982 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in auto_attach() 3983 if (!devpriv) in auto_attach() 4001 if (!devpriv->plx9080_iobase || !devpriv->main_iobase || !dev->mmio) { in auto_attach() 4011 devpriv->local0_iobase = ((u32)devpriv->main_phys_iobase & in auto_attach() 4017 devpriv->local1_iobase = ((u32)devpriv->dio_counter_phys_iobase & in auto_attach() [all …]
|
A D | gsc_hpdi.c | 316 devpriv->dio_count = 1; in gsc_hpdi_cmd() 435 devpriv->desc_dio_buffer[i] = devpriv->dio_buffer[idx] + in gsc_hpdi_setup_dma_descriptors() 448 devpriv->block_size = len; in gsc_hpdi_setup_dma_descriptors() 484 if (!devpriv) in gsc_hpdi_free_dma() 496 if (devpriv->dma_desc) in gsc_hpdi_free_dma() 500 devpriv->dma_desc, in gsc_hpdi_free_dma() 590 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in gsc_hpdi_auto_attach() 591 if (!devpriv) in gsc_hpdi_auto_attach() 621 devpriv->dio_buffer[i] = in gsc_hpdi_auto_attach() 637 if (!devpriv->dma_desc) { in gsc_hpdi_auto_attach() [all …]
|
A D | amplc_pci230.c | 778 devpriv->adcg = (devpriv->adcg & ~(3 << gainshift)) | in pci230_ai_insn_read() 792 outw(devpriv->adcg, devpriv->daqio + PCI230_ADCG); in pci230_ai_insn_read() 1161 outw(devpriv->daccon, devpriv->daqio + PCI230_DACCON); in pci230_handle_ao_fifo() 1254 outw(devpriv->daccon, devpriv->daqio + PCI230_DACCON); in pci230_ao_start() 1492 if (devpriv->hwver > 0 && devpriv->hwver < 4) { in pci230_ai_check_chanlist() 1915 outw(devpriv->adccon, devpriv->daqio + PCI230_ADCCON); in pci230_ai_start() 2171 devpriv->adcg = (devpriv->adcg & ~(3 << gainshift)) | in pci230_ai_cmd() 2179 outw(devpriv->adcg, devpriv->daqio + PCI230_ADCG); in pci230_ai_cmd() 2380 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in pci230_auto_attach() 2421 devpriv->hwver = inw(devpriv->daqio + PCI230P_HWVER); in pci230_auto_attach() [all …]
|
A D | comedi_test.c | 196 struct waveform_private *devpriv = from_timer(devpriv, t, ai_timer); in waveform_ai_timer() local 224 if (devpriv->wf_current >= devpriv->wf_period) in waveform_ai_timer() 225 devpriv->wf_current %= devpriv->wf_period; in waveform_ai_timer() 366 devpriv->ai_scan_period = devpriv->ai_convert_period * in waveform_ai_cmd() 387 devpriv->wf_current = do_div(wf_current, devpriv->wf_period); in waveform_ai_cmd() 433 struct waveform_private *devpriv = from_timer(devpriv, t, ao_timer); in waveform_ao_timer() local 677 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in waveform_common_attach() 678 if (!devpriv) in waveform_common_attach() 723 devpriv->dev = dev; in waveform_common_attach() 730 devpriv->wf_amplitude, devpriv->wf_period); in waveform_common_attach() [all …]
|
A D | addi_apci_1564.c | 352 devpriv->ctrl = 0; in apci1564_cos_insn_config() 353 devpriv->mode1 = 0; in apci1564_cos_insn_config() 354 devpriv->mode2 = 0; in apci1564_cos_insn_config() 365 devpriv->mode1 = 0; in apci1564_cos_insn_config() 366 devpriv->mode2 = 0; in apci1564_cos_insn_config() 383 devpriv->mode1 = 0; in apci1564_cos_insn_config() 467 if (!devpriv->ctrl && !(devpriv->mode1 || devpriv->mode2)) { in apci1564_cos_cmd() 667 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in apci1564_auto_attach() 668 if (!devpriv) in apci1564_auto_attach() 682 devpriv->timer = devpriv->eeprom + APCI1564_REV1_TIMER_IOBASE; in apci1564_auto_attach() [all …]
|
A D | amplc_pci224.c | 395 devpriv->daccon = COMBINE(devpriv->daccon, board->ao_hwrange[range], in pci224_ao_set_data() 462 while (devpriv->intr_running && devpriv->intr_cpuid != THISCPU) { in pci224_ao_stop() 469 devpriv->daccon = in pci224_ao_stop() 496 outb(devpriv->intsce, devpriv->iobase1 + PCI224_INT_SCE); in pci224_ao_start() 556 outw(devpriv->ao_scan_vals[devpriv->ao_scan_order[i]], in pci224_ao_handle_fifo() 566 devpriv->daccon = COMBINE(devpriv->daccon, in pci224_ao_handle_fifo() 872 devpriv->daccon = in pci224_ao_cmd() 892 outb(devpriv->intsce, devpriv->iobase1 + PCI224_INT_SCE); in pci224_ao_cmd() 1012 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in pci224_auto_attach() 1013 if (!devpriv) in pci224_auto_attach() [all …]
|
A D | dt282x.c | 320 if (!devpriv->ntrig) in dt282x_prep_ai_dma() 479 devpriv->nread = 0; in dt282x_ai_dma_interrupt() 711 devpriv->nread = devpriv->ntrig; in dt282x_ai_cmd() 722 devpriv->adcsr = 0; in dt282x_ai_cmd() 754 devpriv->adcsr = 0; in dt282x_ai_cancel() 757 devpriv->supcsr = 0; in dt282x_ai_cancel() 892 devpriv->nread = devpriv->ntrig; in dt282x_ao_cmd() 1025 if (!devpriv->dma) in dt282x_alloc_dma() 1035 if (devpriv) in dt282x_free_dma() 1075 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in dt282x_attach() [all …]
|
A D | ni_usb6501.c | 180 mutex_lock(&devpriv->mut); in ni6501_port_command() 212 devpriv->usb_tx_buf, in ni6501_port_command() 222 devpriv->usb_rx_buf, in ni6501_port_command() 296 devpriv->usb_tx_buf, in ni6501_counter_command() 306 devpriv->usb_rx_buf, in ni6501_counter_command() 492 if (!devpriv->ep_rx) in ni6501_find_endpoints() 498 if (!devpriv->ep_tx) in ni6501_find_endpoints() 504 if (!devpriv->ep_rx || !devpriv->ep_tx) in ni6501_find_endpoints() 524 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in ni6501_auto_attach() 525 if (!devpriv) in ni6501_auto_attach() [all …]
|
A D | usbduxfast.c | 232 if (devpriv->ignore) { in usbduxfast_ai_handle_urb() 233 devpriv->ignore--; in usbduxfast_ai_handle_urb() 927 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in usbduxfast_auto_attach() 928 if (!devpriv) in usbduxfast_auto_attach() 935 if (!devpriv->duxbuf) in usbduxfast_auto_attach() 947 if (!devpriv->urb) in usbduxfast_auto_attach() 951 if (!devpriv->inbuf) in usbduxfast_auto_attach() 985 if (!devpriv) in usbduxfast_detach() 992 if (devpriv->urb) { in usbduxfast_detach() 996 kfree(devpriv->inbuf); in usbduxfast_detach() [all …]
|
A D | cb_pcidas.c | 419 outw(devpriv->ao_ctrl, devpriv->pcibar1 + PCIDAS_AO_REG); in cb_pcidas_ao_nofifo_insn_write() 454 outw(devpriv->ao_ctrl, devpriv->pcibar1 + PCIDAS_AO_REG); in cb_pcidas_ao_fifo_insn_write() 970 outw(devpriv->ctrl, devpriv->pcibar1 + PCIDAS_CTRL_REG); in cb_pcidas_ai_cancel() 1020 outw(devpriv->ao_ctrl, devpriv->pcibar1 + PCIDAS_AO_REG); in cb_pcidas_ao_inttrig() 1051 outw(devpriv->ao_ctrl, devpriv->pcibar1 + PCIDAS_AO_REG); in cb_pcidas_ao_cmd() 1093 outw(devpriv->ctrl, devpriv->pcibar1 + PCIDAS_CTRL_REG); in cb_pcidas_ao_cancel() 1097 outw(devpriv->ao_ctrl, devpriv->pcibar1 + PCIDAS_AO_REG); in cb_pcidas_ao_cancel() 1263 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in cb_pcidas_auto_attach() 1264 if (!devpriv) in cb_pcidas_auto_attach() 1452 if (devpriv) { in cb_pcidas_detach() [all …]
|
A D | addi_apci_3120.c | 434 dmabuf = &devpriv->dmabuf[devpriv->cur_dmabuf]; in apci3120_interrupt_dma() 460 devpriv->cur_dmabuf = !devpriv->cur_dmabuf; in apci3120_interrupt_dma() 461 dmabuf = &devpriv->dmabuf[devpriv->cur_dmabuf]; in apci3120_interrupt_dma() 577 if (devpriv->use_dma) in apci3120_ai_cmd() 677 devpriv->ctrl = 0; in apci3120_cancel() 681 devpriv->mode = 0; in apci3120_cancel() 882 devpriv->mode |= mode; in apci3120_timer_insn_config() 928 devpriv->use_dma = 1; in apci3120_dma_alloc() 940 if (!devpriv) in apci3120_dma_free() 981 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in apci3120_auto_attach() [all …]
|
A D | comedi_bond.c | 79 devs = devpriv->devs; in bonding_dio_insn_bits() 137 devs = devpriv->devs; in bonding_dio_insn_config() 176 devpriv->name[0] = 0; in do_dev_config() 252 devpriv->devs[devpriv->ndevs++] = bdev; in do_dev_config() 280 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in bonding_attach() 281 if (!devpriv) in bonding_attach() 309 devpriv->nchans, devpriv->ndevs); in bonding_attach() 318 if (devpriv && devpriv->devs) { in bonding_detach() 325 bdev = devpriv->devs[devpriv->ndevs]; in bonding_detach() 332 kfree(devpriv->devs); in bonding_detach() [all …]
|
A D | ni_labpc_isadma.c | 53 struct labpc_private *devpriv = dev->private; in labpc_setup_dma() local 61 devpriv->count * sample_size < desc->size) in labpc_setup_dma() 62 desc->size = devpriv->count * sample_size; in labpc_setup_dma() 73 struct labpc_private *devpriv = dev->private; in labpc_drain_dma() local 96 if (devpriv->count <= nsamples) { in labpc_drain_dma() 97 nsamples = devpriv->count; in labpc_drain_dma() 100 leftover = devpriv->count - nsamples; in labpc_drain_dma() 104 devpriv->count -= nsamples; in labpc_drain_dma() 137 if (devpriv->stat1 & STAT1_GATA0 || in labpc_handle_dma_status() 162 if (devpriv) in labpc_free_dma_chan() [all …]
|
A D | addi_apci_1032.c | 127 devpriv->ctrl = 0; in apci1032_cos_insn_config() 128 devpriv->mode1 = 0; in apci1032_cos_insn_config() 129 devpriv->mode2 = 0; in apci1032_cos_insn_config() 139 devpriv->mode1 = 0; in apci1032_cos_insn_config() 140 devpriv->mode2 = 0; in apci1032_cos_insn_config() 147 devpriv->mode1 |= himask; in apci1032_cos_insn_config() 157 devpriv->mode1 = 0; in apci1032_cos_insn_config() 158 devpriv->mode2 = 0; in apci1032_cos_insn_config() 238 if (!devpriv->ctrl) { in apci1032_cos_cmd() 307 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in apci1032_auto_attach() [all …]
|
A D | ni_at_a2150.c | 174 num_points = devpriv->count; in a2150_interrupt() 305 devpriv->config_bits |= in a2150_get_timing() 309 devpriv->config_bits |= in a2150_get_timing() 487 devpriv->config_bits |= AC0_BIT; in a2150_ai_cmd() 491 devpriv->config_bits |= AC1_BIT; in a2150_ai_cmd() 657 if (!devpriv->dma) { in a2150_alloc_irq_and_dma() 670 if (devpriv) in a2150_free_dma() 687 struct a2150_private *devpriv; in a2150_attach() local 693 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in a2150_attach() 694 if (!devpriv) in a2150_attach() [all …]
|
A D | ni_660x.c | 488 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in ni_660x_allocate_private() 489 if (!devpriv) in ni_660x_allocate_private() 509 devpriv->ring[i][j] = mite_alloc_ring(devpriv->mite); in ni_660x_alloc_mite_rings() 510 if (!devpriv->ring[i][j]) in ni_660x_alloc_mite_rings() 614 devpriv->io_dir |= bit; in ni_660x_set_pfi_direction() 618 devpriv->io_dir &= ~bit; in ni_660x_set_pfi_direction() 984 devpriv->dma_cfg[chip] = 0; in ni_660x_init_tio_chips() 1024 devpriv = dev->private; in ni_660x_auto_attach() 1027 if (!devpriv->mite) in ni_660x_auto_attach() 1209 if (devpriv) { in ni_660x_detach() [all …]
|
A D | me_daq.c | 306 devpriv->ctrl2 |= ME_CTRL2_DAC_ENA; in me_ao_insn_write() 419 devpriv->dac_ctrl = 0; in me_reset() 420 devpriv->ctrl1 = 0; in me_reset() 421 devpriv->ctrl2 = 0; in me_reset() 431 struct me_private_data *devpriv; in me_auto_attach() local 442 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in me_auto_attach() 443 if (!devpriv) in me_auto_attach() 451 if (!devpriv->plx_regbase) in me_auto_attach() 515 if (devpriv) { in me_detach() 518 if (devpriv->plx_regbase) in me_detach() [all …]
|
A D | dyna_pci10xx.c | 76 mutex_lock(&devpriv->mutex); in dyna_pci10xx_insn_read_ai() 94 mutex_unlock(&devpriv->mutex); in dyna_pci10xx_insn_read_ai() 109 mutex_lock(&devpriv->mutex); in dyna_pci10xx_insn_write_ao() 116 mutex_unlock(&devpriv->mutex); in dyna_pci10xx_insn_write_ao() 129 mutex_lock(&devpriv->mutex); in dyna_pci10xx_di_insn_bits() 131 d = inw_p(devpriv->BADR3); in dyna_pci10xx_di_insn_bits() 148 mutex_lock(&devpriv->mutex); in dyna_pci10xx_do_insn_bits() 169 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in dyna_pci10xx_auto_attach() 170 if (!devpriv) in dyna_pci10xx_auto_attach() 179 mutex_init(&devpriv->mutex); in dyna_pci10xx_auto_attach() [all …]
|
A D | pcl812.c | 713 devpriv->ai_dma = 1; in pcl812_ai_cmd() 721 devpriv->ai_dma = 0; in pcl812_ai_cmd() 728 devpriv->ai_eos = 1; in pcl812_ai_cmd() 732 devpriv->ai_dma = 0; in pcl812_ai_cmd() 748 if (devpriv->ai_dma) in pcl812_ai_cmd() 845 if (devpriv->ai_dma) in pcl812_interrupt() 866 if (!devpriv->ai_dma) in pcl812_ai_poll() 897 if (devpriv->ai_dma) in pcl812_ai_cancel() 1124 if (devpriv) in pcl812_free_dma() 1137 devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); in pcl812_attach() [all …]
|