Home
last modified time | relevance | path

Searched refs:counter_device (Results 1 – 18 of 18) sorted by relevance

/linux/include/linux/
H A Dcounter.h20 struct counter_device;
158 int (*action_read)(struct counter_device *counter,
162 int (*device_u8_read)(struct counter_device *counter, u8 *val);
163 int (*count_u8_read)(struct counter_device *counter,
165 int (*signal_u8_read)(struct counter_device *counter,
167 int (*device_u32_read)(struct counter_device *counter,
169 int (*count_u32_read)(struct counter_device *counter,
171 int (*signal_u32_read)(struct counter_device *counter,
173 int (*device_u64_read)(struct counter_device *counter,
175 int (*count_u64_read)(struct counter_device *counter,
[all …]
/linux/drivers/counter/
H A Dti-ecap-capture.c100 static u8 ecap_cnt_capture_get_evmode(struct counter_device *counter) in ecap_cnt_capture_get_evmode()
112 static void ecap_cnt_capture_set_evmode(struct counter_device *counter, u8 ev_mode) in ecap_cnt_capture_set_evmode()
121 static void ecap_cnt_capture_enable(struct counter_device *counter) in ecap_cnt_capture_enable()
136 static void ecap_cnt_capture_disable(struct counter_device *counter) in ecap_cnt_capture_disable()
149 static u32 ecap_cnt_count_get_val(struct counter_device *counter, unsigned int reg) in ecap_cnt_count_get_val()
161 static void ecap_cnt_count_set_val(struct counter_device *counter, unsigned int reg, u32 val) in ecap_cnt_count_set_val()
170 static int ecap_cnt_count_read(struct counter_device *counter, in ecap_cnt_count_read()
178 static int ecap_cnt_count_write(struct counter_device *counter, in ecap_cnt_count_write()
189 static int ecap_cnt_function_read(struct counter_device *counter, in ecap_cnt_function_read()
198 static int ecap_cnt_action_read(struct counter_device *counter, in ecap_cnt_action_read()
[all …]
H A Dcounter-core.c31 struct counter_device counter;
43 struct counter_device *const counter = in counter_device_release()
44 container_of(dev, struct counter_device, dev); in counter_device_release()
70 void *counter_priv(const struct counter_device *const counter) in counter_priv()
88 struct counter_device *counter_alloc(size_t sizeof_priv) in counter_alloc()
91 struct counter_device *counter; in counter_alloc()
139 void counter_put(struct counter_device *counter) in counter_put()
153 int counter_add(struct counter_device *counter) in counter_add()
178 void counter_unregister(struct counter_device *const counter) in counter_unregister()
212 struct counter_device *devm_counter_alloc(struct device *dev, size_t sizeof_priv) in devm_counter_alloc()
[all …]
H A D104-quad-8.c215 static int quad8_signal_read(struct counter_device *counter, in quad8_signal_read()
235 static int quad8_count_read(struct counter_device *counter, in quad8_count_read()
283 static int quad8_count_write(struct counter_device *counter, in quad8_count_write()
345 static int quad8_function_read(struct counter_device *counter, in quad8_function_read()
362 static int quad8_function_write(struct counter_device *counter, in quad8_function_write()
410 static int quad8_direction_read(struct counter_device *counter, in quad8_direction_read()
439 static int quad8_action_read(struct counter_device *counter, in quad8_action_read()
504 static int quad8_events_configure(struct counter_device *counter) in quad8_events_configure()
557 static int quad8_watch_validate(struct counter_device *counter, in quad8_watch_validate()
596 static int quad8_index_polarity_get(struct counter_device *counter, in quad8_index_polarity_get()
[all …]
H A Dinterrupt-cnt.c32 struct counter_device *counter = dev_id; in interrupt_cnt_isr()
42 static int interrupt_cnt_enable_read(struct counter_device *counter, in interrupt_cnt_enable_read()
54 static int interrupt_cnt_enable_write(struct counter_device *counter, in interrupt_cnt_enable_write()
84 static int interrupt_cnt_action_read(struct counter_device *counter, in interrupt_cnt_action_read()
94 static int interrupt_cnt_read(struct counter_device *counter, in interrupt_cnt_read()
104 static int interrupt_cnt_write(struct counter_device *counter, in interrupt_cnt_write()
121 static int interrupt_cnt_function_read(struct counter_device *counter, in interrupt_cnt_function_read()
130 static int interrupt_cnt_signal_read(struct counter_device *counter, in interrupt_cnt_signal_read()
149 static int interrupt_cnt_watch_validate(struct counter_device *counter, in interrupt_cnt_watch_validate()
171 struct counter_device *counter; in interrupt_cnt_probe()
H A Drz-mtu3-cnt.c97 static inline struct rz_mtu3_channel *rz_mtu3_get_ch(struct counter_device *counter, int id) in rz_mtu3_get_ch()
105 static bool rz_mtu3_is_counter_invalid(struct counter_device *counter, int id) in rz_mtu3_is_counter_invalid()
123 static int rz_mtu3_lock_if_counter_is_valid(struct counter_device *counter, in rz_mtu3_lock_if_counter_is_valid()
157 static int rz_mtu3_count_read(struct counter_device *counter, in rz_mtu3_count_read()
179 static int rz_mtu3_count_write(struct counter_device *counter, in rz_mtu3_count_write()
202 struct counter_device *const counter, in rz_mtu3_count_function_read_helper()
231 static int rz_mtu3_count_function_read(struct counter_device *counter, in rz_mtu3_count_function_read()
249 static int rz_mtu3_count_function_write(struct counter_device *counter, in rz_mtu3_count_function_write()
290 static int rz_mtu3_count_direction_read(struct counter_device *counter, in rz_mtu3_count_direction_read()
314 static int rz_mtu3_count_ceiling_read(struct counter_device *counter, in rz_mtu3_count_ceiling_read()
[all …]
H A Dti-eqep.c138 static int ti_eqep_count_read(struct counter_device *counter, in ti_eqep_count_read()
150 static int ti_eqep_count_write(struct counter_device *counter, in ti_eqep_count_write()
163 static int ti_eqep_function_read(struct counter_device *counter, in ti_eqep_function_read()
190 static int ti_eqep_function_write(struct counter_device *counter, in ti_eqep_function_write()
219 static int ti_eqep_action_read(struct counter_device *counter, in ti_eqep_action_read()
284 static int ti_eqep_events_configure(struct counter_device *counter) in ti_eqep_events_configure()
307 static int ti_eqep_watch_validate(struct counter_device *counter, in ti_eqep_watch_validate()
333 static int ti_eqep_position_ceiling_read(struct counter_device *counter, in ti_eqep_position_ceiling_read()
347 static int ti_eqep_position_ceiling_write(struct counter_device *counter, in ti_eqep_position_ceiling_write()
361 static int ti_eqep_position_enable_read(struct counter_device *counter, in ti_eqep_position_enable_read()
[all …]
H A Dstm32-timer-cnt.c59 static int stm32_count_read(struct counter_device *counter, in stm32_count_read()
71 static int stm32_count_write(struct counter_device *counter, in stm32_count_write()
84 static int stm32_count_function_read(struct counter_device *counter, in stm32_count_function_read()
111 static int stm32_count_function_write(struct counter_device *counter, in stm32_count_function_write()
157 static int stm32_count_direction_read(struct counter_device *counter, in stm32_count_direction_read()
171 static int stm32_count_ceiling_read(struct counter_device *counter, in stm32_count_ceiling_read()
184 static int stm32_count_ceiling_write(struct counter_device *counter, in stm32_count_ceiling_write()
199 static int stm32_count_enable_read(struct counter_device *counter, in stm32_count_enable_read()
212 static int stm32_count_enable_write(struct counter_device *counter, in stm32_count_enable_write()
244 static int stm32_count_prescaler_read(struct counter_device *counter, in stm32_count_prescaler_read()
[all …]
H A Dintel-qep.c108 static int intel_qep_count_read(struct counter_device *counter, in intel_qep_count_read()
124 static int intel_qep_function_read(struct counter_device *counter, in intel_qep_function_read()
137 static int intel_qep_action_read(struct counter_device *counter, in intel_qep_action_read()
175 static int intel_qep_ceiling_read(struct counter_device *counter, in intel_qep_ceiling_read()
187 static int intel_qep_ceiling_write(struct counter_device *counter, in intel_qep_ceiling_write()
212 static int intel_qep_enable_read(struct counter_device *counter, in intel_qep_enable_read()
222 static int intel_qep_enable_write(struct counter_device *counter, in intel_qep_enable_write()
254 static int intel_qep_spike_filter_ns_read(struct counter_device *counter, in intel_qep_spike_filter_ns_read()
275 static int intel_qep_spike_filter_ns_write(struct counter_device *counter, in intel_qep_spike_filter_ns_write()
324 static int intel_qep_preset_enable_read(struct counter_device *counter, in intel_qep_preset_enable_read()
[all …]
H A Dmicrochip-tcb-capture.c74 static int mchp_tc_count_function_read(struct counter_device *counter, in mchp_tc_count_function_read()
88 static int mchp_tc_count_function_write(struct counter_device *counter, in mchp_tc_count_function_write()
150 static int mchp_tc_count_signal_read(struct counter_device *counter, in mchp_tc_count_signal_read()
170 static int mchp_tc_count_action_read(struct counter_device *counter, in mchp_tc_count_action_read()
209 static int mchp_tc_count_action_write(struct counter_device *counter, in mchp_tc_count_action_write()
244 static int mchp_tc_count_read(struct counter_device *counter, in mchp_tc_count_read()
256 static int mchp_tc_count_cap_read(struct counter_device *counter, in mchp_tc_count_cap_read()
282 static int mchp_tc_count_cap_write(struct counter_device *counter, in mchp_tc_count_cap_write()
305 static int mchp_tc_count_compare_read(struct counter_device *counter, struct counter_count *count, in mchp_tc_count_compare_read()
321 static int mchp_tc_count_compare_write(struct counter_device *counter, struct counter_count *count, in mchp_tc_count_compare_write()
[all …]
H A Dstm32-lptimer-cnt.c146 static int stm32_lptim_cnt_read(struct counter_device *counter, in stm32_lptim_cnt_read()
162 static int stm32_lptim_cnt_function_read(struct counter_device *counter, in stm32_lptim_cnt_function_read()
181 static int stm32_lptim_cnt_function_write(struct counter_device *counter, in stm32_lptim_cnt_function_write()
204 static int stm32_lptim_cnt_enable_read(struct counter_device *counter, in stm32_lptim_cnt_enable_read()
220 static int stm32_lptim_cnt_enable_write(struct counter_device *counter, in stm32_lptim_cnt_enable_write()
245 static int stm32_lptim_cnt_ceiling_read(struct counter_device *counter, in stm32_lptim_cnt_ceiling_read()
256 static int stm32_lptim_cnt_ceiling_write(struct counter_device *counter, in stm32_lptim_cnt_ceiling_write()
280 static int stm32_lptim_cnt_action_read(struct counter_device *counter, in stm32_lptim_cnt_action_read()
324 static int stm32_lptim_cnt_action_write(struct counter_device *counter, in stm32_lptim_cnt_action_write()
419 struct counter_device *counter; in stm32_lptim_cnt_probe()
H A Di8254.c57 static int i8254_count_read(struct counter_device *const counter, struct counter_count *const count, in i8254_count_read()
84 static int i8254_function_read(struct counter_device *const counter, in i8254_function_read()
96 static int i8254_action_read(struct counter_device *const counter, in i8254_action_read()
125 static int i8254_count_ceiling_read(struct counter_device *const counter, in i8254_count_ceiling_read()
156 static int i8254_count_mode_read(struct counter_device *const counter, in i8254_count_mode_read()
187 static int i8254_count_mode_write(struct counter_device *const counter, in i8254_count_mode_write()
232 static int i8254_count_floor_read(struct counter_device *const counter, in i8254_count_floor_read()
258 static int i8254_count_preset_read(struct counter_device *const counter, in i8254_count_preset_read()
268 static int i8254_count_preset_write(struct counter_device *const counter, in i8254_count_preset_write()
406 struct counter_device *counter; in devm_i8254_regmap_register()
H A Dcounter-chrdev.c68 struct counter_device *const counter = filp->private_data; in counter_chrdev_read()
106 struct counter_device *const counter = filp->private_data; in counter_chrdev_poll()
138 static int counter_set_event_node(struct counter_device *const counter, in counter_set_event_node()
195 static int counter_enable_events(struct counter_device *const counter) in counter_enable_events()
216 static int counter_disable_events(struct counter_device *const counter) in counter_disable_events()
264 static int counter_add_watch(struct counter_device *const counter, in counter_add_watch()
385 struct counter_device *const counter = filp->private_data; in counter_chrdev_ioctl()
416 struct counter_device *const counter = container_of(inode->i_cdev, in counter_chrdev_open()
428 struct counter_device *const counter = filp->private_data; in counter_chrdev_release()
464 int counter_chrdev_add(struct counter_device *const counter) in counter_chrdev_add()
[all …]
H A Dcounter-sysfs.c22 static inline struct counter_device *counter_from_dev(struct device *dev) in counter_from_dev()
24 return container_of(dev, struct counter_device, dev); in counter_from_dev()
109 struct counter_device *const counter = counter_from_dev(dev); in counter_comp_u8_show()
141 struct counter_device *const counter = counter_from_dev(dev); in counter_comp_u8_store()
177 struct counter_device *const counter = counter_from_dev(dev); in counter_comp_u32_show()
242 struct counter_device *const counter = counter_from_dev(dev); in counter_comp_u32_store()
306 struct counter_device *const counter = counter_from_dev(dev); in counter_comp_u64_show()
334 struct counter_device *const counter = counter_from_dev(dev); in counter_comp_u64_store()
366 struct counter_device *const counter = counter_from_dev(dev); in counter_comp_array_u32_show()
388 struct counter_device *const counter = counter_from_dev(dev); in counter_comp_array_u32_store()
[all …]
H A Dftm-quaddec.c117 static int ftm_quaddec_get_prescaler(struct counter_device *counter, in ftm_quaddec_get_prescaler()
130 static int ftm_quaddec_set_prescaler(struct counter_device *counter, in ftm_quaddec_set_prescaler()
160 static int ftm_quaddec_count_read(struct counter_device *counter, in ftm_quaddec_count_read()
174 static int ftm_quaddec_count_write(struct counter_device *counter, in ftm_quaddec_count_write()
190 static int ftm_quaddec_count_function_read(struct counter_device *counter, in ftm_quaddec_count_function_read()
199 static int ftm_quaddec_action_read(struct counter_device *counter, in ftm_quaddec_action_read()
261 struct counter_device *counter; in ftm_quaddec_probe()
H A Dcounter-chrdev.h11 int counter_chrdev_add(struct counter_device *const counter);
12 void counter_chrdev_remove(struct counter_device *const counter);
H A Dcounter-sysfs.h11 int counter_sysfs_add(struct counter_device *const counter);
/linux/Documentation/driver-api/
H A Dgeneric-counter.rst249 allocated counter_device structure before the Counter is registered to
257 set to the counts array member of an allocated counter_device structure
260 Driver callbacks must be provided to the counter_device structure in
265 A counter_device structure is allocated using counter_alloc() and then
304 int count_direction_read(struct counter_device *counter,
307 int count_enable_read(struct counter_device *counter,
309 int count_enable_write(struct counter_device *counter,
311 int count_ceiling_read(struct counter_device *counter,
313 int count_ceiling_write(struct counter_device *counter,
506 void counter_push_event(struct counter_device *const counter, const u8 event,