#include <linux/hid.h>
#include <linux/input.h>
#include <linux/slab.h>
#include <linux/module.h>
#include "hid-ids.h"
#define THRUSTMASTER_DEVICE_ID_2_IN_1_DT …
static const signed short ff_rumble[] = …;
static const signed short ff_joystick[] = …;
#ifdef CONFIG_THRUSTMASTER_FF
#define THRUSTMASTER_USAGE_FF …
struct tmff_device { … };
static inline int tmff_scale_u16(unsigned int in, int minimum, int maximum)
{ … }
static inline int tmff_scale_s8(int in, int minimum, int maximum)
{ … }
static int tmff_play(struct input_dev *dev, void *data,
struct ff_effect *effect)
{ … }
static int tmff_init(struct hid_device *hid, const signed short *ff_bits)
{ … }
#else
static inline int tmff_init(struct hid_device *hid, const signed short *ff_bits)
{
return 0;
}
#endif
static int tm_probe(struct hid_device *hdev, const struct hid_device_id *id)
{ … }
static const struct hid_device_id tm_devices[] = …;
MODULE_DEVICE_TABLE(hid, tm_devices);
static struct hid_driver tm_driver = …;
module_hid_driver(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;