linux/drivers/usb/misc/idmouse.c

// SPDX-License-Identifier: GPL-2.0+
/* Siemens ID Mouse driver v0.6

  Copyright (C) 2004-5 by Florian 'Floe' Echtler  <[email protected]>
                      and Andreas  'ad'  Deresch <[email protected]>

  Derived from the USB Skeleton driver 1.1,
  Copyright (C) 2003 Greg Kroah-Hartman ([email protected])

  Additional information provided by Martin Reising
  <[email protected]>

*/

#include <linux/kernel.h>
#include <linux/sched/signal.h>
#include <linux/errno.h>
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/completion.h>
#include <linux/mutex.h>
#include <linux/uaccess.h>
#include <linux/usb.h>

/* image constants */
#define WIDTH
#define HEIGHT
#define HEADER
#define IMGSIZE

#define DRIVER_SHORT
#define DRIVER_AUTHOR
#define DRIVER_DESC

/* minor number for misc USB devices */
#define USB_IDMOUSE_MINOR_BASE

/* vendor and device IDs */
#define ID_SIEMENS
#define ID_IDMOUSE
#define ID_CHERRY

/* device ID table */
static const struct usb_device_id idmouse_table[] =;

/* sensor commands */
#define FTIP_RESET
#define FTIP_ACQUIRE
#define FTIP_RELEASE
#define FTIP_BLINK
#define FTIP_SCROLL

#define ftip_command(dev, command, value, index)

MODULE_DEVICE_TABLE(usb, idmouse_table);

/* structure to hold all of our device specific stuff */
struct usb_idmouse {};

/* local function prototypes */
static ssize_t idmouse_read(struct file *file, char __user *buffer,
				size_t count, loff_t * ppos);

static int idmouse_open(struct inode *inode, struct file *file);
static int idmouse_release(struct inode *inode, struct file *file);

static int idmouse_probe(struct usb_interface *interface,
				const struct usb_device_id *id);

static void idmouse_disconnect(struct usb_interface *interface);
static int idmouse_suspend(struct usb_interface *intf, pm_message_t message);
static int idmouse_resume(struct usb_interface *intf);

/* file operation pointers */
static const struct file_operations idmouse_fops =;

/* class driver information */
static struct usb_class_driver idmouse_class =;

/* usb specific object needed to register this driver with the usb subsystem */
static struct usb_driver idmouse_driver =;

static int idmouse_create_image(struct usb_idmouse *dev)
{}

/* PM operations are nops as this driver does IO only during open() */
static int idmouse_suspend(struct usb_interface *intf, pm_message_t message)
{}

static int idmouse_resume(struct usb_interface *intf)
{}

static inline void idmouse_delete(struct usb_idmouse *dev)
{}

static int idmouse_open(struct inode *inode, struct file *file)
{}

static int idmouse_release(struct inode *inode, struct file *file)
{}

static ssize_t idmouse_read(struct file *file, char __user *buffer, size_t count,
				loff_t * ppos)
{}

static int idmouse_probe(struct usb_interface *interface,
				const struct usb_device_id *id)
{}

static void idmouse_disconnect(struct usb_interface *interface)
{}

module_usb_driver();

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