13#define ABS_MT_FIRST ABS_MT_TOUCH_MAJOR
14#define ABS_MT_LAST ABS_MT_TOOL_Y
25struct input_dev_poller;
39enum input_clock_type {
156 unsigned int hint_events_per_packet;
158 unsigned int keycodemax;
159 unsigned int keycodesize;
162 int (*setkeycode)(
struct input_dev *
dev,
164 unsigned int *old_keycode);
165 int (*getkeycode)(
struct input_dev *
dev,
168 struct ff_device *ff;
170 struct input_dev_poller *poller;
172 unsigned int repeat_key;
186 int (*
open)(
struct input_dev *
dev);
187 void (*
close)(
struct input_dev *
dev);
188 int (*flush)(
struct input_dev *
dev,
struct file *
file);
189 int (*event)(
struct input_dev *
dev,
unsigned int type,
unsigned int code,
int value);
191 struct input_handle
__rcu *grab;
204 unsigned int num_vals;
205 unsigned int max_vals;
206 struct input_value *vals;
210 ktime_t timestamp[INPUT_CLK_MAX];
214#define to_input_dev(d) container_of(d, struct input_dev, dev)
220#if EV_MAX != INPUT_DEVICE_ID_EV_MAX
221#error "EV_MAX and INPUT_DEVICE_ID_EV_MAX do not match"
224#if KEY_MIN_INTERESTING != INPUT_DEVICE_ID_KEY_MIN_INTERESTING
225#error "KEY_MIN_INTERESTING and INPUT_DEVICE_ID_KEY_MIN_INTERESTING do not match"
228#if KEY_MAX != INPUT_DEVICE_ID_KEY_MAX
229#error "KEY_MAX and INPUT_DEVICE_ID_KEY_MAX do not match"
232#if REL_MAX != INPUT_DEVICE_ID_REL_MAX
233#error "REL_MAX and INPUT_DEVICE_ID_REL_MAX do not match"
236#if ABS_MAX != INPUT_DEVICE_ID_ABS_MAX
237#error "ABS_MAX and INPUT_DEVICE_ID_ABS_MAX do not match"
240#if MSC_MAX != INPUT_DEVICE_ID_MSC_MAX
241#error "MSC_MAX and INPUT_DEVICE_ID_MSC_MAX do not match"
244#if LED_MAX != INPUT_DEVICE_ID_LED_MAX
245#error "LED_MAX and INPUT_DEVICE_ID_LED_MAX do not match"
248#if SND_MAX != INPUT_DEVICE_ID_SND_MAX
249#error "SND_MAX and INPUT_DEVICE_ID_SND_MAX do not match"
252#if FF_MAX != INPUT_DEVICE_ID_FF_MAX
253#error "FF_MAX and INPUT_DEVICE_ID_FF_MAX do not match"
256#if SW_MAX != INPUT_DEVICE_ID_SW_MAX
257#error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match"
260#if INPUT_PROP_MAX != INPUT_DEVICE_ID_PROP_MAX
261#error "INPUT_PROP_MAX and INPUT_DEVICE_ID_PROP_MAX do not match"
264#define INPUT_DEVICE_ID_MATCH_DEVICE \
265 (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT)
266#define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \
267 (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION)
316struct input_handler {
320 void (*event)(
struct input_handle *handle,
unsigned int type,
unsigned int code,
int value);
321 unsigned int (*events)(
struct input_handle *handle,
322 struct input_value *vals,
unsigned int count);
323 bool (*filter)(
struct input_handle *handle,
unsigned int type,
unsigned int code,
int value);
324 bool (*match)(
struct input_handler *handler,
struct input_dev *
dev);
326 void (*disconnect)(
struct input_handle *handle);
327 void (*start)(
struct input_handle *handle);
329 bool passive_observer;
363 struct input_dev *
dev;
364 struct input_handler *handler;
366 unsigned int (*handle_events)(
struct input_handle *handle,
367 struct input_value *vals,
374struct input_dev
__must_check *input_allocate_device(
void);
376void input_free_device(
struct input_dev *
dev);
378static inline struct input_dev *input_get_device(
struct input_dev *
dev)
383static inline void input_put_device(
struct input_dev *
dev)
389static inline void *input_get_drvdata(
struct input_dev *
dev)
391 return dev_get_drvdata(&
dev->dev);
394static inline void input_set_drvdata(
struct input_dev *
dev,
void *
data)
396 dev_set_drvdata(&
dev->dev,
data);
399int __must_check input_register_device(
struct input_dev *);
400void input_unregister_device(
struct input_dev *);
402void input_reset_device(
struct input_dev *);
404int input_setup_polling(
struct input_dev *
dev,
405 void (*poll_fn)(
struct input_dev *
dev));
406void input_set_poll_interval(
struct input_dev *
dev,
unsigned int interval);
407void input_set_min_poll_interval(
struct input_dev *
dev,
unsigned int interval);
408void input_set_max_poll_interval(
struct input_dev *
dev,
unsigned int interval);
409int input_get_poll_interval(
struct input_dev *
dev);
411int __must_check input_register_handler(
struct input_handler *);
412void input_unregister_handler(
struct input_handler *);
414int __must_check input_get_new_minor(
int legacy_base,
unsigned int legacy_num,
416void input_free_minor(
unsigned int minor);
418int input_handler_for_each_handle(
struct input_handler *,
void *
data,
419 int (*
fn)(
struct input_handle *,
void *));
421int input_register_handle(
struct input_handle *);
422void input_unregister_handle(
struct input_handle *);
424int input_grab_device(
struct input_handle *);
425void input_release_device(
struct input_handle *);
427int input_open_device(
struct input_handle *);
428void input_close_device(
struct input_handle *);
430int input_flush_device(
struct input_handle *handle,
struct file *
file);
432void input_set_timestamp(
struct input_dev *
dev,
ktime_t timestamp);
433ktime_t *input_get_timestamp(
struct input_dev *
dev);
435void input_event(
struct input_dev *
dev,
unsigned int type,
unsigned int code,
int value);
436void input_inject_event(
struct input_handle *handle,
unsigned int type,
unsigned int code,
int value);
438static inline void input_report_key(
struct input_dev *
dev,
unsigned int code,
int value)
443static inline void input_report_rel(
struct input_dev *
dev,
unsigned int code,
int value)
448static inline void input_report_abs(
struct input_dev *
dev,
unsigned int code,
int value)
453static inline void input_report_ff_status(
struct input_dev *
dev,
unsigned int code,
int value)
458static inline void input_report_switch(
struct input_dev *
dev,
unsigned int code,
int value)
463static inline void input_sync(
struct input_dev *
dev)
468static inline void input_mt_sync(
struct input_dev *
dev)
473void input_set_capability(
struct input_dev *
dev,
unsigned int type,
unsigned int code);
485static inline void input_set_events_per_packet(
struct input_dev *
dev,
int n_events)
487 dev->hint_events_per_packet = n_events;
490void input_alloc_absinfo(
struct input_dev *
dev);
491void input_set_abs_params(
struct input_dev *
dev,
unsigned int axis,
493void input_copy_abs(
struct input_dev *dst,
unsigned int dst_axis,
494 const struct input_dev *src,
unsigned int src_axis);
496#define INPUT_GENERATE_ABS_ACCESSORS(_suffix, _item) \
497static inline int input_abs_get_##_suffix(struct input_dev *dev, \
500 return dev->absinfo ? dev->absinfo[axis]._item : 0; \
503static inline void input_abs_set_##_suffix(struct input_dev *dev, \
504 unsigned int axis, int val) \
506 input_alloc_absinfo(dev); \
508 dev->absinfo[axis]._item = val; \
519 unsigned int *scancode);
521int input_default_setkeycode(
struct input_dev *
dev,
523 unsigned int *old_keycode);
526int input_set_keycode(
struct input_dev *
dev,
529bool input_match_device_id(
const struct input_dev *
dev,
532void input_enable_softrepeat(
struct input_dev *
dev,
int delay,
int period);
534bool input_device_enabled(
struct input_dev *
dev);
536extern const struct class input_class;
568 int (*upload)(
struct input_dev *
dev,
struct ff_effect *effect,
570 int (*erase)(
struct input_dev *
dev,
int effect_id);
572 int (*playback)(
struct input_dev *
dev,
int effect_id,
int value);
573 void (*set_gain)(
struct input_dev *
dev,
u16 gain);
574 void (*set_autocenter)(
struct input_dev *
dev,
u16 magnitude);
576 void (*destroy)(
struct ff_device *);
577 void (*stop)(
struct ff_device *);
590int input_ff_create(
struct input_dev *
dev,
unsigned int max_effects);
591void input_ff_destroy(
struct input_dev *
dev);
593int input_ff_event(
struct input_dev *
dev,
unsigned int type,
unsigned int code,
int value);
596int input_ff_erase(
struct input_dev *
dev,
int effect_id,
struct file *
file);
597int input_ff_flush(
struct input_dev *
dev,
struct file *
file);
599int input_ff_create_memless(
struct input_dev *
dev,
void *
data,
600 int (*play_effect)(
struct input_dev *,
void *,
struct ff_effect *));
#define bool
Definition stdbool.h:35
#define __counted_by(m)
Definition stddef.h:64
XE_LIB int connect(int sockfd, sockaddr_ *addr, socklen_t addrlen)
int snd
Definition main.cpp:68
#define NULL
Definition actypes.h:561
#define open
Definition acwin.h:179
#define close
Definition acwin.h:182
void * fn
Definition audrv.c:980
#define BITS_TO_LONGS(nr)
Definition bordoisila_bits.h:39
#define __must_check
Definition compiler.h:114
#define __rcu
Definition compiler_types.h:72
uint32_t * flat
Definition compose3d.cpp:157
void * get_device(const void *dev)
void put_device(const void *dev)
int32_t __s32
Definition drm.h:41
uint16_t __u16
Definition drm.h:40
struct drm_crtc struct drm_plane struct drm_plane const struct drm_crtc_funcs const char * name
Definition drm_crtc.h:1242
const struct device * dev
Definition drm_print.h:519
void * data
Definition kthread.h:30
void int node
Definition kthread.h:31
int64_t ktime_t
Definition kernel.h:404
uint16_t u16
Definition kernel.h:15
int spinlock_t
Definition kernel.h:44
#define min(a, b)
Definition minmax.h:24
#define max(a, b)
Definition minmax.h:28