linux/drivers/usb/misc/uss720.c

// SPDX-License-Identifier: GPL-2.0+
/*****************************************************************************/

/*
 *	uss720.c  --  USS720 USB Parport Cable.
 *
 *	Copyright (C) 1999, 2005, 2010
 *	    Thomas Sailer ([email protected])
 *
 *  Based on parport_pc.c
 *
 *  History:
 *   0.1  04.08.1999  Created
 *   0.2  07.08.1999  Some fixes mainly suggested by Tim Waugh
 *		      Interrupt handling currently disabled because
 *		      usb_request_irq crashes somewhere within ohci.c
 *		      for no apparent reason (that is for me, anyway)
 *		      ECP currently untested
 *   0.3  10.08.1999  fixing merge errors
 *   0.4  13.08.1999  Added Vendor/Product ID of Brad Hard's cable
 *   0.5  20.09.1999  usb_control_msg wrapper used
 *        Nov01.2000  usb_device_table support by Adam J. Richter
 *        08.04.2001  Identify version on module load.  gb
 *   0.6  02.09.2005  Fix "scheduling in interrupt" problem by making save/restore
 *                    context asynchronous
 *
 */

/*****************************************************************************/

#include <linux/module.h>
#include <linux/socket.h>
#include <linux/parport.h>
#include <linux/init.h>
#include <linux/usb.h>
#include <linux/delay.h>
#include <linux/completion.h>
#include <linux/kref.h>
#include <linux/slab.h>
#include <linux/sched/signal.h>

#define DRIVER_AUTHOR
#define DRIVER_DESC

/* --------------------------------------------------------------------- */

struct parport_uss720_private {};

struct uss720_async_request {};

/* --------------------------------------------------------------------- */

static void destroy_priv(struct kref *kref)
{}

static void destroy_async(struct kref *kref)
{}

/* --------------------------------------------------------------------- */

static void async_complete(struct urb *urb)
{}

static struct uss720_async_request *submit_async_request(struct parport_uss720_private *priv,
							 __u8 request, __u8 requesttype, __u16 value, __u16 index,
							 gfp_t mem_flags)
{}

static unsigned int kill_all_async_requests_priv(struct parport_uss720_private *priv)
{}

/* --------------------------------------------------------------------- */

static int get_1284_register(struct parport *pp, unsigned char reg, unsigned char *val, gfp_t mem_flags)
{}

static int set_1284_register(struct parport *pp, unsigned char reg, unsigned char val, gfp_t mem_flags)
{}

/* --------------------------------------------------------------------- */

/* ECR modes */
#define ECR_SPP
#define ECR_PS2
#define ECR_PPF
#define ECR_ECP
#define ECR_EPP

/* Safely change the mode bits in the ECR */
static int change_mode(struct parport *pp, int m)
{}

/*
 * Clear TIMEOUT BIT in EPP MODE
 */
static int clear_epp_timeout(struct parport *pp)
{}

/*
 * Access functions.
 */
#if 0
static int uss720_irq(int usbstatus, void *buffer, int len, void *dev_id)
{
	struct parport *pp = (struct parport *)dev_id;
	struct parport_uss720_private *priv = pp->private_data;	

	if (usbstatus != 0 || len < 4 || !buffer)
		return 1;
	memcpy(priv->reg, buffer, 4);
	/* if nAck interrupts are enabled and we have an interrupt, call the interrupt procedure */
	if (priv->reg[2] & priv->reg[1] & 0x10)
		parport_generic_irq(pp);
	return 1;
}
#endif

static void parport_uss720_write_data(struct parport *pp, unsigned char d)
{}

static unsigned char parport_uss720_read_data(struct parport *pp)
{}

static void parport_uss720_write_control(struct parport *pp, unsigned char d)
{}

static unsigned char parport_uss720_read_control(struct parport *pp)
{}

static unsigned char parport_uss720_frob_control(struct parport *pp, unsigned char mask, unsigned char val)
{}

static unsigned char parport_uss720_read_status(struct parport *pp)
{}

static void parport_uss720_disable_irq(struct parport *pp)
{}

static void parport_uss720_enable_irq(struct parport *pp)
{}

static void parport_uss720_data_forward (struct parport *pp)
{}

static void parport_uss720_data_reverse (struct parport *pp)
{}

static void parport_uss720_init_state(struct pardevice *dev, struct parport_state *s)
{}

static void parport_uss720_save_state(struct parport *pp, struct parport_state *s)
{}

static void parport_uss720_restore_state(struct parport *pp, struct parport_state *s)
{}

static size_t parport_uss720_epp_read_data(struct parport *pp, void *buf, size_t length, int flags)
{}

static size_t parport_uss720_epp_write_data(struct parport *pp, const void *buf, size_t length, int flags)
{}

static size_t parport_uss720_epp_read_addr(struct parport *pp, void *buf, size_t length, int flags)
{}

static size_t parport_uss720_epp_write_addr(struct parport *pp, const void *buf, size_t length, int flags)
{}

static size_t parport_uss720_ecp_write_data(struct parport *pp, const void *buffer, size_t len, int flags)
{}

static size_t parport_uss720_ecp_read_data(struct parport *pp, void *buffer, size_t len, int flags)
{}

static size_t parport_uss720_ecp_write_addr(struct parport *pp, const void *buffer, size_t len, int flags)
{}

static size_t parport_uss720_write_compat(struct parport *pp, const void *buffer, size_t len, int flags)
{}

/* --------------------------------------------------------------------- */

static struct parport_operations parport_uss720_ops =;

/* --------------------------------------------------------------------- */

static int uss720_probe(struct usb_interface *intf,
			const struct usb_device_id *id)
{}

static void uss720_disconnect(struct usb_interface *intf)
{}

/* table of cables that work through this driver */
static const struct usb_device_id uss720_table[] =;

MODULE_DEVICE_TABLE (usb, uss720_table);


static struct usb_driver uss720_driver =;

/* --------------------------------------------------------------------- */

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

static int __init uss720_init(void)
{}

static void __exit uss720_cleanup(void)
{}

module_init();
module_exit(uss720_cleanup);

/* --------------------------------------------------------------------- */