linux/drivers/input/joystick/adi.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Copyright (c) 1998-2005 Vojtech Pavlik
 */

/*
 * Logitech ADI joystick family driver for Linux
 */

#include <linux/delay.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/string.h>
#include <linux/slab.h>
#include <linux/input.h>
#include <linux/gameport.h>
#include <linux/jiffies.h>

#define DRIVER_DESC

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();

/*
 * Times, array sizes, flags, ids.
 */

#define ADI_MAX_START
#define ADI_MAX_STROBE
#define ADI_INIT_DELAY
#define ADI_DATA_DELAY

#define ADI_MAX_LENGTH
#define ADI_MIN_LENGTH
#define ADI_MIN_LEN_LENGTH
#define ADI_MIN_ID_LENGTH
#define ADI_MAX_NAME_LENGTH
#define ADI_MAX_CNAME_LENGTH
#define ADI_MAX_PHYS_LENGTH

#define ADI_FLAG_HAT
#define ADI_FLAG_10BIT

#define ADI_ID_TPD
#define ADI_ID_WGP
#define ADI_ID_WGPE
#define ADI_ID_MAX

/*
 * Names, buttons, axes ...
 */

static char *adi_names[] =;

static char adi_wmgpe_abs[] =;
static char adi_wmi_abs[] =;
static char adi_wmed3d_abs[] =;
static char adi_cm2_abs[] =;
static char adi_wmf_abs[] =;

static short adi_wmgpe_key[] =;
static short adi_wmi_key[] =;
static short adi_wmed3d_key[] =;
static short adi_cm2_key[] =;

static char* adi_abs[] =;

static short* adi_key[] =;

/*
 * Hat to axis conversion arrays.
 */

static struct {} adi_hat_to_axis[] =;

/*
 * Per-port information.
 */

struct adi {};

struct adi_port {};

/*
 * adi_read_packet() reads a Logitech ADI packet.
 */

static void adi_read_packet(struct adi_port *port)
{}

/*
 * adi_move_bits() detects a possible 2-stream mode, and moves
 * the bits accordingly.
 */

static void adi_move_bits(struct adi_port *port, int length)
{}

/*
 * adi_get_bits() gathers bits from the data packet.
 */

static inline int adi_get_bits(struct adi *adi, int count)
{}

/*
 * adi_decode() decodes Logitech joystick data into input events.
 */

static int adi_decode(struct adi *adi)
{}

/*
 * adi_read() reads the data packet and decodes it.
 */

static int adi_read(struct adi_port *port)
{}

/*
 * adi_poll() repeatedly polls the Logitech joysticks.
 */

static void adi_poll(struct gameport *gameport)
{}

/*
 * adi_open() is a callback from the input open routine.
 */

static int adi_open(struct input_dev *dev)
{}

/*
 * adi_close() is a callback from the input close routine.
 */

static void adi_close(struct input_dev *dev)
{}

/*
 * adi_init_digital() sends a trigger & delay sequence
 * to reset and initialize a Logitech joystick into digital mode.
 */

static void adi_init_digital(struct gameport *gameport)
{}

static void adi_id_decode(struct adi *adi, struct adi_port *port)
{}

static int adi_init_input(struct adi *adi, struct adi_port *port, int half)
{}

static void adi_init_center(struct adi *adi)
{}

/*
 * adi_connect() probes for Logitech ADI joysticks.
 */

static int adi_connect(struct gameport *gameport, struct gameport_driver *drv)
{}

static void adi_disconnect(struct gameport *gameport)
{}

static struct gameport_driver adi_drv =;

module_gameport_driver();