Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-only */
0002 /*
0003  * Copyright (c) 1999-2002 Vojtech Pavlik
0004  */
0005 #ifndef _INPUT_H
0006 #define _INPUT_H
0007 
0008 #include <linux/time.h>
0009 #include <linux/list.h>
0010 #include <uapi/linux/input.h>
0011 /* Implementation details, userspace should not care about these */
0012 #define ABS_MT_FIRST        ABS_MT_TOUCH_MAJOR
0013 #define ABS_MT_LAST     ABS_MT_TOOL_Y
0014 
0015 /*
0016  * In-kernel definitions.
0017  */
0018 
0019 #include <linux/device.h>
0020 #include <linux/fs.h>
0021 #include <linux/timer.h>
0022 #include <linux/mod_devicetable.h>
0023 
0024 struct input_dev_poller;
0025 
0026 /**
0027  * struct input_value - input value representation
0028  * @type: type of value (EV_KEY, EV_ABS, etc)
0029  * @code: the value code
0030  * @value: the value
0031  */
0032 struct input_value {
0033     __u16 type;
0034     __u16 code;
0035     __s32 value;
0036 };
0037 
0038 enum input_clock_type {
0039     INPUT_CLK_REAL = 0,
0040     INPUT_CLK_MONO,
0041     INPUT_CLK_BOOT,
0042     INPUT_CLK_MAX
0043 };
0044 
0045 /**
0046  * struct input_dev - represents an input device
0047  * @name: name of the device
0048  * @phys: physical path to the device in the system hierarchy
0049  * @uniq: unique identification code for the device (if device has it)
0050  * @id: id of the device (struct input_id)
0051  * @propbit: bitmap of device properties and quirks
0052  * @evbit: bitmap of types of events supported by the device (EV_KEY,
0053  *  EV_REL, etc.)
0054  * @keybit: bitmap of keys/buttons this device has
0055  * @relbit: bitmap of relative axes for the device
0056  * @absbit: bitmap of absolute axes for the device
0057  * @mscbit: bitmap of miscellaneous events supported by the device
0058  * @ledbit: bitmap of leds present on the device
0059  * @sndbit: bitmap of sound effects supported by the device
0060  * @ffbit: bitmap of force feedback effects supported by the device
0061  * @swbit: bitmap of switches present on the device
0062  * @hint_events_per_packet: average number of events generated by the
0063  *  device in a packet (between EV_SYN/SYN_REPORT events). Used by
0064  *  event handlers to estimate size of the buffer needed to hold
0065  *  events.
0066  * @keycodemax: size of keycode table
0067  * @keycodesize: size of elements in keycode table
0068  * @keycode: map of scancodes to keycodes for this device
0069  * @getkeycode: optional legacy method to retrieve current keymap.
0070  * @setkeycode: optional method to alter current keymap, used to implement
0071  *  sparse keymaps. If not supplied default mechanism will be used.
0072  *  The method is being called while holding event_lock and thus must
0073  *  not sleep
0074  * @ff: force feedback structure associated with the device if device
0075  *  supports force feedback effects
0076  * @poller: poller structure associated with the device if device is
0077  *  set up to use polling mode
0078  * @repeat_key: stores key code of the last key pressed; used to implement
0079  *  software autorepeat
0080  * @timer: timer for software autorepeat
0081  * @rep: current values for autorepeat parameters (delay, rate)
0082  * @mt: pointer to multitouch state
0083  * @absinfo: array of &struct input_absinfo elements holding information
0084  *  about absolute axes (current value, min, max, flat, fuzz,
0085  *  resolution)
0086  * @key: reflects current state of device's keys/buttons
0087  * @led: reflects current state of device's LEDs
0088  * @snd: reflects current state of sound effects
0089  * @sw: reflects current state of device's switches
0090  * @open: this method is called when the very first user calls
0091  *  input_open_device(). The driver must prepare the device
0092  *  to start generating events (start polling thread,
0093  *  request an IRQ, submit URB, etc.). The meaning of open() is
0094  *  to start providing events to the input core.
0095  * @close: this method is called when the very last user calls
0096  *  input_close_device(). The meaning of close() is to stop
0097  *  providing events to the input core.
0098  * @flush: purges the device. Most commonly used to get rid of force
0099  *  feedback effects loaded into the device when disconnecting
0100  *  from it
0101  * @event: event handler for events sent _to_ the device, like EV_LED
0102  *  or EV_SND. The device is expected to carry out the requested
0103  *  action (turn on a LED, play sound, etc.) The call is protected
0104  *  by @event_lock and must not sleep
0105  * @grab: input handle that currently has the device grabbed (via
0106  *  EVIOCGRAB ioctl). When a handle grabs a device it becomes sole
0107  *  recipient for all input events coming from the device
0108  * @event_lock: this spinlock is taken when input core receives
0109  *  and processes a new event for the device (in input_event()).
0110  *  Code that accesses and/or modifies parameters of a device
0111  *  (such as keymap or absmin, absmax, absfuzz, etc.) after device
0112  *  has been registered with input core must take this lock.
0113  * @mutex: serializes calls to open(), close() and flush() methods
0114  * @users: stores number of users (input handlers) that opened this
0115  *  device. It is used by input_open_device() and input_close_device()
0116  *  to make sure that dev->open() is only called when the first
0117  *  user opens device and dev->close() is called when the very
0118  *  last user closes the device
0119  * @going_away: marks devices that are in a middle of unregistering and
0120  *  causes input_open_device*() fail with -ENODEV.
0121  * @dev: driver model's view of this device
0122  * @h_list: list of input handles associated with the device. When
0123  *  accessing the list dev->mutex must be held
0124  * @node: used to place the device onto input_dev_list
0125  * @num_vals: number of values queued in the current frame
0126  * @max_vals: maximum number of values queued in a frame
0127  * @vals: array of values queued in the current frame
0128  * @devres_managed: indicates that devices is managed with devres framework
0129  *  and needs not be explicitly unregistered or freed.
0130  * @timestamp: storage for a timestamp set by input_set_timestamp called
0131  *  by a driver
0132  * @inhibited: indicates that the input device is inhibited. If that is
0133  * the case then input core ignores any events generated by the device.
0134  * Device's close() is called when it is being inhibited and its open()
0135  * is called when it is being uninhibited.
0136  */
0137 struct input_dev {
0138     const char *name;
0139     const char *phys;
0140     const char *uniq;
0141     struct input_id id;
0142 
0143     unsigned long propbit[BITS_TO_LONGS(INPUT_PROP_CNT)];
0144 
0145     unsigned long evbit[BITS_TO_LONGS(EV_CNT)];
0146     unsigned long keybit[BITS_TO_LONGS(KEY_CNT)];
0147     unsigned long relbit[BITS_TO_LONGS(REL_CNT)];
0148     unsigned long absbit[BITS_TO_LONGS(ABS_CNT)];
0149     unsigned long mscbit[BITS_TO_LONGS(MSC_CNT)];
0150     unsigned long ledbit[BITS_TO_LONGS(LED_CNT)];
0151     unsigned long sndbit[BITS_TO_LONGS(SND_CNT)];
0152     unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];
0153     unsigned long swbit[BITS_TO_LONGS(SW_CNT)];
0154 
0155     unsigned int hint_events_per_packet;
0156 
0157     unsigned int keycodemax;
0158     unsigned int keycodesize;
0159     void *keycode;
0160 
0161     int (*setkeycode)(struct input_dev *dev,
0162               const struct input_keymap_entry *ke,
0163               unsigned int *old_keycode);
0164     int (*getkeycode)(struct input_dev *dev,
0165               struct input_keymap_entry *ke);
0166 
0167     struct ff_device *ff;
0168 
0169     struct input_dev_poller *poller;
0170 
0171     unsigned int repeat_key;
0172     struct timer_list timer;
0173 
0174     int rep[REP_CNT];
0175 
0176     struct input_mt *mt;
0177 
0178     struct input_absinfo *absinfo;
0179 
0180     unsigned long key[BITS_TO_LONGS(KEY_CNT)];
0181     unsigned long led[BITS_TO_LONGS(LED_CNT)];
0182     unsigned long snd[BITS_TO_LONGS(SND_CNT)];
0183     unsigned long sw[BITS_TO_LONGS(SW_CNT)];
0184 
0185     int (*open)(struct input_dev *dev);
0186     void (*close)(struct input_dev *dev);
0187     int (*flush)(struct input_dev *dev, struct file *file);
0188     int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value);
0189 
0190     struct input_handle __rcu *grab;
0191 
0192     spinlock_t event_lock;
0193     struct mutex mutex;
0194 
0195     unsigned int users;
0196     bool going_away;
0197 
0198     struct device dev;
0199 
0200     struct list_head    h_list;
0201     struct list_head    node;
0202 
0203     unsigned int num_vals;
0204     unsigned int max_vals;
0205     struct input_value *vals;
0206 
0207     bool devres_managed;
0208 
0209     ktime_t timestamp[INPUT_CLK_MAX];
0210 
0211     bool inhibited;
0212 };
0213 #define to_input_dev(d) container_of(d, struct input_dev, dev)
0214 
0215 /*
0216  * Verify that we are in sync with input_device_id mod_devicetable.h #defines
0217  */
0218 
0219 #if EV_MAX != INPUT_DEVICE_ID_EV_MAX
0220 #error "EV_MAX and INPUT_DEVICE_ID_EV_MAX do not match"
0221 #endif
0222 
0223 #if KEY_MIN_INTERESTING != INPUT_DEVICE_ID_KEY_MIN_INTERESTING
0224 #error "KEY_MIN_INTERESTING and INPUT_DEVICE_ID_KEY_MIN_INTERESTING do not match"
0225 #endif
0226 
0227 #if KEY_MAX != INPUT_DEVICE_ID_KEY_MAX
0228 #error "KEY_MAX and INPUT_DEVICE_ID_KEY_MAX do not match"
0229 #endif
0230 
0231 #if REL_MAX != INPUT_DEVICE_ID_REL_MAX
0232 #error "REL_MAX and INPUT_DEVICE_ID_REL_MAX do not match"
0233 #endif
0234 
0235 #if ABS_MAX != INPUT_DEVICE_ID_ABS_MAX
0236 #error "ABS_MAX and INPUT_DEVICE_ID_ABS_MAX do not match"
0237 #endif
0238 
0239 #if MSC_MAX != INPUT_DEVICE_ID_MSC_MAX
0240 #error "MSC_MAX and INPUT_DEVICE_ID_MSC_MAX do not match"
0241 #endif
0242 
0243 #if LED_MAX != INPUT_DEVICE_ID_LED_MAX
0244 #error "LED_MAX and INPUT_DEVICE_ID_LED_MAX do not match"
0245 #endif
0246 
0247 #if SND_MAX != INPUT_DEVICE_ID_SND_MAX
0248 #error "SND_MAX and INPUT_DEVICE_ID_SND_MAX do not match"
0249 #endif
0250 
0251 #if FF_MAX != INPUT_DEVICE_ID_FF_MAX
0252 #error "FF_MAX and INPUT_DEVICE_ID_FF_MAX do not match"
0253 #endif
0254 
0255 #if SW_MAX != INPUT_DEVICE_ID_SW_MAX
0256 #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match"
0257 #endif
0258 
0259 #if INPUT_PROP_MAX != INPUT_DEVICE_ID_PROP_MAX
0260 #error "INPUT_PROP_MAX and INPUT_DEVICE_ID_PROP_MAX do not match"
0261 #endif
0262 
0263 #define INPUT_DEVICE_ID_MATCH_DEVICE \
0264     (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT)
0265 #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \
0266     (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION)
0267 
0268 struct input_handle;
0269 
0270 /**
0271  * struct input_handler - implements one of interfaces for input devices
0272  * @private: driver-specific data
0273  * @event: event handler. This method is being called by input core with
0274  *  interrupts disabled and dev->event_lock spinlock held and so
0275  *  it may not sleep
0276  * @events: event sequence handler. This method is being called by
0277  *  input core with interrupts disabled and dev->event_lock
0278  *  spinlock held and so it may not sleep
0279  * @filter: similar to @event; separates normal event handlers from
0280  *  "filters".
0281  * @match: called after comparing device's id with handler's id_table
0282  *  to perform fine-grained matching between device and handler
0283  * @connect: called when attaching a handler to an input device
0284  * @disconnect: disconnects a handler from input device
0285  * @start: starts handler for given handle. This function is called by
0286  *  input core right after connect() method and also when a process
0287  *  that "grabbed" a device releases it
0288  * @legacy_minors: set to %true by drivers using legacy minor ranges
0289  * @minor: beginning of range of 32 legacy minors for devices this driver
0290  *  can provide
0291  * @name: name of the handler, to be shown in /proc/bus/input/handlers
0292  * @id_table: pointer to a table of input_device_ids this driver can
0293  *  handle
0294  * @h_list: list of input handles associated with the handler
0295  * @node: for placing the driver onto input_handler_list
0296  *
0297  * Input handlers attach to input devices and create input handles. There
0298  * are likely several handlers attached to any given input device at the
0299  * same time. All of them will get their copy of input event generated by
0300  * the device.
0301  *
0302  * The very same structure is used to implement input filters. Input core
0303  * allows filters to run first and will not pass event to regular handlers
0304  * if any of the filters indicate that the event should be filtered (by
0305  * returning %true from their filter() method).
0306  *
0307  * Note that input core serializes calls to connect() and disconnect()
0308  * methods.
0309  */
0310 struct input_handler {
0311 
0312     void *private;
0313 
0314     void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
0315     void (*events)(struct input_handle *handle,
0316                const struct input_value *vals, unsigned int count);
0317     bool (*filter)(struct input_handle *handle, unsigned int type, unsigned int code, int value);
0318     bool (*match)(struct input_handler *handler, struct input_dev *dev);
0319     int (*connect)(struct input_handler *handler, struct input_dev *dev, const struct input_device_id *id);
0320     void (*disconnect)(struct input_handle *handle);
0321     void (*start)(struct input_handle *handle);
0322 
0323     bool legacy_minors;
0324     int minor;
0325     const char *name;
0326 
0327     const struct input_device_id *id_table;
0328 
0329     struct list_head    h_list;
0330     struct list_head    node;
0331 };
0332 
0333 /**
0334  * struct input_handle - links input device with an input handler
0335  * @private: handler-specific data
0336  * @open: counter showing whether the handle is 'open', i.e. should deliver
0337  *  events from its device
0338  * @name: name given to the handle by handler that created it
0339  * @dev: input device the handle is attached to
0340  * @handler: handler that works with the device through this handle
0341  * @d_node: used to put the handle on device's list of attached handles
0342  * @h_node: used to put the handle on handler's list of handles from which
0343  *  it gets events
0344  */
0345 struct input_handle {
0346 
0347     void *private;
0348 
0349     int open;
0350     const char *name;
0351 
0352     struct input_dev *dev;
0353     struct input_handler *handler;
0354 
0355     struct list_head    d_node;
0356     struct list_head    h_node;
0357 };
0358 
0359 struct input_dev __must_check *input_allocate_device(void);
0360 struct input_dev __must_check *devm_input_allocate_device(struct device *);
0361 void input_free_device(struct input_dev *dev);
0362 
0363 static inline struct input_dev *input_get_device(struct input_dev *dev)
0364 {
0365     return dev ? to_input_dev(get_device(&dev->dev)) : NULL;
0366 }
0367 
0368 static inline void input_put_device(struct input_dev *dev)
0369 {
0370     if (dev)
0371         put_device(&dev->dev);
0372 }
0373 
0374 static inline void *input_get_drvdata(struct input_dev *dev)
0375 {
0376     return dev_get_drvdata(&dev->dev);
0377 }
0378 
0379 static inline void input_set_drvdata(struct input_dev *dev, void *data)
0380 {
0381     dev_set_drvdata(&dev->dev, data);
0382 }
0383 
0384 int __must_check input_register_device(struct input_dev *);
0385 void input_unregister_device(struct input_dev *);
0386 
0387 void input_reset_device(struct input_dev *);
0388 
0389 int input_setup_polling(struct input_dev *dev,
0390             void (*poll_fn)(struct input_dev *dev));
0391 void input_set_poll_interval(struct input_dev *dev, unsigned int interval);
0392 void input_set_min_poll_interval(struct input_dev *dev, unsigned int interval);
0393 void input_set_max_poll_interval(struct input_dev *dev, unsigned int interval);
0394 int input_get_poll_interval(struct input_dev *dev);
0395 
0396 int __must_check input_register_handler(struct input_handler *);
0397 void input_unregister_handler(struct input_handler *);
0398 
0399 int __must_check input_get_new_minor(int legacy_base, unsigned int legacy_num,
0400                      bool allow_dynamic);
0401 void input_free_minor(unsigned int minor);
0402 
0403 int input_handler_for_each_handle(struct input_handler *, void *data,
0404                   int (*fn)(struct input_handle *, void *));
0405 
0406 int input_register_handle(struct input_handle *);
0407 void input_unregister_handle(struct input_handle *);
0408 
0409 int input_grab_device(struct input_handle *);
0410 void input_release_device(struct input_handle *);
0411 
0412 int input_open_device(struct input_handle *);
0413 void input_close_device(struct input_handle *);
0414 
0415 int input_flush_device(struct input_handle *handle, struct file *file);
0416 
0417 void input_set_timestamp(struct input_dev *dev, ktime_t timestamp);
0418 ktime_t *input_get_timestamp(struct input_dev *dev);
0419 
0420 void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
0421 void input_inject_event(struct input_handle *handle, unsigned int type, unsigned int code, int value);
0422 
0423 static inline void input_report_key(struct input_dev *dev, unsigned int code, int value)
0424 {
0425     input_event(dev, EV_KEY, code, !!value);
0426 }
0427 
0428 static inline void input_report_rel(struct input_dev *dev, unsigned int code, int value)
0429 {
0430     input_event(dev, EV_REL, code, value);
0431 }
0432 
0433 static inline void input_report_abs(struct input_dev *dev, unsigned int code, int value)
0434 {
0435     input_event(dev, EV_ABS, code, value);
0436 }
0437 
0438 static inline void input_report_ff_status(struct input_dev *dev, unsigned int code, int value)
0439 {
0440     input_event(dev, EV_FF_STATUS, code, value);
0441 }
0442 
0443 static inline void input_report_switch(struct input_dev *dev, unsigned int code, int value)
0444 {
0445     input_event(dev, EV_SW, code, !!value);
0446 }
0447 
0448 static inline void input_sync(struct input_dev *dev)
0449 {
0450     input_event(dev, EV_SYN, SYN_REPORT, 0);
0451 }
0452 
0453 static inline void input_mt_sync(struct input_dev *dev)
0454 {
0455     input_event(dev, EV_SYN, SYN_MT_REPORT, 0);
0456 }
0457 
0458 void input_set_capability(struct input_dev *dev, unsigned int type, unsigned int code);
0459 
0460 /**
0461  * input_set_events_per_packet - tell handlers about the driver event rate
0462  * @dev: the input device used by the driver
0463  * @n_events: the average number of events between calls to input_sync()
0464  *
0465  * If the event rate sent from a device is unusually large, use this
0466  * function to set the expected event rate. This will allow handlers
0467  * to set up an appropriate buffer size for the event stream, in order
0468  * to minimize information loss.
0469  */
0470 static inline void input_set_events_per_packet(struct input_dev *dev, int n_events)
0471 {
0472     dev->hint_events_per_packet = n_events;
0473 }
0474 
0475 void input_alloc_absinfo(struct input_dev *dev);
0476 void input_set_abs_params(struct input_dev *dev, unsigned int axis,
0477               int min, int max, int fuzz, int flat);
0478 void input_copy_abs(struct input_dev *dst, unsigned int dst_axis,
0479             const struct input_dev *src, unsigned int src_axis);
0480 
0481 #define INPUT_GENERATE_ABS_ACCESSORS(_suffix, _item)            \
0482 static inline int input_abs_get_##_suffix(struct input_dev *dev,    \
0483                       unsigned int axis)        \
0484 {                                   \
0485     return dev->absinfo ? dev->absinfo[axis]._item : 0;     \
0486 }                                   \
0487                                     \
0488 static inline void input_abs_set_##_suffix(struct input_dev *dev,   \
0489                        unsigned int axis, int val)  \
0490 {                                   \
0491     input_alloc_absinfo(dev);                   \
0492     if (dev->absinfo)                       \
0493         dev->absinfo[axis]._item = val;             \
0494 }
0495 
0496 INPUT_GENERATE_ABS_ACCESSORS(val, value)
0497 INPUT_GENERATE_ABS_ACCESSORS(min, minimum)
0498 INPUT_GENERATE_ABS_ACCESSORS(max, maximum)
0499 INPUT_GENERATE_ABS_ACCESSORS(fuzz, fuzz)
0500 INPUT_GENERATE_ABS_ACCESSORS(flat, flat)
0501 INPUT_GENERATE_ABS_ACCESSORS(res, resolution)
0502 
0503 int input_scancode_to_scalar(const struct input_keymap_entry *ke,
0504                  unsigned int *scancode);
0505 
0506 int input_get_keycode(struct input_dev *dev, struct input_keymap_entry *ke);
0507 int input_set_keycode(struct input_dev *dev,
0508               const struct input_keymap_entry *ke);
0509 
0510 bool input_match_device_id(const struct input_dev *dev,
0511                const struct input_device_id *id);
0512 
0513 void input_enable_softrepeat(struct input_dev *dev, int delay, int period);
0514 
0515 bool input_device_enabled(struct input_dev *dev);
0516 
0517 extern struct class input_class;
0518 
0519 /**
0520  * struct ff_device - force-feedback part of an input device
0521  * @upload: Called to upload an new effect into device
0522  * @erase: Called to erase an effect from device
0523  * @playback: Called to request device to start playing specified effect
0524  * @set_gain: Called to set specified gain
0525  * @set_autocenter: Called to auto-center device
0526  * @destroy: called by input core when parent input device is being
0527  *  destroyed
0528  * @private: driver-specific data, will be freed automatically
0529  * @ffbit: bitmap of force feedback capabilities truly supported by
0530  *  device (not emulated like ones in input_dev->ffbit)
0531  * @mutex: mutex for serializing access to the device
0532  * @max_effects: maximum number of effects supported by device
0533  * @effects: pointer to an array of effects currently loaded into device
0534  * @effect_owners: array of effect owners; when file handle owning
0535  *  an effect gets closed the effect is automatically erased
0536  *
0537  * Every force-feedback device must implement upload() and playback()
0538  * methods; erase() is optional. set_gain() and set_autocenter() need
0539  * only be implemented if driver sets up FF_GAIN and FF_AUTOCENTER
0540  * bits.
0541  *
0542  * Note that playback(), set_gain() and set_autocenter() are called with
0543  * dev->event_lock spinlock held and interrupts off and thus may not
0544  * sleep.
0545  */
0546 struct ff_device {
0547     int (*upload)(struct input_dev *dev, struct ff_effect *effect,
0548               struct ff_effect *old);
0549     int (*erase)(struct input_dev *dev, int effect_id);
0550 
0551     int (*playback)(struct input_dev *dev, int effect_id, int value);
0552     void (*set_gain)(struct input_dev *dev, u16 gain);
0553     void (*set_autocenter)(struct input_dev *dev, u16 magnitude);
0554 
0555     void (*destroy)(struct ff_device *);
0556 
0557     void *private;
0558 
0559     unsigned long ffbit[BITS_TO_LONGS(FF_CNT)];
0560 
0561     struct mutex mutex;
0562 
0563     int max_effects;
0564     struct ff_effect *effects;
0565     struct file *effect_owners[];
0566 };
0567 
0568 int input_ff_create(struct input_dev *dev, unsigned int max_effects);
0569 void input_ff_destroy(struct input_dev *dev);
0570 
0571 int input_ff_event(struct input_dev *dev, unsigned int type, unsigned int code, int value);
0572 
0573 int input_ff_upload(struct input_dev *dev, struct ff_effect *effect, struct file *file);
0574 int input_ff_erase(struct input_dev *dev, int effect_id, struct file *file);
0575 int input_ff_flush(struct input_dev *dev, struct file *file);
0576 
0577 int input_ff_create_memless(struct input_dev *dev, void *data,
0578         int (*play_effect)(struct input_dev *, void *, struct ff_effect *));
0579 
0580 #endif