/drivers/comedi/drivers/ |
D | ni_labpc_isadma.c | 81 unsigned int nsamples; in labpc_drain_dma() local 95 nsamples = max_samples - comedi_bytes_to_samples(s, residue); in labpc_drain_dma() 97 if (devpriv->count <= nsamples) { in labpc_drain_dma() 98 nsamples = devpriv->count; in labpc_drain_dma() 101 leftover = devpriv->count - nsamples; in labpc_drain_dma() 105 devpriv->count -= nsamples; in labpc_drain_dma() 111 comedi_buf_write_samples(s, desc->virt_addr, nsamples); in labpc_drain_dma()
|
D | pcl816.c | 120 unsigned int nsamples; in pcl816_ai_setup_dma() local 128 nsamples = comedi_nsamples_left(s, max_samples + unread_samples); in pcl816_ai_setup_dma() 129 if (nsamples > unread_samples) { in pcl816_ai_setup_dma() 130 nsamples -= unread_samples; in pcl816_ai_setup_dma() 131 desc->size = comedi_samples_to_bytes(s, nsamples); in pcl816_ai_setup_dma() 248 unsigned int nsamples; in pcl816_interrupt() local 262 nsamples = comedi_bytes_to_samples(s, desc->size) - in pcl816_interrupt() 269 pcl816_ai_setup_dma(dev, s, nsamples); in pcl816_interrupt() 271 transfer_from_dma_buf(dev, s, desc->virt_addr, bufptr, nsamples); in pcl816_interrupt()
|
D | das16.c | 453 unsigned int nsamples; in das16_ai_setup_dma() local 459 nsamples = comedi_nsamples_left(s, max_samples + unread_samples); in das16_ai_setup_dma() 460 if (nsamples > unread_samples) { in das16_ai_setup_dma() 461 nsamples -= unread_samples; in das16_ai_setup_dma() 462 desc->size = comedi_samples_to_bytes(s, nsamples); in das16_ai_setup_dma() 478 unsigned int nsamples; in das16_interrupt() local 502 nsamples = comedi_bytes_to_samples(s, nbytes); in das16_interrupt() 505 if (nsamples) { in das16_interrupt() 507 das16_ai_setup_dma(dev, s, nsamples); in das16_interrupt() 512 comedi_buf_write_samples(s, desc->virt_addr, nsamples); in das16_interrupt()
|
D | pcl812.c | 534 unsigned int nsamples; in pcl812_ai_setup_dma() local 546 nsamples = comedi_nsamples_left(s, max_samples + unread_samples); in pcl812_ai_setup_dma() 547 if (nsamples > unread_samples) { in pcl812_ai_setup_dma() 548 nsamples -= unread_samples; in pcl812_ai_setup_dma() 549 desc->size = comedi_samples_to_bytes(s, nsamples); in pcl812_ai_setup_dma() 821 unsigned int nsamples; in pcl812_handle_dma() local 824 nsamples = comedi_bytes_to_samples(s, desc->size) - in pcl812_handle_dma() 831 pcl812_ai_setup_dma(dev, s, nsamples); in pcl812_handle_dma() 833 transfer_from_dma_buf(dev, s, desc->virt_addr, bufptr, nsamples); in pcl812_handle_dma()
|
D | pcl818.c | 309 unsigned int nsamples; in pcl818_ai_setup_dma() local 317 nsamples = comedi_nsamples_left(s, max_samples + unread_samples); in pcl818_ai_setup_dma() 318 if (nsamples > unread_samples) { in pcl818_ai_setup_dma() 319 nsamples -= unread_samples; in pcl818_ai_setup_dma() 320 desc->size = comedi_samples_to_bytes(s, nsamples); in pcl818_ai_setup_dma() 481 unsigned int nsamples = comedi_bytes_to_samples(s, desc->size); in pcl818_handle_dma() local 488 pcl818_ai_setup_dma(dev, s, nsamples); in pcl818_handle_dma() 490 for (i = 0; i < nsamples; i++) { in pcl818_handle_dma()
|
D | das1800.c | 343 unsigned int nsamples = comedi_nsamples_left(s, FIFO_SIZE / 2); in das1800_handle_fifo_half_full() local 345 insw(dev->iobase + DAS1800_FIFO, devpriv->fifo_buf, nsamples); in das1800_handle_fifo_half_full() 346 comedi_buf_write_samples(s, devpriv->fifo_buf, nsamples); in das1800_handle_fifo_half_full() 371 unsigned int nsamples; in das1800_flush_dma_channel() local 374 nsamples = comedi_bytes_to_samples(s, nbytes); in das1800_flush_dma_channel() 375 nsamples = comedi_nsamples_left(s, nsamples); in das1800_flush_dma_channel() 377 comedi_buf_write_samples(s, desc->virt_addr, nsamples); in das1800_flush_dma_channel()
|
D | usbduxfast.c | 235 unsigned int nsamples; in usbduxfast_ai_handle_urb() local 237 nsamples = comedi_bytes_to_samples(s, urb->actual_length); in usbduxfast_ai_handle_urb() 238 nsamples = comedi_nsamples_left(s, nsamples); in usbduxfast_ai_handle_urb() 239 comedi_buf_write_samples(s, urb->transfer_buffer, nsamples); in usbduxfast_ai_handle_urb()
|
D | comedi_test.c | 204 unsigned int nsamples; in waveform_ai_timer() local 208 nsamples = comedi_nsamples_left(s, UINT_MAX); in waveform_ai_timer() 210 while (nsamples && devpriv->ai_convert_time < now) { in waveform_ai_timer() 229 nsamples--; in waveform_ai_timer()
|
D | cb_pcidas64.c | 2739 unsigned int nsamples; in pio_drain_ai_fifo_32() local 2747 nsamples = comedi_nsamples_left(s, 100000); in pio_drain_ai_fifo_32() 2748 for (i = 0; read_code != write_code && i < nsamples;) { in pio_drain_ai_fifo_32() 2755 if (i < nsamples) { in pio_drain_ai_fifo_32() 2921 unsigned int nsamples = comedi_bytes_to_samples(s, max_bytes); in cb_pcidas64_ao_fill_buffer() local 2924 nsamples = comedi_nsamples_left(s, nsamples); in cb_pcidas64_ao_fill_buffer() 2925 actual_bytes = comedi_buf_read_samples(s, dest, nsamples); in cb_pcidas64_ao_fill_buffer() 2937 unsigned int nsamples; in load_ao_dma_buffer() local 2941 nsamples = cb_pcidas64_ao_fill_buffer(dev, s, in load_ao_dma_buffer() 2944 if (nsamples == 0) in load_ao_dma_buffer() [all …]
|
D | dt282x.c | 429 unsigned int nsamples = comedi_bytes_to_samples(s, desc->maxsize); in dt282x_ao_setup_dma() local 432 nbytes = comedi_buf_read_samples(s, desc->virt_addr, nsamples); in dt282x_ao_setup_dma() 465 unsigned int nsamples = comedi_bytes_to_samples(s, desc->size); in dt282x_ai_dma_interrupt() local 474 ret = comedi_buf_write_samples(s, desc->virt_addr, nsamples); in dt282x_ai_dma_interrupt() 478 devpriv->nread -= nsamples; in dt282x_ai_dma_interrupt()
|
D | cb_pcidas.c | 983 unsigned int nsamples) in cb_pcidas_ao_load_fifo() argument 988 nsamples = comedi_nsamples_left(s, nsamples); in cb_pcidas_ao_load_fifo() 989 nbytes = comedi_buf_read_samples(s, devpriv->ao_buffer, nsamples); in cb_pcidas_ao_load_fifo() 991 nsamples = comedi_bytes_to_samples(s, nbytes); in cb_pcidas_ao_load_fifo() 993 devpriv->ao_buffer, nsamples); in cb_pcidas_ao_load_fifo()
|
D | quatech_daqp_cs.c | 572 unsigned long long nsamples; in daqp_ai_cmd() local 575 nsamples = (unsigned long long)cmd->stop_arg * in daqp_ai_cmd() 577 nbytes = nsamples * comedi_bytes_per_sample(s); in daqp_ai_cmd()
|
D | addi_apci_3120.c | 432 unsigned int nsamples; in apci3120_interrupt_dma() local 446 nsamples = comedi_bytes_to_samples(s, nbytes); in apci3120_interrupt_dma() 447 if (nsamples) { in apci3120_interrupt_dma() 448 comedi_buf_write_samples(s, dmabuf->virt, nsamples); in apci3120_interrupt_dma()
|
D | ni_mio_common.c | 994 unsigned int nsamples; in ni_ao_fifo_half_empty() local 1002 nsamples = comedi_bytes_to_samples(s, nbytes); in ni_ao_fifo_half_empty() 1003 if (nsamples > board->ao_fifo_depth / 2) in ni_ao_fifo_half_empty() 1004 nsamples = board->ao_fifo_depth / 2; in ni_ao_fifo_half_empty() 1006 ni_ao_fifo_load(dev, s, nsamples); in ni_ao_fifo_half_empty() 1017 unsigned int nsamples; in ni_ao_prep_fifo() local 1029 nsamples = comedi_bytes_to_samples(s, nbytes); in ni_ao_prep_fifo() 1030 if (nsamples > board->ao_fifo_depth) in ni_ao_prep_fifo() 1031 nsamples = board->ao_fifo_depth; in ni_ao_prep_fifo() 1033 ni_ao_fifo_load(dev, s, nsamples); in ni_ao_prep_fifo() [all …]
|
D | das16m1.c | 127 unsigned int nsamples = comedi_bytes_to_samples(s, num_bytes); in das16m1_ai_munge() local 135 for (i = 0; i < nsamples; i++) in das16m1_ai_munge()
|
D | amplc_pci230.c | 2020 unsigned int nsamples; in pci230_handle_ai() local 2025 nsamples = comedi_nsamples_left(s, PCI230_ADC_FIFOLEVEL_HALFFULL); in pci230_handle_ai() 2026 if (nsamples == 0) in pci230_handle_ai() 2030 for (i = 0; i < nsamples; i++) { in pci230_handle_ai()
|
/drivers/comedi/ |
D | comedi_buf.c | 623 const void *data, unsigned int nsamples) in comedi_buf_write_samples() argument 634 if (nsamples > max_samples) { in comedi_buf_write_samples() 637 nsamples = max_samples; in comedi_buf_write_samples() 640 if (nsamples == 0) in comedi_buf_write_samples() 644 comedi_samples_to_bytes(s, nsamples)); in comedi_buf_write_samples() 669 void *data, unsigned int nsamples) in comedi_buf_read_samples() argument 677 if (nsamples > max_samples) in comedi_buf_read_samples() 678 nsamples = max_samples; in comedi_buf_read_samples() 680 if (nsamples == 0) in comedi_buf_read_samples() 684 comedi_samples_to_bytes(s, nsamples)); in comedi_buf_read_samples()
|
D | comedidev.h | 840 unsigned int nsamples) in comedi_samples_to_bytes() argument 842 return nsamples << comedi_sample_shift(s); in comedi_samples_to_bytes() 980 const void *data, unsigned int nsamples); 982 void *data, unsigned int nsamples); 1010 unsigned int nsamples);
|
D | drivers.c | 513 unsigned int nsamples) in comedi_nsamples_left() argument 521 return nsamples; in comedi_nsamples_left() 530 if (samples_left < nsamples) in comedi_nsamples_left() 532 return nsamples; in comedi_nsamples_left()
|
/drivers/hwmon/ |
D | lochnagar-hwmon.c | 92 enum lochnagar_measure_mode mode, int nsamples) in do_measurement() argument 104 ret = regmap_write(regmap, LOCHNAGAR2_IMON_CTRL2, nsamples); in do_measurement() 131 msleep((nsamples * 3) / 2); in do_measurement() 175 enum lochnagar_measure_mode mode, int nsamples, in read_sensor() argument 185 ret = do_measurement(regmap, chan, mode, nsamples); in read_sensor() 208 int nsamples = priv->power_nsamples[chan]; in read_power() local 222 ret = read_sensor(dev, chan, LN2_CURR, nsamples, LN2_PWR_UNITS, val); in read_power()
|
/drivers/gpu/drm/radeon/ |
D | r600_cs.c | 48 u32 nsamples; member 245 u32 nsamples; member 260 u32 tile_bytes = tile_width * tile_height * values->blocksize * values->nsamples; in r600_get_array_mode_alignment() 280 (tile_height * values->blocksize * values->nsamples))); in r600_get_array_mode_alignment() 288 (values->blocksize * values->nsamples * tile_width))); in r600_get_array_mode_alignment() 292 (*pitch_align) * values->blocksize * (*height_align) * values->nsamples); in r600_get_array_mode_alignment() 323 track->nsamples = 16; in r600_cs_track_init() 362 unsigned nsamples = track->is_resolve && i == 1 ? 1 : track->nsamples; in r600_cs_track_validate_cb() local 385 array_check.nsamples = nsamples; in r600_cs_track_validate_cb() 431 r600_fmt_get_blocksize(format) * nsamples; in r600_cs_track_validate_cb() [all …]
|
D | evergreen_cs.c | 47 u32 nsamples; /* unused */ member 180 unsigned nsamples; member 193 surf->layer_size = surf->nbx * surf->nby * surf->bpe * surf->nsamples; in evergreen_surface_check_linear() 208 surf->layer_size = surf->nbx * surf->nby * surf->bpe * surf->nsamples; in evergreen_surface_check_linear_aligned() 229 palign = track->group_size / (8 * surf->bpe * surf->nsamples); in evergreen_surface_check_1d() 239 track->group_size, surf->bpe, surf->nsamples); in evergreen_surface_check_1d() 261 tileb = 64 * surf->bpe * surf->nsamples; in evergreen_surface_check_2d() 413 surf.nsamples = 1; in evergreen_cs_track_validate_cb() 460 size = nby * surf.nbx * surf.bpe * surf.nsamples; in evergreen_cs_track_validate_cb() 485 surf.mode, surf.bpe, surf.nsamples, in evergreen_cs_track_validate_cb() [all …]
|
/drivers/net/can/usb/kvaser_usb/ |
D | kvaser_usb.h | 84 u8 nsamples; member
|
D | kvaser_usb_core.c | 554 busparams.nsamples = 3; in kvaser_usb_set_bittiming() 556 busparams.nsamples = 1; in kvaser_usb_set_bittiming() 602 busparams.nsamples = 1; in kvaser_usb_set_data_bittiming()
|
/drivers/net/wireless/broadcom/brcm80211/brcmsmac/phy/ |
D | phy_lcn.c | 1255 static u32 wlc_lcnphy_measure_digital_power(struct brcms_phy *pi, u16 nsamples) in wlc_lcnphy_measure_digital_power() argument 1259 if (!wlc_lcnphy_rx_iq_est(pi, nsamples, 32, &iq_est)) in wlc_lcnphy_measure_digital_power() 1261 return (iq_est.i_pwr + iq_est.q_pwr) / nsamples; in wlc_lcnphy_measure_digital_power()
|