Searched refs:counter (Results 26 - 50 of 674) sorted by relevance

1234567891011>>

/linux-master/drivers/counter/
H A DMakefile6 obj-$(CONFIG_COUNTER) += counter.o
7 counter-y := counter-core.o counter-sysfs.o counter-chrdev.o
H A Dinterrupt-cnt.c6 #include <linux/counter.h>
29 struct counter_device *counter = dev_id; local
30 struct interrupt_cnt_priv *priv = counter_priv(counter);
34 counter_push_event(counter, COUNTER_EVENT_CHANGE_OF_STATE, 0);
39 static int interrupt_cnt_enable_read(struct counter_device *counter, argument
42 struct interrupt_cnt_priv *priv = counter_priv(counter);
49 static int interrupt_cnt_enable_write(struct counter_device *counter, argument
52 struct interrupt_cnt_priv *priv = counter_priv(counter);
77 static int interrupt_cnt_action_read(struct counter_device *counter, argument
87 static int interrupt_cnt_read(struct counter_device *counter, argument
97 interrupt_cnt_write(struct counter_device *counter, struct counter_count *count, const u64 val) argument
114 interrupt_cnt_function_read(struct counter_device *counter, struct counter_count *count, enum counter_function *function) argument
123 interrupt_cnt_signal_read(struct counter_device *counter, struct counter_signal *signal, enum counter_signal_level *level) argument
142 interrupt_cnt_watch_validate(struct counter_device *counter, const struct counter_watch *watch) argument
164 struct counter_device *counter; local
[all...]
H A Dti-eqep.c9 #include <linux/counter.h>
85 struct counter_device counter; member in struct:ti_eqep_cnt
90 static struct ti_eqep_cnt *ti_eqep_count_from_counter(struct counter_device *counter) argument
92 return counter_priv(counter);
95 static int ti_eqep_count_read(struct counter_device *counter, argument
98 struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
107 static int ti_eqep_count_write(struct counter_device *counter, argument
110 struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
120 static int ti_eqep_function_read(struct counter_device *counter, argument
124 struct ti_eqep_cnt *priv = ti_eqep_count_from_counter(counter);
147 ti_eqep_function_write(struct counter_device *counter, struct counter_count *count, enum counter_function function) argument
176 ti_eqep_action_read(struct counter_device *counter, struct counter_count *count, struct counter_synapse *synapse, enum counter_synapse_action *action) argument
249 ti_eqep_position_ceiling_read(struct counter_device *counter, struct counter_count *count, u64 *ceiling) argument
263 ti_eqep_position_ceiling_write(struct counter_device *counter, struct counter_count *count, u64 ceiling) argument
277 ti_eqep_position_enable_read(struct counter_device *counter, struct counter_count *count, u8 *enable) argument
290 ti_eqep_position_enable_write(struct counter_device *counter, struct counter_count *count, u8 enable) argument
376 struct counter_device *counter; local
430 struct counter_device *counter = platform_get_drvdata(pdev); local
[all...]
H A Dstm32-timer-cnt.c10 #include <linux/counter.h>
46 static int stm32_count_read(struct counter_device *counter, argument
49 struct stm32_timer_cnt *const priv = counter_priv(counter);
58 static int stm32_count_write(struct counter_device *counter, argument
61 struct stm32_timer_cnt *const priv = counter_priv(counter);
71 static int stm32_count_function_read(struct counter_device *counter, argument
75 struct stm32_timer_cnt *const priv = counter_priv(counter);
98 static int stm32_count_function_write(struct counter_device *counter, argument
102 struct stm32_timer_cnt *const priv = counter_priv(counter);
138 static int stm32_count_direction_read(struct counter_device *counter, argument
152 stm32_count_ceiling_read(struct counter_device *counter, struct counter_count *count, u64 *ceiling) argument
165 stm32_count_ceiling_write(struct counter_device *counter, struct counter_count *count, u64 ceiling) argument
180 stm32_count_enable_read(struct counter_device *counter, struct counter_count *count, u8 *enable) argument
193 stm32_count_enable_write(struct counter_device *counter, struct counter_count *count, u8 enable) argument
231 stm32_action_read(struct counter_device *counter, struct counter_count *count, struct counter_synapse *synapse, enum counter_synapse_action *action) argument
319 struct counter_device *counter; local
[all...]
H A Dftm-quaddec.c15 #include <linux/counter.h>
70 /* Reset hardware counter to CNTIN */
111 * This is enough to disable the counter. No clock has been
117 static int ftm_quaddec_get_prescaler(struct counter_device *counter, argument
120 struct ftm_quaddec *ftm = counter_priv(counter);
130 static int ftm_quaddec_set_prescaler(struct counter_device *counter, argument
133 struct ftm_quaddec *ftm = counter_priv(counter);
141 /* Also resets the counter as it is undefined anyway now */
160 static int ftm_quaddec_count_read(struct counter_device *counter, argument
164 struct ftm_quaddec *const ftm = counter_priv(counter);
174 ftm_quaddec_count_write(struct counter_device *counter, struct counter_count *count, const u64 val) argument
190 ftm_quaddec_count_function_read(struct counter_device *counter, struct counter_count *count, enum counter_function *function) argument
199 ftm_quaddec_action_read(struct counter_device *counter, struct counter_count *count, struct counter_synapse *synapse, enum counter_synapse_action *action) argument
261 struct counter_device *counter; local
[all...]
H A Di8254.c8 #include <linux/counter.h>
57 static int i8254_count_read(struct counter_device *const counter, struct counter_count *const count, argument
60 struct i8254 *const priv = counter_priv(counter);
84 static int i8254_function_read(struct counter_device *const counter, argument
96 static int i8254_action_read(struct counter_device *const counter, argument
101 struct i8254 *const priv = counter_priv(counter);
125 static int i8254_count_ceiling_read(struct counter_device *const counter, argument
128 struct i8254 *const priv = counter_priv(counter);
134 /* Rate Generator decrements 0 by one and the counter "wraps around" */
141 /* Square Wave Mode decrements 0 by two and the counter "wrap
156 i8254_count_mode_read(struct counter_device *const counter, struct counter_count *const count, enum counter_count_mode *const count_mode) argument
187 i8254_count_mode_write(struct counter_device *const counter, struct counter_count *const count, const enum counter_count_mode count_mode) argument
232 i8254_count_floor_read(struct counter_device *const counter, struct counter_count *const count, u64 *const floor) argument
258 i8254_count_preset_read(struct counter_device *const counter, struct counter_count *const count, u64 *const preset) argument
268 i8254_count_preset_write(struct counter_device *const counter, struct counter_count *const count, const u64 preset) argument
406 struct counter_device *counter; local
[all...]
H A Dcounter-sysfs.c6 #include <linux/counter.h>
20 #include "counter-sysfs.h"
109 struct counter_device *const counter = counter_from_dev(dev); local
115 err = a->comp.device_u8_read(counter, &data);
118 err = a->comp.signal_u8_read(counter, a->parent, &data);
121 err = a->comp.count_u8_read(counter, a->parent, &data);
141 struct counter_device *const counter = counter_from_dev(dev); local
156 err = a->comp.device_u8_write(counter, data);
159 err = a->comp.signal_u8_write(counter, a->parent, data);
162 err = a->comp.count_u8_write(counter,
177 struct counter_device *const counter = counter_from_dev(dev); local
242 struct counter_device *const counter = counter_from_dev(dev); local
306 struct counter_device *const counter = counter_from_dev(dev); local
334 struct counter_device *const counter = counter_from_dev(dev); local
366 struct counter_device *const counter = counter_from_dev(dev); local
388 struct counter_device *const counter = counter_from_dev(dev); local
416 struct counter_device *const counter = counter_from_dev(dev); local
448 struct counter_device *const counter = counter_from_dev(dev); local
840 counter_signal_attrs_create(struct counter_device *const counter, struct counter_attribute_group *const cattr_group, struct counter_signal *const signal) argument
866 counter_sysfs_signals_add(struct counter_device *const counter, struct counter_attribute_group *const groups) argument
890 counter_sysfs_synapses_add(struct counter_device *const counter, struct counter_attribute_group *const group, struct counter_count *const count) argument
940 counter_count_attrs_create(struct counter_device *const counter, struct counter_attribute_group *const cattr_group, struct counter_count *const count) argument
975 counter_sysfs_counts_add(struct counter_device *const counter, struct counter_attribute_group *const groups) argument
1006 counter_num_signals_read(struct counter_device *counter, u8 *val) argument
1012 counter_num_counts_read(struct counter_device *counter, u8 *val) argument
1018 counter_events_queue_size_read(struct counter_device *counter, u64 *val) argument
1025 counter_events_queue_size_write(struct counter_device *counter, u64 val) argument
1059 counter_sysfs_attr_add(struct counter_device *const counter, struct counter_attribute_group *cattr_group) argument
1118 counter_sysfs_add(struct counter_device *const counter) argument
[all...]
H A Dti-ecap-capture.c10 #include <linux/counter.h>
86 * @pm_ctx.time_cntr: timestamp counter value
100 static u8 ecap_cnt_capture_get_evmode(struct counter_device *counter) argument
102 struct ecap_cnt_dev *ecap_dev = counter_priv(counter);
105 pm_runtime_get_sync(counter->parent);
107 pm_runtime_put_sync(counter->parent);
112 static void ecap_cnt_capture_set_evmode(struct counter_device *counter, u8 ev_mode) argument
114 struct ecap_cnt_dev *ecap_dev = counter_priv(counter);
116 pm_runtime_get_sync(counter->parent);
118 pm_runtime_put_sync(counter
121 ecap_cnt_capture_enable(struct counter_device *counter) argument
136 ecap_cnt_capture_disable(struct counter_device *counter) argument
149 ecap_cnt_count_get_val(struct counter_device *counter, unsigned int reg) argument
161 ecap_cnt_count_set_val(struct counter_device *counter, unsigned int reg, u32 val) argument
170 ecap_cnt_count_read(struct counter_device *counter, struct counter_count *count, u64 *val) argument
178 ecap_cnt_count_write(struct counter_device *counter, struct counter_count *count, u64 val) argument
189 ecap_cnt_function_read(struct counter_device *counter, struct counter_count *count, enum counter_function *function) argument
198 ecap_cnt_action_read(struct counter_device *counter, struct counter_count *count, struct counter_synapse *synapse, enum counter_synapse_action *action) argument
210 ecap_cnt_watch_validate(struct counter_device *counter, const struct counter_watch *watch) argument
225 ecap_cnt_clk_get_freq(struct counter_device *counter, struct counter_signal *signal, u64 *freq) argument
235 ecap_cnt_pol_read(struct counter_device *counter, struct counter_signal *signal, size_t idx, enum counter_signal_polarity *pol) argument
251 ecap_cnt_pol_write(struct counter_device *counter, struct counter_signal *signal, size_t idx, enum counter_signal_polarity pol) argument
267 ecap_cnt_cap_read(struct counter_device *counter, struct counter_count *count, size_t idx, u64 *cap) argument
276 ecap_cnt_cap_write(struct counter_device *counter, struct counter_count *count, size_t idx, u64 cap) argument
288 ecap_cnt_nb_ovf_read(struct counter_device *counter, struct counter_count *count, u64 *val) argument
298 ecap_cnt_nb_ovf_write(struct counter_device *counter, struct counter_count *count, u64 val) argument
311 ecap_cnt_ceiling_read(struct counter_device *counter, struct counter_count *count, u64 *val) argument
319 ecap_cnt_enable_read(struct counter_device *counter, struct counter_count *count, u8 *enable) argument
329 ecap_cnt_enable_write(struct counter_device *counter, struct counter_count *count, u8 enable) argument
[all...]
/linux-master/arch/arm/include/asm/
H A Datomic.h25 #define arch_atomic_read(v) READ_ONCE((v)->counter)
26 #define arch_atomic_set(v,i) WRITE_ONCE(((v)->counter), (i))
42 prefetchw(&v->counter); \
49 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \
50 : "r" (&v->counter), "Ir" (i) \
60 prefetchw(&v->counter); \
68 : "=&r" (result), "=&r" (tmp), "+Qo" (v->counter) \
69 : "r" (&v->counter), "Ir" (i) \
81 prefetchw(&v->counter); \
89 : "=&r" (result), "=&r" (val), "=&r" (tmp), "+Qo" (v->counter) \
254 s64 counter; member in struct:__anon4
[all...]
/linux-master/arch/x86/include/asm/
H A Datomic.h23 return __READ_ONCE((v)->counter);
28 __WRITE_ONCE(v->counter, i);
34 : "+m" (v->counter)
41 : "+m" (v->counter)
47 return GEN_BINARY_RMWcc(LOCK_PREFIX "subl", v->counter, e, "er", i);
54 : "+m" (v->counter) :: "memory");
61 : "+m" (v->counter) :: "memory");
67 return GEN_UNARY_RMWcc(LOCK_PREFIX "decl", v->counter, e);
73 return GEN_UNARY_RMWcc(LOCK_PREFIX "incl", v->counter, e);
79 return GEN_BINARY_RMWcc(LOCK_PREFIX "addl", v->counter,
[all...]
H A Dlocal.h22 : "+m" (l->a.counter));
28 : "+m" (l->a.counter));
34 : "+m" (l->a.counter)
41 : "+m" (l->a.counter)
56 return GEN_BINARY_RMWcc(_ASM_SUB, l->a.counter, e, "er", i);
69 return GEN_UNARY_RMWcc(_ASM_DEC, l->a.counter, e);
82 return GEN_UNARY_RMWcc(_ASM_INC, l->a.counter, e);
96 return GEN_BINARY_RMWcc(_ASM_ADD, l->a.counter, s, "er", i);
110 : "+r" (i), "+m" (l->a.counter)
125 return cmpxchg_local(&l->a.counter, ol
[all...]
/linux-master/drivers/net/wireguard/selftest/
H A Dcounter.c9 struct noise_replay_counter *counter; local
13 counter = kmalloc(sizeof(*counter), GFP_KERNEL);
14 if (unlikely(!counter)) {
15 pr_err("nonce counter self-test malloc: FAIL\n");
20 memset(counter, 0, sizeof(*counter)); \
21 spin_lock_init(&counter->lock); \
26 if (counter_validate(counter, n) != (v)) { \
27 pr_err("nonce counter sel
[all...]
/linux-master/drivers/staging/media/atomisp/pci/hive_isp_css_include/host/
H A Dtimed_ctrl_public.h38 hrt_data counter,
46 hrt_data counter,
55 hrt_data counter,
/linux-master/drivers/net/ethernet/marvell/prestera/
H A Dprestera_counter.h21 int prestera_counter_get(struct prestera_counter *counter, u32 client,
24 void prestera_counter_put(struct prestera_counter *counter,
26 int prestera_counter_stats_get(struct prestera_counter *counter,
/linux-master/arch/powerpc/include/asm/
H A Datomic.h32 __asm__ __volatile__("lwz %0,0(%1)" : "=r"(t) : "b"(&v->counter));
34 __asm__ __volatile__("lwz%U1%X1 %0,%1" : "=r"(t) : "m<>"(v->counter));
43 __asm__ __volatile__("stw %1,0(%2)" : "=m"(v->counter) : "r"(i), "b"(&v->counter));
45 __asm__ __volatile__("stw%U0%X0 %1,%0" : "=m<>"(v->counter) : "r"(i));
58 : "=&r" (t), "+m" (v->counter) \
59 : "r"#sign (a), "r" (&v->counter) \
73 : "=&r" (t), "+m" (v->counter) \
74 : "r"#sign (a), "r" (&v->counter) \
90 : "=&r" (res), "=&r" (t), "+m" (v->counter) \
[all...]
/linux-master/arch/microblaze/include/asm/
H A Dmodule.h26 typedef struct { volatile int counter; } module_t; member in struct:__anon21
/linux-master/net/dccp/ccids/lib/
H A Dloss_interval.c21 /* the `counter' index always points at the next entry to be populated */
24 return lh->counter ? lh->ring[LIH_INDEX(lh->counter - 1)] : NULL;
30 BUG_ON(i >= lh->counter);
31 return lh->ring[LIH_INDEX(lh->counter - i - 1)]->li_length;
39 if (lh->ring[LIH_INDEX(lh->counter)] == NULL)
40 lh->ring[LIH_INDEX(lh->counter)] = kmem_cache_alloc(tfrc_lh_slab,
42 return lh->ring[LIH_INDEX(lh->counter)];
50 for (lh->counter = 0; lh->counter < LIH_SIZ
[all...]
/linux-master/include/linux/
H A Dcounter.h17 #include <uapi/linux/counter.h>
157 int (*action_read)(struct counter_device *counter,
161 int (*device_u8_read)(struct counter_device *counter, u8 *val);
162 int (*count_u8_read)(struct counter_device *counter,
164 int (*signal_u8_read)(struct counter_device *counter,
166 int (*device_u32_read)(struct counter_device *counter,
168 int (*count_u32_read)(struct counter_device *counter,
170 int (*signal_u32_read)(struct counter_device *counter,
172 int (*device_u64_read)(struct counter_device *counter,
174 int (*count_u64_read)(struct counter_device *counter,
[all...]
/linux-master/arch/alpha/include/asm/
H A Dlocal.h33 :"=&r" (temp), "=m" (l->a.counter), "=&r" (result)
34 :"Ir" (i), "m" (l->a.counter) : "memory");
50 :"=&r" (temp), "=m" (l->a.counter), "=&r" (result)
51 :"Ir" (i), "m" (l->a.counter) : "memory");
57 return cmpxchg_local(&l->a.counter, old, new);
62 return try_cmpxchg_local(&l->a.counter, (s64 *)old, new);
65 #define local_xchg(l, n) (xchg_local(&((l)->a.counter), (n)))
104 #define __local_inc(l) ((l)->a.counter++)
105 #define __local_dec(l) ((l)->a.counter++)
106 #define __local_add(i,l) ((l)->a.counter
[all...]
/linux-master/tools/testing/selftests/bpf/progs/
H A Dbpf_iter_bpf_map.c23 BPF_SEQ_PRINTF(seq, "%8u %8ld %8ld %10lu\n", map->id, map->refcnt.counter,
24 map->usercnt.counter,
/linux-master/arch/sh/include/asm/
H A Datomic.h22 #define arch_atomic_read(v) READ_ONCE((v)->counter)
23 #define arch_atomic_set(v,i) WRITE_ONCE((v)->counter, (i))
/linux-master/drivers/staging/media/atomisp/pci/hive_isp_css_common/host/
H A Dtimed_ctrl.c28 hrt_data counter,
37 timed_ctrl_reg_store(ID, _HRT_TIMED_CONTROLLER_CMD_REG_IDX, counter);
49 hrt_data counter,
57 timed_ctrl_snd_commnd(ID, mask, condition, counter,
65 hrt_data counter,
73 timed_ctrl_snd_commnd(ID, mask, condition, counter,
24 timed_ctrl_snd_commnd( const timed_ctrl_ID_t ID, hrt_data mask, hrt_data condition, hrt_data counter, hrt_address addr, hrt_data value) argument
45 timed_ctrl_snd_sp_commnd( const timed_ctrl_ID_t ID, hrt_data mask, hrt_data condition, hrt_data counter, const sp_ID_t SP_ID, hrt_address offset, hrt_data value) argument
61 timed_ctrl_snd_gpio_commnd( const timed_ctrl_ID_t ID, hrt_data mask, hrt_data condition, hrt_data counter, const gpio_ID_t GPIO_ID, hrt_address offset, hrt_data value) argument
/linux-master/arch/mips/include/asm/
H A Dlocal.h47 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
48 : "Ir" (i), "m" (l->a.counter)
54 result = l->a.counter;
56 l->a.counter = result;
81 : "=&r" (result), "=&r" (temp), "=m" (l->a.counter)
82 : "Ir" (i), "m" (l->a.counter)
88 result = l->a.counter;
90 l->a.counter = result;
99 return cmpxchg_local(&l->a.counter, old, new);
104 return try_cmpxchg_local(&l->a.counter,
[all...]
/linux-master/drivers/iommu/intel/
H A Dperf.c48 lstat[type].counter[COUNTS_MIN] = UINT_MAX;
81 lstat[type].counter[COUNTS_10e2]++;
83 lstat[type].counter[COUNTS_10e3]++;
85 lstat[type].counter[COUNTS_10e4]++;
87 lstat[type].counter[COUNTS_10e5]++;
89 lstat[type].counter[COUNTS_10e6]++;
91 lstat[type].counter[COUNTS_10e7]++;
93 lstat[type].counter[COUNTS_10e8_plus]++;
95 min = lstat[type].counter[COUNTS_MIN];
96 max = lstat[type].counter[COUNTS_MA
[all...]
/linux-master/arch/s390/include/asm/
H A Datomic.h32 return __atomic_add_barrier(i, &v->counter) + i;
38 return __atomic_add_barrier(i, &v->counter);
44 __atomic_add(i, &v->counter);
55 __atomic_##op(i, &v->counter); \
59 return __atomic_##op##_barrier(i, &v->counter); \
75 #define arch_atomic_xchg(v, new) (arch_xchg(&((v)->counter), new))
79 return __atomic_cmpxchg(&v->counter, old, new);
99 return __atomic64_add_barrier(i, (long *)&v->counter) + i;
105 return __atomic64_add_barrier(i, (long *)&v->counter);
111 __atomic64_add(i, (long *)&v->counter);
[all...]

Completed in 254 milliseconds

1234567891011>>