#define pr_fmt(fmt) …
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <linux/jiffies.h>
#include <linux/fixp-arith.h>
MODULE_LICENSE(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
#define FF_MEMLESS_EFFECTS …
#define FF_ENVELOPE_INTERVAL …
#define FF_EFFECT_STARTED …
#define FF_EFFECT_PLAYING …
#define FF_EFFECT_ABORTING …
struct ml_effect_state { … };
struct ml_device { … };
static const struct ff_envelope *get_envelope(const struct ff_effect *effect)
{ … }
static unsigned long calculate_next_time(struct ml_effect_state *state)
{ … }
static void ml_schedule_timer(struct ml_device *ml)
{ … }
static int apply_envelope(struct ml_effect_state *state, int value,
struct ff_envelope *envelope)
{ … }
static int get_compatible_type(struct ff_device *ff, int effect_type)
{ … }
static u16 ml_calculate_direction(u16 direction, u16 force,
u16 new_direction, u16 new_force)
{ … }
#define FRAC_N …
static inline s16 fixp_new16(s16 a)
{ … }
static inline s16 fixp_mult(s16 a, s16 b)
{ … }
static void ml_combine_effects(struct ff_effect *effect,
struct ml_effect_state *state,
int gain)
{ … }
static int ml_get_combo_effect(struct ml_device *ml,
unsigned long *effect_handled,
struct ff_effect *combo_effect)
{ … }
static void ml_play_effects(struct ml_device *ml)
{ … }
static void ml_effect_timer(struct timer_list *t)
{ … }
static void ml_ff_set_gain(struct input_dev *dev, u16 gain)
{ … }
static int ml_ff_playback(struct input_dev *dev, int effect_id, int value)
{ … }
static int ml_ff_upload(struct input_dev *dev,
struct ff_effect *effect, struct ff_effect *old)
{ … }
static void ml_ff_destroy(struct ff_device *ff)
{ … }
int input_ff_create_memless(struct input_dev *dev, void *data,
int (*play_effect)(struct input_dev *, void *, struct ff_effect *))
{ … }
EXPORT_SYMBOL_GPL(…);