linux/drivers/input/joystick/spaceball.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 *  Copyright (c) 1999-2001 Vojtech Pavlik
 *
 *  Based on the work of:
 *	David Thompson
 *	Joseph Krahn
 */

/*
 * SpaceTec SpaceBall 2003/3003/4000 FLX driver for Linux
 */

#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/input.h>
#include <linux/serio.h>
#include <linux/unaligned.h>

#define DRIVER_DESC

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

/*
 * Constants.
 */

#define SPACEBALL_MAX_LENGTH
#define SPACEBALL_MAX_ID

#define SPACEBALL_1003
#define SPACEBALL_2003B
#define SPACEBALL_2003C
#define SPACEBALL_3003C
#define SPACEBALL_4000FLX
#define SPACEBALL_4000FLX_L

static int spaceball_axes[] =;
static char *spaceball_names[] =;

/*
 * Per-Ball data.
 */

struct spaceball {};

/*
 * spaceball_process_packet() decodes packets the driver receives from the
 * SpaceBall.
 */

static void spaceball_process_packet(struct spaceball* spaceball)
{}

/*
 * Spaceball 4000 FLX packets all start with a one letter packet-type decriptor,
 * and end in 0x0d. It uses '^' as an escape for CR, XOFF and XON characters which
 * can occur in the axis values.
 */

static irqreturn_t spaceball_interrupt(struct serio *serio,
		unsigned char data, unsigned int flags)
{}

/*
 * spaceball_disconnect() is the opposite of spaceball_connect()
 */

static void spaceball_disconnect(struct serio *serio)
{}

/*
 * spaceball_connect() is the routine that is called when someone adds a
 * new serio device that supports Spaceball protocol and registers it as
 * an input device.
 */

static int spaceball_connect(struct serio *serio, struct serio_driver *drv)
{}

/*
 * The serio driver structure.
 */

static const struct serio_device_id spaceball_serio_ids[] =;

MODULE_DEVICE_TABLE(serio, spaceball_serio_ids);

static struct serio_driver spaceball_drv =;

module_serio_driver();