#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)
{ … }
#define ECR_SPP …
#define ECR_PS2 …
#define ECR_PPF …
#define ECR_ECP …
#define ECR_EPP …
static int change_mode(struct parport *pp, int m)
{ … }
static int clear_epp_timeout(struct parport *pp)
{ … }
#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 (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)
{ … }
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);