linux/drivers/hid/hid-lg3ff.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Force feedback support for Logitech Flight System G940
 *
 *  Copyright (c) 2009 Gary Stein <[email protected]>
 */

/*
 */


#include <linux/input.h>
#include <linux/hid.h>

#include "hid-lg.h"

/*
 * G940 Theory of Operation (from experimentation)
 *
 * There are 63 fields (only 3 of them currently used)
 * 0 - seems to be command field
 * 1 - 30 deal with the x axis
 * 31 -60 deal with the y axis
 *
 * Field 1 is x axis constant force
 * Field 31 is y axis constant force
 *
 * other interesting fields 1,2,3,4 on x axis
 * (same for 31,32,33,34 on y axis)
 *
 * 0 0 127 127 makes the joystick autocenter hard
 *
 * 127 0 127 127 makes the joystick loose on the right,
 * but stops all movemnt left
 *
 * -127 0 -127 -127 makes the joystick loose on the left,
 * but stops all movement right
 *
 * 0 0 -127 -127 makes the joystick rattle very hard
 *
 * I'm sure these are effects that I don't know enough about them
 */

static int hid_lg3ff_play(struct input_dev *dev, void *data,
			 struct ff_effect *effect)
{}
static void hid_lg3ff_set_autocenter(struct input_dev *dev, u16 magnitude)
{}


static const signed short ff3_joystick_ac[] =;

int lg3ff_init(struct hid_device *hid)
{}