Home
last modified time | relevance | path

Searched refs:avail (Results 1 – 25 of 267) sorted by relevance

1234567891011

/Linux-v5.10/drivers/iio/potentiometer/
Dmcp4531.c38 int avail[3]; member
78 [MCP453x_502] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 5, },
79 [MCP453x_103] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 10, },
80 [MCP453x_503] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 50, },
81 [MCP453x_104] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 100, },
82 [MCP454x_502] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 5, },
83 [MCP454x_103] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 10, },
84 [MCP454x_503] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 50, },
85 [MCP454x_104] = { .wipers = 1, .avail = { 0, 1, 128 }, .kohms = 100, },
86 [MCP455x_502] = { .wipers = 1, .avail = { 0, 1, 256 }, .kohms = 5, },
[all …]
Dtpl0102.c18 int avail[3]; member
31 [CAT5140_503] = { .wipers = 1, .avail = { 0, 1, 255 }, .kohms = 50, },
32 [CAT5140_104] = { .wipers = 1, .avail = { 0, 1, 255 }, .kohms = 100, },
34 [TPL0102_104] = { .wipers = 2, .avail = { 0, 1, 255 }, .kohms = 100 },
35 [TPL0401_103] = { .wipers = 1, .avail = { 0, 1, 127 }, .kohms = 10, },
77 *val2 = data->cfg->avail[2] + 1; in tpl0102_read_raw()
93 *length = ARRAY_SIZE(data->cfg->avail); in tpl0102_read_avail()
94 *vals = data->cfg->avail; in tpl0102_read_avail()
111 if (val > data->cfg->avail[2] || val < 0) in tpl0102_write_raw()
/Linux-v5.10/drivers/xen/xenbus/
Dxenbus_comms.c122 unsigned int avail; in xb_write() local
137 dst = get_output_chunk(cons, prod, intf->req, &avail); in xb_write()
138 if (avail == 0) in xb_write()
140 if (avail > len) in xb_write()
141 avail = len; in xb_write()
143 memcpy(dst, data, avail); in xb_write()
144 data += avail; in xb_write()
145 len -= avail; in xb_write()
146 bytes += avail; in xb_write()
150 intf->req_prod += avail; in xb_write()
[all …]
/Linux-v5.10/tools/virtio/ringtest/
Dvirtio_ring_0_9.c103 unsigned avail; in add_inbuf() local
135 avail = guest.avail_idx++; in add_inbuf()
136 ring.avail->ring[avail & (ring_size - 1)] = in add_inbuf()
137 (head | (avail & ~(ring_size - 1))) ^ 0x8000; in add_inbuf()
142 avail = (ring_size - 1) & (guest.avail_idx++); in add_inbuf()
143 ring.avail->ring[avail] = head; in add_inbuf()
148 ring.avail->idx = guest.avail_idx; in add_inbuf()
262 unsigned index = ring.avail->ring[head & (ring_size - 1)]; in avail_empty()
266 return head == ring.avail->idx; in avail_empty()
277 head = ring.avail->ring[used_idx & (ring_size - 1)]; in use_buf()
[all …]
/Linux-v5.10/arch/x86/kernel/
Dresource.c26 static void remove_e820_regions(struct resource *avail) in remove_e820_regions() argument
34 resource_clip(avail, entry->addr, in remove_e820_regions()
39 void arch_remove_reservations(struct resource *avail) in arch_remove_reservations() argument
46 if (avail->flags & IORESOURCE_MEM) { in arch_remove_reservations()
47 resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END); in arch_remove_reservations()
49 remove_e820_regions(avail); in arch_remove_reservations()
/Linux-v5.10/drivers/s390/cio/
Dairq.c155 iv->avail = kmalloc(size, GFP_KERNEL); in airq_iv_create()
156 if (!iv->avail) in airq_iv_create()
158 memset(iv->avail, 0xff, size); in airq_iv_create()
185 kfree(iv->avail); in airq_iv_create()
209 kfree(iv->avail); in airq_iv_release()
227 if (!iv->avail || num == 0) in airq_iv_alloc()
230 bit = find_first_bit_inv(iv->avail, iv->bits); in airq_iv_alloc()
233 if (!test_bit_inv(bit + i, iv->avail)) in airq_iv_alloc()
238 clear_bit_inv(bit + i, iv->avail); in airq_iv_alloc()
243 bit = find_next_bit_inv(iv->avail, iv->bits, bit + i + 1); in airq_iv_alloc()
[all …]
/Linux-v5.10/sound/core/
Dcompress_offload.c184 struct snd_compr_avail *avail) in snd_compr_calc_avail() argument
186 memset(avail, 0, sizeof(*avail)); in snd_compr_calc_avail()
187 snd_compr_update_tstamp(stream, &avail->tstamp); in snd_compr_calc_avail()
210 avail->avail = stream->runtime->total_bytes_available - in snd_compr_calc_avail()
213 avail->avail = stream->runtime->buffer_size - avail->avail; in snd_compr_calc_avail()
215 pr_debug("ret avail as %lld\n", avail->avail); in snd_compr_calc_avail()
216 return avail->avail; in snd_compr_calc_avail()
221 struct snd_compr_avail avail; in snd_compr_get_avail() local
223 return snd_compr_calc_avail(stream, &avail); in snd_compr_get_avail()
230 size_t avail; in snd_compr_ioctl_avail() local
[all …]
Drawmidi.c57 u32 avail; /* available bytes */ member
69 size_t avail; /* available bytes */ member
102 return runtime->avail >= runtime->avail_min; in snd_rawmidi_ready()
110 return runtime->avail >= runtime->avail_min && in snd_rawmidi_ready_append()
111 (!substream->append || runtime->avail >= count); in snd_rawmidi_ready_append()
149 runtime->avail = 0; in snd_rawmidi_runtime_create()
151 runtime->avail = runtime->buffer_size; in snd_rawmidi_runtime_create()
193 runtime->avail = is_input ? 0 : runtime->buffer_size; in __reset_runtime_ptrs()
223 (runtime->avail >= runtime->buffer_size), in snd_rawmidi_drain_output()
227 if (runtime->avail < runtime->buffer_size && !timeout) { in snd_rawmidi_drain_output()
[all …]
/Linux-v5.10/drivers/staging/fwserial/
Ddma_fifo.c76 fifo->avail = size; in dma_fifo_alloc()
125 fifo->avail = fifo->size; in dma_fifo_reset()
148 if (n > fifo->avail) in dma_fifo_in()
149 n = fifo->avail; in dma_fifo_in()
159 fifo->avail < n, in dma_fifo_in()
161 fifo->in, fifo->out, fifo->done, n, fifo->avail)) in dma_fifo_in()
165 fifo->avail -= n; in dma_fifo_in()
168 fifo->done, n, fifo->avail); in dma_fifo_in()
217 fifo->out, fifo->done, n, len, fifo->avail); in dma_fifo_out_pend()
280 fifo->avail += pending->len; in dma_fifo_out_complete()
[all …]
/Linux-v5.10/net/rds/
Dstats.c120 unsigned int avail; in rds_stats_info() local
122 avail = len / sizeof(struct rds_info_counter); in rds_stats_info()
124 if (avail < ARRAY_SIZE(rds_stat_names)) { in rds_stats_info()
125 avail = 0; in rds_stats_info()
138 avail -= ARRAY_SIZE(rds_stat_names); in rds_stats_info()
142 lens->nr = rds_trans_stats_info_copy(iter, avail) + in rds_stats_info()
Dib_ring.c99 u32 ret = 0, avail; in rds_ib_ring_alloc() local
101 avail = ring->w_nr - __rds_ib_ring_used(ring); in rds_ib_ring_alloc()
104 ring->w_alloc_ptr, avail); in rds_ib_ring_alloc()
106 if (val && avail) { in rds_ib_ring_alloc()
107 ret = min(val, avail); in rds_ib_ring_alloc()
/Linux-v5.10/arch/mips/cavium-octeon/crypto/
Docteon-md5.c84 const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); in octeon_md5_update() local
90 if (avail > len) { in octeon_md5_update()
91 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), in octeon_md5_update()
96 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), data, in octeon_md5_update()
97 avail); in octeon_md5_update()
103 data += avail; in octeon_md5_update()
104 len -= avail; in octeon_md5_update()
/Linux-v5.10/drivers/infiniband/hw/qib/
Dqib_fs.c150 size_t avail; in dev_counters_read() local
153 avail = dd->f_read_cntrs(dd, *ppos, NULL, &counters); in dev_counters_read()
154 return simple_read_from_buffer(buf, count, ppos, counters, avail); in dev_counters_read()
162 size_t avail; in dev_names_read() local
165 avail = dd->f_read_cntrs(dd, *ppos, &names, NULL); in dev_names_read()
166 return simple_read_from_buffer(buf, count, ppos, names, avail); in dev_names_read()
184 size_t avail; in portnames_read() local
187 avail = dd->f_read_portcntrs(dd, *ppos, 0, &names, NULL); in portnames_read()
188 return simple_read_from_buffer(buf, count, ppos, names, avail); in portnames_read()
196 size_t avail; in portcntrs_1_read() local
[all …]
/Linux-v5.10/drivers/rpmsg/
Dqcom_glink_smem.c119 u32 avail; in glink_smem_tx_avail() local
125 avail = pipe->native.length - head + tail; in glink_smem_tx_avail()
127 avail = tail - head; in glink_smem_tx_avail()
129 if (avail < (FIFO_FULL_RESERVE + TX_BLOCKED_CMD_RESERVE)) in glink_smem_tx_avail()
130 avail = 0; in glink_smem_tx_avail()
132 avail -= FIFO_FULL_RESERVE + TX_BLOCKED_CMD_RESERVE; in glink_smem_tx_avail()
134 return avail; in glink_smem_tx_avail()
267 rx_pipe->native.avail = glink_smem_rx_avail; in qcom_glink_smem_register()
272 tx_pipe->native.avail = glink_smem_tx_avail; in qcom_glink_smem_register()
/Linux-v5.10/drivers/net/ethernet/mellanox/mlx5/core/
Duar.c211 unsigned int *avail; in alloc_bfreg() local
237 avail = &up->fp_avail; in alloc_bfreg()
240 avail = &up->reg_avail; in alloc_bfreg()
244 (*avail)--; in alloc_bfreg()
245 if (!(*avail)) in alloc_bfreg()
296 unsigned int *avail; in mlx5_free_bfreg() local
312 avail = &up->fp_avail; in mlx5_free_bfreg()
315 avail = &up->reg_avail; in mlx5_free_bfreg()
319 (*avail)++; in mlx5_free_bfreg()
321 if (*avail == 1) in mlx5_free_bfreg()
/Linux-v5.10/arch/ia64/kernel/
Dpalinfo.c519 static void feature_set_info(struct seq_file *m, u64 avail, u64 status, u64 control, in feature_set_info() argument
526 for(i=0; i < 64; i++, avail >>=1, status >>=1, control >>=1) { in feature_set_info()
530 if (!(avail & 0x1)) /* Print only bits that are available */ in feature_set_info()
536 avail & 0x1 ? (status & 0x1 ? in feature_set_info()
538 avail & 0x1 ? (control & 0x1 ? in feature_set_info()
544 avail & 0x1 ? (status & 0x1 ? in feature_set_info()
546 avail & 0x1 ? (control & 0x1 ? in feature_set_info()
554 u64 avail=1, status=1, control=1, feature_set=0; in processor_info() local
558 ret = ia64_pal_proc_get_features(&avail, &status, &control, in processor_info()
568 feature_set_info(m, avail, status, control, feature_set); in processor_info()
[all …]
/Linux-v5.10/arch/powerpc/crypto/
Dmd5-glue.c48 unsigned int avail = 64 - offset; in ppc_md5_update() local
53 if (avail > len) { in ppc_md5_update()
59 memcpy((char *)sctx->block + offset, src, avail); in ppc_md5_update()
61 len -= avail; in ppc_md5_update()
62 src += avail; in ppc_md5_update()
Dsha1-spe-glue.c77 const unsigned int avail = 64 - offset; in ppc_spe_sha1_update() local
81 if (avail > len) { in ppc_spe_sha1_update()
90 memcpy((char *)sctx->buffer + offset, src, avail); in ppc_spe_sha1_update()
96 len -= avail; in ppc_spe_sha1_update()
97 src += avail; in ppc_spe_sha1_update()
/Linux-v5.10/drivers/net/ethernet/chelsio/inline_crypto/chtls/
Dchtls_io.c1436 unsigned long avail; in chtls_pt_recvmsg() local
1537 avail = skb->len - offset; in chtls_pt_recvmsg()
1538 if (len < avail) in chtls_pt_recvmsg()
1539 avail = len; in chtls_pt_recvmsg()
1544 if (urg_offset < avail) { in chtls_pt_recvmsg()
1546 avail = urg_offset; in chtls_pt_recvmsg()
1551 avail--; in chtls_pt_recvmsg()
1552 if (!avail) in chtls_pt_recvmsg()
1573 if (skb_copy_datagram_msg(skb, offset, msg, avail)) { in chtls_pt_recvmsg()
1580 copied += avail; in chtls_pt_recvmsg()
[all …]
/Linux-v5.10/drivers/block/
Dps3vram.c443 unsigned int offset, avail; in ps3vram_read() local
447 avail = priv->cache.page_size - offset; in ps3vram_read()
454 (unsigned int)from, cached, offset, avail, count); in ps3vram_read()
456 if (avail > count) in ps3vram_read()
457 avail = count; in ps3vram_read()
458 memcpy(buf, priv->xdr_buf + cached, avail); in ps3vram_read()
460 buf += avail; in ps3vram_read()
461 count -= avail; in ps3vram_read()
462 from += avail; in ps3vram_read()
484 unsigned int offset, avail; in ps3vram_write() local
[all …]
/Linux-v5.10/arch/x86/events/
Dprobe.c21 unsigned long avail = 0; in perf_msr_probe() local
53 avail |= BIT(bit); in perf_msr_probe()
56 return avail; in perf_msr_probe()
/Linux-v5.10/include/uapi/linux/
Dvirtio_ring.h157 vring_avail_t *avail; member
190 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num])
198 vr->avail = (struct vring_avail *)((char *)p + num * sizeof(struct vring_desc)); in vring_init()
199 vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + sizeof(__virtio16) in vring_init()
/Linux-v5.10/fs/squashfs/
Dzlib_wrapper.c70 int avail; in zlib_uncompress() local
78 avail = min(length, ((int)bvec->bv_len) - offset); in zlib_uncompress()
80 length -= avail; in zlib_uncompress()
82 stream->avail_in = avail; in zlib_uncompress()
Dlzo_wrapper.c77 int avail = min(bytes, ((int)bvec->bv_len) - offset); in lzo_uncompress() local
80 memcpy(buff, data + offset, avail); in lzo_uncompress()
81 buff += avail; in lzo_uncompress()
82 bytes -= avail; in lzo_uncompress()
/Linux-v5.10/drivers/misc/
Dcs5535-mfgpt.c36 DECLARE_BITMAP(avail, MFGPT_MAX_TIMERS);
172 t = find_first_bit(mfgpt->avail, max); in cs5535_mfgpt_alloc_timer()
177 if (!test_bit(timer_nr, mfgpt->avail)) in cs5535_mfgpt_alloc_timer()
183 __clear_bit(timer_nr, mfgpt->avail); in cs5535_mfgpt_alloc_timer()
193 __set_bit(timer_nr, mfgpt->avail); in cs5535_mfgpt_alloc_timer()
220 __set_bit(timer->nr, timer->chip->avail); in cs5535_mfgpt_free_timer()
307 __set_bit(i, mfgpt->avail); in scan_timers()

1234567891011