linux/drivers/input/misc/keyspan_remote.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * keyspan_remote: USB driver for the Keyspan DMR
 *
 * Copyright (C) 2005 Zymeta Corporation - Michael Downey ([email protected])
 *
 * This driver has been put together with the support of Innosys, Inc.
 * and Keyspan, Inc the manufacturers of the Keyspan USB DMR product.
 */

#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/usb/input.h>

/* Parameters that can be passed to the driver. */
static int debug;
module_param(debug, int, 0444);
MODULE_PARM_DESC();

/* Vendor and product ids */
#define USB_KEYSPAN_VENDOR_ID
#define USB_KEYSPAN_PRODUCT_UIA11

/* Defines for converting the data from the remote. */
#define ZERO
#define ZERO_MASK
#define ONE
#define ONE_MASK
#define SYNC
#define SYNC_MASK
#define STOP
#define STOP_MASK
#define GAP

#define RECV_SIZE

/*
 * Table that maps the 31 possible keycodes to input keys.
 * Currently there are 15 and 17 button models so RESERVED codes
 * are blank areas in the mapping.
 */
static const unsigned short keyspan_key_table[] =;

/* table of devices that work with this driver */
static const struct usb_device_id keyspan_table[] =;

/* Structure to store all the real stuff that a remote sends to us. */
struct keyspan_message {};

/* Structure used for all the bit testing magic needed to be done. */
struct bit_tester {};

/* Structure to hold all of our driver specific stuff */
struct usb_keyspan {};

static struct usb_driver keyspan_driver;

/*
 * Debug routine that prints out what we've received from the remote.
 */
static void keyspan_print(struct usb_keyspan* dev) /*unsigned char* data)*/
{}

/*
 * Routine that manages the bit_tester structure.  It makes sure that there are
 * at least bits_needed bits loaded into the tester.
 */
static int keyspan_load_tester(struct usb_keyspan* dev, int bits_needed)
{}

static void keyspan_report_button(struct usb_keyspan *remote, int button, int press)
{}

/*
 * Routine that handles all the logic needed to parse out the message from the remote.
 */
static void keyspan_check_data(struct usb_keyspan *remote)
{}

/*
 * Routine for sending all the initialization messages to the remote.
 */
static int keyspan_setup(struct usb_device* dev)
{}

/*
 * Routine used to handle a new message that has come in.
 */
static void keyspan_irq_recv(struct urb *urb)
{}

static int keyspan_open(struct input_dev *dev)
{}

static void keyspan_close(struct input_dev *dev)
{}

static struct usb_endpoint_descriptor *keyspan_get_in_endpoint(struct usb_host_interface *iface)
{}

/*
 * Routine that sets up the driver to handle a specific USB device detected on the bus.
 */
static int keyspan_probe(struct usb_interface *interface, const struct usb_device_id *id)
{}

/*
 * Routine called when a device is disconnected from the USB.
 */
static void keyspan_disconnect(struct usb_interface *interface)
{}

/*
 * Standard driver set up sections
 */
static struct usb_driver keyspan_driver =;

module_usb_driver();

MODULE_DEVICE_TABLE(usb, keyspan_table);
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();