#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/gameport.h>
#include <linux/input.h>
#include <linux/jiffies.h>
#define DRIVER_DESC …
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
#define TMDC_MAX_START …
#define TMDC_MAX_STROBE …
#define TMDC_MAX_LENGTH …
#define TMDC_MODE_M3DI …
#define TMDC_MODE_3DRP …
#define TMDC_MODE_AT …
#define TMDC_MODE_FM …
#define TMDC_MODE_FGP …
#define TMDC_BYTE_ID …
#define TMDC_BYTE_REV …
#define TMDC_BYTE_DEF …
#define TMDC_ABS …
#define TMDC_ABS_HAT …
#define TMDC_BTN …
static const unsigned char tmdc_byte_a[16] = …;
static const unsigned char tmdc_byte_d[16] = …;
static const signed char tmdc_abs[TMDC_ABS] = …;
static const signed char tmdc_abs_hat[TMDC_ABS_HAT] = …;
static const signed char tmdc_abs_at[TMDC_ABS] = …;
static const signed char tmdc_abs_fm[TMDC_ABS] = …;
static const short tmdc_btn_pad[TMDC_BTN] = …;
static const short tmdc_btn_joy[TMDC_BTN] = …;
static const short tmdc_btn_fm[TMDC_BTN] = …;
static const short tmdc_btn_at[TMDC_BTN] = …;
static const struct { … } tmdc_hat_to_axis[] = …;
static const struct tmdc_model { … } tmdc_models[] = …;
struct tmdc_port { … };
struct tmdc { … };
static int tmdc_read_packet(struct gameport *gameport, unsigned char data[2][TMDC_MAX_LENGTH])
{ … }
static int tmdc_parse_packet(struct tmdc_port *port, unsigned char *data)
{ … }
static void tmdc_poll(struct gameport *gameport)
{ … }
static int tmdc_open(struct input_dev *dev)
{ … }
static void tmdc_close(struct input_dev *dev)
{ … }
static int tmdc_setup_port(struct tmdc *tmdc, int idx, unsigned char *data)
{ … }
static int tmdc_connect(struct gameport *gameport, struct gameport_driver *drv)
{ … }
static void tmdc_disconnect(struct gameport *gameport)
{ … }
static struct gameport_driver tmdc_drv = …;
module_gameport_driver(…) …;