linux/drivers/usb/misc/cypress_cy7c63.c

// SPDX-License-Identifier: GPL-2.0
/*
* cypress_cy7c63.c
*
* Copyright (c) 2006-2007 Oliver Bock ([email protected])
*
*	This driver is based on the Cypress USB Driver by Marcus Maul
*	(cyport) and the 2.0 version of Greg Kroah-Hartman's
*	USB Skeleton driver.
*
*	This is a generic driver for the Cypress CY7C63xxx family.
*	For the time being it enables you to read from and write to
*	the single I/O ports of the device.
*
*	Supported vendors:	AK Modul-Bus Computer GmbH
*				(Firmware "Port-Chip")
*
*	Supported devices:	CY7C63001A-PC
*				CY7C63001C-PXC
*				CY7C63001C-SXC
*
*	Supported functions:	Read/Write Ports
*
*
*	For up-to-date information please visit:
*	http://www.obock.de/kernel/cypress
*/

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

#define DRIVER_AUTHOR
#define DRIVER_DESC

#define CYPRESS_VENDOR_ID
#define CYPRESS_PRODUCT_ID

#define CYPRESS_READ_PORT
#define CYPRESS_WRITE_PORT

#define CYPRESS_READ_RAM
#define CYPRESS_WRITE_RAM
#define CYPRESS_READ_ROM

#define CYPRESS_READ_PORT_ID0
#define CYPRESS_WRITE_PORT_ID0
#define CYPRESS_READ_PORT_ID1
#define CYPRESS_WRITE_PORT_ID1

#define CYPRESS_MAX_REQSIZE


/* table of devices that work with this driver */
static const struct usb_device_id cypress_table[] =;
MODULE_DEVICE_TABLE(usb, cypress_table);

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

/* used to send usb control messages to device */
static int vendor_command(struct cypress *dev, unsigned char request,
			  unsigned char address, unsigned char data)
{}

/* write port value */
static ssize_t write_port(struct device *dev, struct device_attribute *attr,
			  const char *buf, size_t count,
			  int port_num, int write_id)
{}

/* attribute callback handler (write) */
static ssize_t port0_store(struct device *dev,
				 struct device_attribute *attr,
				 const char *buf, size_t count)
{}

/* attribute callback handler (write) */
static ssize_t port1_store(struct device *dev,
				 struct device_attribute *attr,
				 const char *buf, size_t count)
{}

/* read port value */
static ssize_t read_port(struct device *dev, struct device_attribute *attr,
			 char *buf, int port_num, int read_id)
{}

/* attribute callback handler (read) */
static ssize_t port0_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RW(port0);

/* attribute callback handler (read) */
static ssize_t port1_show(struct device *dev,
				 struct device_attribute *attr, char *buf)
{}
static DEVICE_ATTR_RW(port1);

static struct attribute *cypress_attrs[] =;
ATTRIBUTE_GROUPS();

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

static void cypress_disconnect(struct usb_interface *interface)
{}

static struct usb_driver cypress_driver =;

module_usb_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();

MODULE_LICENSE();