Name:const char * Type, the name of the input device Phys:const char * Type, file node name under/sys/directory, such as/sys/class/input/event0 Uniq:const char * Type, device Unique identification code, requires device support struct INPUT_ID ID; ID of the device, including manufacturer, product good, version number unsigned long propbit[bits_to_longs (input_prop_cnt)]; unsigned long evbit[bits_to_longs (ev_cnt)]; Which events are supported by the device unsigned long keybit[bits_to_longs (key_cnt)]; Which keys and buttons are supported by this device unsigned long relbit[bits_to_longs (rel_cnt)]; Relative coordinates of the device, for mouse devices? unsigned long absbit[bits_to_longs (abs_cnt)]; For touch screen devices? unsigned long mscbit[bits_to_longs (msc_cnt)]; Miscellaneous events supported by the device unsigned long ledbit[bits_to_longs (led_cnt)]; LED on the device unsigned long sndbit[bits_to_longs (snd_cnt)]; Device sound support related, such as buzzer etc. unsigned long ffbit[bits_to_longs (ff_cnt)]; Strong feedback events, such as motors, supported by the device unsigned long swbit[bits_to_longs (sw_cnt)]; Whether the device supports switches, such as the mute switch on the iphone unsigned int hint_events_per_packet; The number of events implied by the device packaging event, typically occurring between Ev_syn and Syn_report, Input_handler need to estimate the buffer size to hold the event unsigned int keycodemax; Key Code table size, used to hold the key code, the actual number of keys may be less than this unsigned int keycodesize; Number of key codes actually stored in the key table void *keycode; Scan code to key code mapping, the ADC key scanning code can be understood as a key ADC value, key code volume Plus, volume reduction, etc. Int (*setkeycode) (struct Input_dev *dev, const struct Input_keymap_entry *ke, unsigned int *old_keycode); Int (*getkeycode) (struct Input_dev *dev, struct input_keymap_entry *ke); struct Ff_device *ff; unsigned int repeat_key; Repeat_key saved the last pressed button for automatic software re-send struct Timer_list timer; The software re-issued timer, including the button press for how long to start the automatic re-send function, every how often to re-send int rep[rep_cnt]; Save parameter values for automatic re-send struct INPUT_MT *mt; struct Input_absinfo *absinfo; unsigned long key[bits_to_longs (key_cnt)]; React to the current state of the Key/button device, such as press or lift unsigned long led[bits_to_longs (led_cnt)]; unsigned long snd[bits_to_longs (snd_cnt)]; unsigned long sw[bits_to_longs (sw_cnt)]; Int (*open) (struct Input_dev *dev); This method is called by the first user when calling Input_open_device, the driver needs to open the poll thread at this time, and can escalate the event, other users will only add the user Count 1 void (*close) (struct Input_dev *dev); This function is called when the last user calls Input_close_device, and the drive needs to be implemented to do a aftercare work Int (*flush) (struct Input_dev *dev, struct file *file); Int (*event) (struct Input_dev *dev, unsigned int type, unsigned int code, int value); Mainly used for Input_handler receiving user layer operation events, Input_dev operation, such as the operation of the LED and FF devices struct Input_handle __rcu *grab; Once grab is not empty, this input_handle will be the only event handler for this Input_dev spinlock_t Event_lock; Event for input core to receive or process this Input_dev struct mutex mutex; Used to ensure serial execution of the open, close, flush methods unsigned int users; Input_handler number of Input_open_device executed BOOL Going_away; Flag Input_dev execution Input_open_device will fail during unregister execution struct device dev; Device-driven model devices struct List_head h_list; All input_handle that are used to link this Input_dev struct List_head node; Used to add this input_dev to the global input_dev_list unsigned int num_vals; How many frames in the current queue are queued and each frame can be interpreted as an event between Ev_syn and Syn_report unsigned int max_vals; The maximum number of events that can be contained in a frame??? struct Input_value *vals; An array of queues to the current queue???? BOOL devres_managed; Indicates whether the device resource is managed by the device resource framework |