Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

struct_ff_device(9) [centos man page]

STRUCT 
FF_DEVICE(9) Input Subsystem STRUCT FF_DEVICE(9) NAME
struct_ff_device - force-feedback part of an input device SYNOPSIS
struct ff_device { int (* upload) (struct input_dev *dev, struct ff_effect *effect,struct ff_effect *old); int (* erase) (struct input_dev *dev, int effect_id); int (* playback) (struct input_dev *dev, int effect_id, int value); void (* set_gain) (struct input_dev *dev, u16 gain); void (* set_autocenter) (struct input_dev *dev, u16 magnitude); void (* destroy) (struct ff_device *); void * private; unsigned long ffbit[BITS_TO_LONGS(FF_CNT)]; struct mutex mutex; int max_effects; struct ff_effect * effects; struct file * effect_owners[]; }; MEMBERS
upload Called to upload an new effect into device erase Called to erase an effect from device playback Called to request device to start playing specified effect set_gain Called to set specified gain set_autocenter Called to auto-center device destroy called by input core when parent input device is being destroyed private driver-specific data, will be freed automatically ffbit[BITS_TO_LONGS(FF_CNT)] bitmap of force feedback capabilities truly supported by device (not emulated like ones in input_dev->ffbit) mutex mutex for serializing access to the device max_effects maximum number of effects supported by device effects pointer to an array of effects currently loaded into device effect_owners[] array of effect owners; when file handle owning an effect gets closed the effect is automatically erased DESCRIPTION
Every force-feedback device must implement upload and playback methods; erase is optional. set_gain and set_autocenter need only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER bits. Note that playback, set_gain and set_autocenter are called with dev->event_lock spinlock held and interrupts off and thus may not sleep. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT FF_DEVICE(9)

Check Out this Related Man Page

STRUCT 
INPUT_HANDLER(9) Input Subsystem STRUCT INPUT_HANDLER(9) NAME
struct_input_handler - implements one of interfaces for input devices SYNOPSIS
struct input_handler { void * private; void (* event) (struct input_handle *handle, unsigned int type, unsigned int code, int value); void (* events) (struct input_handle *handle,const struct input_value *vals, unsigned int count); bool (* filter) (struct input_handle *handle, unsigned int type, unsigned int code, int value); bool (* match) (struct input_handler *handler, struct input_dev *dev); int (* connect) (struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id); void (* disconnect) (struct input_handle *handle); void (* start) (struct input_handle *handle); bool legacy_minors; int minor; const char * name; const struct input_device_id * id_table; struct list_head h_list; struct list_head node; }; MEMBERS
private driver-specific data event event handler. This method is being called by input core with interrupts disabled and dev->event_lock spinlock held and so it may not sleep events event sequence handler. This method is being called by input core with interrupts disabled and dev->event_lock spinlock held and so it may not sleep filter similar to event; separates normal event handlers from "filters". match called after comparing device's id with handler's id_table to perform fine-grained matching between device and handler connect called when attaching a handler to an input device disconnect disconnects a handler from input device start starts handler for given handle. This function is called by input core right after connect method and also when a process that "grabbed" a device releases it legacy_minors set to true by drivers using legacy minor ranges minor beginning of range of 32 legacy minors for devices this driver can provide name name of the handler, to be shown in /proc/bus/input/handlers id_table pointer to a table of input_device_ids this driver can handle h_list list of input handles associated with the handler node for placing the driver onto input_handler_list DESCRIPTION
Input handlers attach to input devices and create input handles. There are likely several handlers attached to any given input device at the same time. All of them will get their copy of input event generated by the device. The very same structure is used to implement input filters. Input core allows filters to run first and will not pass event to regular handlers if any of the filters indicate that the event should be filtered (by returning true from their filter method). Note that input core serializes calls to connect and disconnect methods. COPYRIGHT
Kernel Hackers Manual 3.10 June 2014 STRUCT INPUT_HANDLER(9)
Man Page