Lines Matching refs:length
451 return sprintf(buf, "%d\n", buffer->length); in iio_buffer_read_length()
467 if (val == buffer->length) in iio_buffer_write_length()
479 if (buffer->length && buffer->length < buffer->watermark) in iio_buffer_write_length()
480 buffer->watermark = buffer->length; in iio_buffer_write_length()
500 int length, i; in iio_compute_scan_bytes() local
507 length = ch->scan_type.storagebits / 8 * in iio_compute_scan_bytes()
510 length = ch->scan_type.storagebits / 8; in iio_compute_scan_bytes()
511 bytes = ALIGN(bytes, length); in iio_compute_scan_bytes()
512 bytes += length; in iio_compute_scan_bytes()
518 length = ch->scan_type.storagebits / 8 * in iio_compute_scan_bytes()
521 length = ch->scan_type.storagebits / 8; in iio_compute_scan_bytes()
522 bytes = ALIGN(bytes, length); in iio_compute_scan_bytes()
523 bytes += length; in iio_compute_scan_bytes()
846 if (val > buffer->length) { in iio_buffer_store_watermark()
866 static DEVICE_ATTR(length, S_IRUGO | S_IWUSR, iio_buffer_read_length,
868 static struct device_attribute dev_attr_length_ro = __ATTR(length,
1038 unsigned length; member
1051 datain + t->from, t->length); in iio_demux()
1100 unsigned int length) in iio_buffer_add_demux() argument
1103 if (*p && (*p)->from + (*p)->length == in_loc && in iio_buffer_add_demux()
1104 (*p)->to + (*p)->length == out_loc) { in iio_buffer_add_demux()
1105 (*p)->length += length; in iio_buffer_add_demux()
1112 (*p)->length = length; in iio_buffer_add_demux()
1123 int ret, in_ind = -1, out_ind, length; in iio_buffer_update_demux() local
1151 length = ch->scan_type.storagebits / 8 * in iio_buffer_update_demux()
1154 length = ch->scan_type.storagebits / 8; in iio_buffer_update_demux()
1156 in_loc = roundup(in_loc, length) + length; in iio_buffer_update_demux()
1160 length = ch->scan_type.storagebits / 8 * in iio_buffer_update_demux()
1163 length = ch->scan_type.storagebits / 8; in iio_buffer_update_demux()
1164 out_loc = roundup(out_loc, length); in iio_buffer_update_demux()
1165 in_loc = roundup(in_loc, length); in iio_buffer_update_demux()
1166 ret = iio_buffer_add_demux(buffer, &p, in_loc, out_loc, length); in iio_buffer_update_demux()
1169 out_loc += length; in iio_buffer_update_demux()
1170 in_loc += length; in iio_buffer_update_demux()
1177 length = ch->scan_type.storagebits / 8 * in iio_buffer_update_demux()
1180 length = ch->scan_type.storagebits / 8; in iio_buffer_update_demux()
1181 out_loc = roundup(out_loc, length); in iio_buffer_update_demux()
1182 in_loc = roundup(in_loc, length); in iio_buffer_update_demux()
1183 ret = iio_buffer_add_demux(buffer, &p, in_loc, out_loc, length); in iio_buffer_update_demux()
1186 out_loc += length; in iio_buffer_update_demux()
1187 in_loc += length; in iio_buffer_update_demux()