linux/drivers/hid/hid-tmff.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Force feedback support for various HID compliant devices by ThrustMaster:
 *    ThrustMaster FireStorm Dual Power 2
 * and possibly others whose device ids haven't been added.
 *
 *  Modified to support ThrustMaster devices by Zinx Verituse
 *  on 2003-01-25 from the Logitech force feedback driver,
 *  which is by Johann Deneux.
 *
 *  Copyright (c) 2003 Zinx Verituse <[email protected]>
 *  Copyright (c) 2002 Johann Deneux
 */

/*
 */

#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

/* Usages for thrustmaster devices I know about */
#define THRUSTMASTER_USAGE_FF

struct tmff_device {};

/* Changes values from 0 to 0xffff into values from minimum to maximum */
static inline int tmff_scale_u16(unsigned int in, int minimum, int maximum)
{}

/* Changes values from -0x80 to 0x7f into values from minimum to 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();