Home
last modified time | relevance | path

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

12345678910>>...12

/linux/drivers/iio/potentiometer/
H A 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 …]
H A 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()
H A Dds1803.c36 int avail[3]; member
103 .avail = { 0, 1, 255 },
111 .avail = { 0, 1, 255 },
119 .avail = { 0, 1, 255 },
127 .avail = { 0, 1, 127 },
152 *val2 = data->cfg->avail[2]; /* Max wiper position */ in ds1803_read_raw()
165 int max_pos = data->cfg->avail[2]; in ds1803_write_raw()
191 *vals = data->cfg->avail; in ds1803_read_avail()
192 *length = ARRAY_SIZE(data->cfg->avail); in ds1803_read_avail()
/linux/arch/x86/kernel/
H A Dresource.c28 static void remove_e820_regions(struct resource *avail) in remove_e820_regions() argument
33 struct resource orig = *avail; in remove_e820_regions()
43 resource_clip(avail, e820_start, e820_end); in remove_e820_regions()
44 if (orig.start != avail->start || orig.end != avail->end) { in remove_e820_regions()
47 if (avail->end > avail->start) in remove_e820_regions()
54 &avail->start, &avail->end); in remove_e820_regions()
55 orig = *avail; in remove_e820_regions()
60 void arch_remove_reservations(struct resource *avail) in arch_remove_reservations() argument
67 if (avail->flags & IORESOURCE_MEM) { in arch_remove_reservations()
68 resource_clip(avail, BIOS_ROM_BASE, BIOS_ROM_END); in arch_remove_reservations()
[all …]
/linux/drivers/xen/xenbus/
H A Dxenbus_comms.c114 unsigned int avail; in xb_write() local
129 dst = get_output_chunk(cons, prod, intf->req, &avail); in xb_write()
130 if (avail == 0) in xb_write()
132 if (avail > len) in xb_write()
133 avail = len; in xb_write()
135 memcpy(dst, data, avail); in xb_write()
136 data += avail; in xb_write()
137 len -= avail; in xb_write()
138 bytes += avail; in xb_write()
142 intf->req_prod += avail; in xb_write()
[all …]
/linux/tools/virtio/ringtest/
H A 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/sound/soc/sof/
H A Dipc4-mtrace.c185 u32 avail; in sof_ipc4_mtrace_dfs_read() local
191 if (!count || count < sizeof(avail)) in sof_ipc4_mtrace_dfs_read()
197 avail = 0; in sof_ipc4_mtrace_dfs_read()
198 if (copy_to_user(buffer, &avail, sizeof(avail))) in sof_ipc4_mtrace_dfs_read()
216 avail = write_ptr - read_ptr; in sof_ipc4_mtrace_dfs_read()
218 avail = log_buffer_size - read_ptr + write_ptr; in sof_ipc4_mtrace_dfs_read()
220 if (!avail) in sof_ipc4_mtrace_dfs_read()
223 if (avail > log_buffer_size) in sof_ipc4_mtrace_dfs_read()
224 avail = log_buffer_size; in sof_ipc4_mtrace_dfs_read()
227 if (avail > count - sizeof(avail)) in sof_ipc4_mtrace_dfs_read()
[all …]
/linux/net/rds/
H A 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()
H A 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/sound/core/
H A Drawmidi.c57 u32 avail; /* available bytes */ member
69 size_t avail; /* available bytes */ member
103 return runtime->avail >= runtime->avail_min; in __snd_rawmidi_ready()
117 return runtime->avail >= runtime->avail_min && in snd_rawmidi_ready_append()
118 (!substream->append || runtime->avail >= count); in snd_rawmidi_ready_append()
172 runtime->avail = 0; in snd_rawmidi_runtime_create()
174 runtime->avail = runtime->buffer_size; in snd_rawmidi_runtime_create()
230 runtime->avail = is_input ? 0 : runtime->buffer_size; in __reset_runtime_ptrs()
264 (runtime->avail >= runtime->buffer_size), in snd_rawmidi_drain_output()
270 if (runtime->avail < runtim in snd_rawmidi_drain_output()
1701 unsigned long buffer_size, avail, xruns; snd_rawmidi_proc_info_read() local
[all...]
H A Dcompress_offload.c195 struct snd_compr_avail *avail) in snd_compr_calc_avail() argument
197 memset(avail, 0, sizeof(*avail)); in snd_compr_calc_avail()
198 snd_compr_update_tstamp(stream, &avail->tstamp); in snd_compr_calc_avail()
221 avail->avail = stream->runtime->total_bytes_available - in snd_compr_calc_avail()
224 avail->avail = stream->runtime->buffer_size - avail->avail; in snd_compr_calc_avail()
226 pr_debug("ret avail as %lld\n", avail->avail); in snd_compr_calc_avail()
227 return avail->avail; in snd_compr_calc_avail()
232 struct snd_compr_avail avail; in snd_compr_get_avail() local
234 return snd_compr_calc_avail(stream, &avail); in snd_compr_get_avail()
241 size_t avail; in snd_compr_ioctl_avail() local
[all …]
/linux/drivers/infiniband/hw/qib/
H A Dqib_fs.c148 size_t avail; in dev_counters_read() local
151 avail = dd->f_read_cntrs(dd, *ppos, NULL, &counters); in dev_counters_read()
152 return simple_read_from_buffer(buf, count, ppos, counters, avail); in dev_counters_read()
160 size_t avail; in dev_names_read() local
163 avail = dd->f_read_cntrs(dd, *ppos, &names, NULL); in dev_names_read()
164 return simple_read_from_buffer(buf, count, ppos, names, avail); in dev_names_read()
182 size_t avail; in portnames_read() local
185 avail = dd->f_read_portcntrs(dd, *ppos, 0, &names, NULL); in portnames_read()
186 return simple_read_from_buffer(buf, count, ppos, names, avail); in portnames_read()
194 size_t avail; in portcntrs_1_read() local
[all …]
/linux/arch/mips/cavium-octeon/crypto/
H A Docteon-md5.c85 const u32 avail = sizeof(mctx->block) - (mctx->byte_count & 0x3f); in octeon_md5_update() local
91 if (avail > len) { in octeon_md5_update()
92 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), in octeon_md5_update()
97 memcpy((char *)mctx->block + (sizeof(mctx->block) - avail), data, in octeon_md5_update()
98 avail); in octeon_md5_update()
104 data += avail; in octeon_md5_update()
105 len -= avail; in octeon_md5_update()
/linux/drivers/crypto/marvell/octeontx2/
H A Dotx2_cptpf_ucode.c510 struct otx2_cpt_engs_available *avail, in update_engines_avail_count() argument
515 avail->se_cnt += val; in update_engines_avail_count()
519 avail->ie_cnt += val; in update_engines_avail_count()
523 avail->ae_cnt += val; in update_engines_avail_count()
534 struct otx2_cpt_engs_available *avail, in update_engines_offset() argument
543 engs->offset = avail->max_se_cnt; in update_engines_offset()
547 engs->offset = avail->max_se_cnt + avail->max_ie_cnt; in update_engines_offset()
567 ret = update_engines_avail_count(dev, &grp->g->avail, in release_engines()
603 ret = update_engines_offset(dev, &grp->g->avail, engs); in do_reserve_engines()
608 ret = update_engines_avail_count(dev, &grp->g->avail, engs, in do_reserve_engines()
[all …]
/linux/drivers/net/ethernet/mellanox/mlx5/core/
H A 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/drivers/net/ethernet/chelsio/inline_crypto/chtls/
H A Dchtls_io.c1349 unsigned long avail; in chtls_pt_recvmsg() local
1455 avail = skb->len - offset; in chtls_pt_recvmsg()
1456 if (len < avail) in chtls_pt_recvmsg()
1457 avail = len; in chtls_pt_recvmsg()
1462 if (urg_offset < avail) { in chtls_pt_recvmsg()
1464 avail = urg_offset; in chtls_pt_recvmsg()
1469 avail--; in chtls_pt_recvmsg()
1470 if (!avail) in chtls_pt_recvmsg()
1493 if (skb_copy_datagram_msg(skb, offset, msg, avail)) { in chtls_pt_recvmsg()
1500 copied += avail; in chtls_pt_recvmsg()
[all …]
/linux/drivers/pci/msi/
H A Dlegacy.c54 int avail = 0; in pci_msi_setup_check_result() local
61 avail++; in pci_msi_setup_check_result()
63 return avail ? avail : ret; in pci_msi_setup_check_result()
/linux/drivers/block/
H A Dps3vram.c442 unsigned int offset, avail; in ps3vram_read() local
446 avail = priv->cache.page_size - offset; in ps3vram_read()
453 (unsigned int)from, cached, offset, avail, count); in ps3vram_read()
455 if (avail > count) in ps3vram_read()
456 avail = count; in ps3vram_read()
457 memcpy(buf, priv->xdr_buf + cached, avail); in ps3vram_read()
459 buf += avail; in ps3vram_read()
460 count -= avail; in ps3vram_read()
461 from += avail; in ps3vram_read()
483 unsigned int offset, avail; in ps3vram_write() local
[all …]
/linux/drivers/rpmsg/
H A Dqcom_glink_smem.c134 u32 avail; in glink_smem_tx_avail() local
140 avail = pipe->native.length - head + tail; in glink_smem_tx_avail()
142 avail = tail - head; in glink_smem_tx_avail()
144 if (avail < (FIFO_FULL_RESERVE + TX_BLOCKED_CMD_RESERVE)) in glink_smem_tx_avail()
145 avail = 0; in glink_smem_tx_avail()
147 avail -= FIFO_FULL_RESERVE + TX_BLOCKED_CMD_RESERVE; in glink_smem_tx_avail()
149 return avail; in glink_smem_tx_avail()
326 rx_pipe->native.avail = glink_smem_rx_avail; in qcom_glink_smem_register()
331 tx_pipe->native.avail = glink_smem_tx_avail; in qcom_glink_smem_register()
/linux/arch/powerpc/crypto/
H A 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()
H A Dsha1-spe-glue.c64 const unsigned int avail = 64 - offset; in ppc_spe_sha1_update() local
68 if (avail > len) { in ppc_spe_sha1_update()
77 memcpy((char *)sctx->buffer + offset, src, avail); in ppc_spe_sha1_update()
83 len -= avail; in ppc_spe_sha1_update()
84 src += avail; in ppc_spe_sha1_update()
/linux/drivers/gpu/drm/i915/gvt/
H A Daperture_gm.c246 unsigned long request, avail, max, taken; in alloc_resource() local
257 avail = max - taken; in alloc_resource()
260 if (request > avail) in alloc_resource()
268 avail = max - taken; in alloc_resource()
271 if (request > avail) in alloc_resource()
279 avail = max - taken; in alloc_resource()
282 if (request > avail) in alloc_resource()
295 BYTES_TO_MB(request), BYTES_TO_MB(avail), in alloc_resource()
/linux/drivers/misc/
H A 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()
/linux/include/linux/
H A Dfortify-string.h20 # define fortify_panic(func, write, avail, size, retfail) \ argument
21 __fortify_panic(FORTIFY_REASON(func, write), avail, size)
55 void __fortify_report(const u8 reason, const size_t avail, const size_t size);
56 void __fortify_panic(const u8 reason, const size_t avail, const size_t size) __cold __noreturn;
59 void __read_overflow2_field(size_t avail, size_t wanted) __compiletime_warning("detected read beyon…
61 void __write_overflow_field(size_t avail, size_t wanted) __compiletime_warning("detected write beyo…
333 extern size_t __real_strlcat(char *p, const char *q, size_t avail) __RENAME(strlcat);
359 size_t strlcat(char * const POS p, const char * const POS q, size_t avail) in strlcat() argument
368 return __real_strlcat(p, q, avail); in strlcat()
370 p_len = strnlen(p, avail); in strlcat()
[all …]
/linux/include/uapi/linux/
H A Dvirtio_ring.h163 vring_avail_t *avail; member
196 #define vring_used_event(vr) ((vr)->avail->ring[(vr)->num])
204 vr->avail = (struct vring_avail *)((char *)p + num * sizeof(struct vring_desc)); in vring_init()
205 vr->used = (void *)(((uintptr_t)&vr->avail->ring[num] + sizeof(__virtio16) in vring_init()

12345678910>>...12