Lines Matching +full:input +full:- +full:value

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Copyright (c) 1999-2002 Vojtech Pavlik
10 #include <uapi/linux/input.h>
16 * In-kernel definitions.
27 * struct input_value - input value representation
28 * @type: type of value (EV_KEY, EV_ABS, etc)
29 * @code: the value code
30 * @value: the value
35 __s32 value; member
46 * struct input_dev - represents an input device
84 * about absolute axes (current value, min, max, flat, fuzz,
94 * to start providing events to the input core.
97 * providing events to the input core.
105 * @grab: input handle that currently has the device grabbed (via
107 * recipient for all input events coming from the device
108 * @event_lock: this spinlock is taken when input core receives
112 * has been registered with input core must take this lock.
114 * @users: stores number of users (input handlers) that opened this
116 * to make sure that dev->open() is only called when the first
117 * user opens device and dev->close() is called when the very
120 * causes input_open_device*() fail with -ENODEV.
122 * @h_list: list of input handles associated with the device. When
123 * accessing the list dev->mutex must be held
132 * @inhibited: indicates that the input device is inhibited. If that is
133 * the case then input core ignores any events generated by the device.
188 int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value);
271 * struct input_handler - implements one of interfaces for input devices
272 * @private: driver-specific data
273 * @event: event handler. This method is being called by input core with
274 * interrupts disabled and dev->event_lock spinlock held and so
277 * input core with interrupts disabled and dev->event_lock
282 * to perform fine-grained matching between device and handler
283 * @connect: called when attaching a handler to an input device
284 * @disconnect: disconnects a handler from input device
286 * input core right after connect() method and also when a process
291 * @name: name of the handler, to be shown in /proc/bus/input/handlers
294 * @h_list: list of input handles associated with the handler
297 * Input handlers attach to input devices and create input handles. There
298 * are likely several handlers attached to any given input device at the
299 * same time. All of them will get their copy of input event generated by
302 * The very same structure is used to implement input filters. Input core
307 * Note that input core serializes calls to connect() and disconnect()
314 void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
317 bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
334 * struct input_handle - links input device with an input handler
335 * @private: handler-specific data
339 * @dev: input device the handle is attached to
365 return dev ? to_input_dev(get_device(&dev->dev)) : NULL; in input_get_device()
371 put_device(&dev->dev); in input_put_device()
376 return dev_get_drvdata(&dev->dev); in input_get_drvdata()
381 dev_set_drvdata(&dev->dev, data); in input_set_drvdata()
420 void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
421 …d input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value);
423 static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) in input_report_key() argument
425 input_event(dev, EV_KEY, code, !!value); in input_report_key()
428 static inline void input_report_rel(struct input_dev *dev, unsigned int code, int value) in input_report_rel() argument
430 input_event(dev, EV_REL, code, value); in input_report_rel()
433 static inline void input_report_abs(struct input_dev *dev, unsigned int code, int value) in input_report_abs() argument
435 input_event(dev, EV_ABS, code, value); in input_report_abs()
438 static inline void input_report_ff_status(struct input_dev *dev, unsigned int code, int value) in input_report_ff_status() argument
440 input_event(dev, EV_FF_STATUS, code, value); in input_report_ff_status()
443 static inline void input_report_switch(struct input_dev *dev, unsigned int code, int value) in input_report_switch() argument
445 input_event(dev, EV_SW, code, !!value); in input_report_switch()
461 * input_set_events_per_packet - tell handlers about the driver event rate
462 * @dev: the input device used by the driver
472 dev->hint_events_per_packet = n_events; in input_set_events_per_packet()
485 return dev->absinfo ? dev->absinfo[axis]._item : 0; \
492 if (dev->absinfo) \
493 dev->absinfo[axis]._item = val; \
496 INPUT_GENERATE_ABS_ACCESSORS(val, value)
520 * struct ff_device - force-feedback part of an input device
525 * @set_autocenter: Called to auto-center device
526 * @destroy: called by input core when parent input device is being
528 * @private: driver-specific data, will be freed automatically
530 * device (not emulated like ones in input_dev->ffbit)
537 * Every force-feedback device must implement upload() and playback()
543 * dev->event_lock spinlock held and interrupts off and thus may not
551 int (*playback)(struct input_dev *dev, int effect_id, int value);
571 int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);