Home
last modified time | relevance | path

Searched refs:gts (Results 1 – 17 of 17) sorted by relevance

/linux-6.12.1/drivers/iio/
Dindustrialio-gts-helper.c126 int iio_gts_total_gain_to_scale(struct iio_gts *gts, int total_gain, in iio_gts_total_gain_to_scale() argument
131 tmp = gts->max_scale; in iio_gts_total_gain_to_scale()
145 static void iio_gts_purge_avail_scale_table(struct iio_gts *gts) in iio_gts_purge_avail_scale_table() argument
149 if (gts->per_time_avail_scale_tables) { in iio_gts_purge_avail_scale_table()
150 for (i = 0; i < gts->num_itime; i++) in iio_gts_purge_avail_scale_table()
151 kfree(gts->per_time_avail_scale_tables[i]); in iio_gts_purge_avail_scale_table()
153 kfree(gts->per_time_avail_scale_tables); in iio_gts_purge_avail_scale_table()
154 gts->per_time_avail_scale_tables = NULL; in iio_gts_purge_avail_scale_table()
157 kfree(gts->avail_all_scales_table); in iio_gts_purge_avail_scale_table()
158 gts->avail_all_scales_table = NULL; in iio_gts_purge_avail_scale_table()
[all …]
DMakefile13 obj-$(CONFIG_IIO_GTS_HELPER) += industrialio-gts-helper.o
/linux-6.12.1/drivers/misc/sgi-gru/
Dgrumain.c183 struct gru_thread_state *gts) in reserve_gru_resources() argument
186 gts->ts_cbr_map = in reserve_gru_resources()
187 gru_reserve_cb_resources(gru, gts->ts_cbr_au_count, in reserve_gru_resources()
188 gts->ts_cbr_idx); in reserve_gru_resources()
189 gts->ts_dsr_map = in reserve_gru_resources()
190 gru_reserve_ds_resources(gru, gts->ts_dsr_au_count, NULL); in reserve_gru_resources()
194 struct gru_thread_state *gts) in free_gru_resources() argument
197 gru->gs_cbr_map |= gts->ts_cbr_map; in free_gru_resources()
198 gru->gs_dsr_map |= gts->ts_dsr_map; in free_gru_resources()
221 struct gru_thread_state *gts) in gru_load_mm_tracker() argument
[all …]
Dgrufault.c70 struct gru_thread_state *gts = NULL; in gru_find_lock_gts() local
75 gts = gru_find_thread_state(vma, TSID(vaddr, vma)); in gru_find_lock_gts()
76 if (gts) in gru_find_lock_gts()
77 mutex_lock(&gts->ts_ctxlock); in gru_find_lock_gts()
80 return gts; in gru_find_lock_gts()
87 struct gru_thread_state *gts = ERR_PTR(-EINVAL); in gru_alloc_locked_gts() local
94 gts = gru_alloc_thread_state(vma, TSID(vaddr, vma)); in gru_alloc_locked_gts()
95 if (IS_ERR(gts)) in gru_alloc_locked_gts()
97 mutex_lock(&gts->ts_ctxlock); in gru_alloc_locked_gts()
99 return gts; in gru_alloc_locked_gts()
[all …]
Dgrutables.h386 #define UGRUADDR(gts) ((gts)->ts_vma->vm_start + \ argument
387 (gts)->ts_tsid * GRU_GSEG_PAGESIZE)
494 #define thread_cbr_number(gts, n) ((gts)->ts_cbr_idx[(n) / GRU_CBR_AU_SIZE] \ argument
519 #define for_each_gts_on_gru(gts, gru, ctxnum) \ argument
521 if (((gts) = (gru)->gs_gts[ctxnum]))
588 static inline int is_kernel_context(struct gru_thread_state *gts) in is_kernel_context() argument
590 return !gts->ts_mm; in is_kernel_context()
616 extern struct gru_state *gru_assign_gru_context(struct gru_thread_state *gts);
617 extern void gru_load_context(struct gru_thread_state *gts);
618 extern void gru_steal_context(struct gru_thread_state *gts);
[all …]
Dgrukdump.c114 struct gru_thread_state *gts; in gru_dump_context() local
140 gts = gru->gs_gts[ctxnum]; in gru_dump_context()
141 if (gts && gts->ts_vma) { in gru_dump_context()
142 hdr.pid = gts->ts_tgid_owner; in gru_dump_context()
143 hdr.vaddr = gts->ts_vma->vm_start; in gru_dump_context()
Dgrufile.c64 struct gru_thread_state *gts; in gru_vma_close() local
75 gts = in gru_vma_close()
77 list_del(&gts->ts_next); in gru_vma_close()
78 mutex_lock(&gts->ts_ctxlock); in gru_vma_close()
79 if (gts->ts_gru) in gru_vma_close()
80 gru_unload_context(gts, 0); in gru_vma_close()
81 mutex_unlock(&gts->ts_ctxlock); in gru_vma_close()
82 gts_drop(gts); in gru_vma_close()
/linux-6.12.1/include/linux/iio/
Diio-gts-helper.h86 iio_gts_find_itime_by_time(struct iio_gts *gts, int time) in iio_gts_find_itime_by_time() argument
90 if (!gts->num_itime) in iio_gts_find_itime_by_time()
93 for (i = 0; i < gts->num_itime; i++) in iio_gts_find_itime_by_time()
94 if (gts->itime_table[i].time_us == time) in iio_gts_find_itime_by_time()
95 return &gts->itime_table[i]; in iio_gts_find_itime_by_time()
101 iio_gts_find_itime_by_sel(struct iio_gts *gts, int sel) in iio_gts_find_itime_by_sel() argument
105 for (i = 0; i < gts->num_itime; i++) in iio_gts_find_itime_by_sel()
106 if (gts->itime_table[i].sel == sel) in iio_gts_find_itime_by_sel()
107 return &gts->itime_table[i]; in iio_gts_find_itime_by_sel()
115 struct iio_gts *gts);
[all …]
/linux-6.12.1/drivers/iio/test/
Diio-test-gts.c71 static struct iio_gts gts; variable
100 struct iio_gts *gts, const struct iio_gain_sel_pair *g_table, in __test_init_iio_gain_scale() argument
113 i_table, num_i, gts); in __test_init_iio_gain_scale()
121 #define test_init_iio_gain_scale(test, gts) \ argument
122 __test_init_iio_gain_scale(test, gts, gts_test_gains, \
158 ARRAY_SIZE(itimes_neg), &gts); in test_init_iio_gts_invalid()
164 ARRAY_SIZE(gts_test_itimes), &gts); in test_init_iio_gts_invalid()
170 ARRAY_SIZE(itimes_overflow), &gts); in test_init_iio_gts_invalid()
179 dev = test_init_iio_gain_scale(test, &gts); in test_iio_gts_find_gain_for_scale_using_time()
183 ret = iio_gts_find_gain_sel_for_scale_using_time(&gts, TEST_TSEL_100, in test_iio_gts_find_gain_for_scale_using_time()
[all …]
DMakefile9 obj-$(CONFIG_IIO_GTS_KUNIT_TEST) += iio-test-gts.o
/linux-6.12.1/drivers/iio/light/
Dbh1745.c129 struct iio_gts gts; member
263 gain = iio_gts_find_gain_by_sel(&data->gts, gain_sel); in bh1745_get_scale()
270 int_time = iio_gts_find_itime_by_sel(&data->gts, int_time_sel); in bh1745_get_scale()
272 return iio_gts_get_scale(&data->gts, gain, int_time->time_us, val, in bh1745_get_scale()
289 ret = iio_gts_find_gain_sel_for_scale_using_time(&data->gts, in bh1745_set_scale()
293 for (int i = 0; i < data->gts.num_itime; i++) { in bh1745_set_scale()
294 new_int_time_sel = data->gts.itime_table[i].sel; in bh1745_set_scale()
299 ret = iio_gts_find_gain_sel_for_scale_using_time(&data->gts, in bh1745_set_scale()
335 int_time = iio_gts_find_int_time_by_sel(&data->gts, int_time_sel); in bh1745_get_int_time()
353 if (!iio_gts_valid_time(&data->gts, req_int_time)) { in bh1745_set_int_time()
[all …]
Drohm-bu27008.c386 struct iio_gts gts; member
777 static int bu27008_get_gain(struct bu27008_data *data, struct iio_gts *gts, int *gain) in bu27008_get_gain() argument
785 ret = iio_gts_find_gain_by_sel(gts, sel); in bu27008_get_gain()
800 ret = iio_gts_find_sel_by_gain(&data->gts, gain); in bu27008_set_gain()
839 return iio_gts_find_int_time_by_sel(&data->gts, sel); in bu27008_get_int_time_us()
845 struct iio_gts *gts; in _bu27008_get_scale() local
849 gts = &data->gts_ir; in _bu27008_get_scale()
851 gts = &data->gts; in _bu27008_get_scale()
853 ret = bu27008_get_gain(data, gts, &gain); in _bu27008_get_scale()
861 return iio_gts_get_scale(gts, gain, ret, val, val2); in _bu27008_get_scale()
[all …]
Dapds9306.c176 struct iio_gts gts; member
490 intg_time = iio_gts_find_int_time_by_sel(&data->gts, intg_time_idx); in apds9306_read_data()
555 ret = iio_gts_find_int_time_by_sel(&data->gts, intg_time_idx); in apds9306_intg_time_get()
572 if (!iio_gts_valid_time(&data->gts, val2)) { in apds9306_intg_time_set()
585 intg_old = iio_gts_find_int_time_by_sel(&data->gts, intg_time_idx); in apds9306_intg_time_set()
592 gain_old = iio_gts_find_gain_by_sel(&data->gts, gain_idx); in apds9306_intg_time_set()
596 iio_gts_find_new_gain_by_old_gain_time(&data->gts, gain_old, intg_old, in apds9306_intg_time_set()
604 gain_new_closest = iio_find_closest_gain_low(&data->gts, gain_new, &ok); in apds9306_intg_time_set()
606 gain_new_closest = iio_gts_get_min_gain(&data->gts); in apds9306_intg_time_set()
613 ret = iio_gts_find_sel_by_int_time(&data->gts, val2); in apds9306_intg_time_set()
[all …]
Drohm-bu27034.c202 struct iio_gts gts; member
285 ret = iio_gts_find_gain_by_sel(&data->gts, sel); in bu27034_get_gain()
306 return iio_gts_find_int_time_by_sel(&data->gts, in bu27034_get_int_time()
323 return iio_gts_get_scale(&data->gts, gain, ret, val, val2); in _bu27034_get_scale()
365 ret = iio_gts_find_sel_by_gain(&data->gts, gain); in bu27034_set_gain()
377 ret = iio_gts_find_sel_by_int_time(&data->gts, time); in bu27034_set_int_time()
405 if (!iio_gts_valid_time(&data->gts, time_us)) { in bu27034_try_set_int_time()
423 ret = iio_gts_find_new_gain_by_old_gain_time(&data->gts, in bu27034_try_set_int_time()
445 ret = iio_find_closest_gain_low(&data->gts, in bu27034_try_set_int_time()
456 ret = iio_gts_get_min_gain(&data->gts); in bu27034_try_set_int_time()
[all …]
/linux-6.12.1/drivers/infiniband/hw/cxgb4/
Dt4.h681 void __iomem *gts; member
709 writel(val | INGRESSQID_V(cq->cqid), cq->gts); in write_gts()
Dcq.c160 cq->gts = rdev->lldi.gts_reg; in create_cq()
/linux-6.12.1/
DMAINTAINERS11016 F: drivers/iio/industrialio-gts-helper.c
11017 F: include/linux/iio/iio-gts-helper.h
11018 F: drivers/iio/test/iio-test-gts.c