AlcapDAQ
1
|
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/signal.h>
#include <linux/sched.h>
#include <linux/errno.h>
#include <linux/random.h>
#include <linux/poll.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/usb.h>
#include <linux/version.h>
#include <linux/smp_lock.h>
#include "CAENUSBdrvB.h"
Go to the source code of this file.
Data Structures | |
struct | v1718_usb_data |
Macros | |
#define | DRIVER_VERSION "1.2" |
#define | DRIVER_AUTHOR "CAEN Computing Division <support.computing@caen.it>" |
#define | DRIVER_DESC "CAEN USB driver" |
#define | V1718_MINOR_BASE 178 |
#define | NAK_TIMEOUT (HZ) |
#define | IBUF_SIZE 0x10000 /* 64 kbytes */ |
#define | OBUF_SIZE 0x10000 /* 64 kbytes */ |
#define | MAX_DEVICES 16 |
#define | VERSION(ver, rel, seq) (((ver)<<16) | ((rel)<<8) | (seq)) |
Functions | |
static | DECLARE_MUTEX (minor_table_mutex) |
static void | v1718_delete (struct v1718_usb_data *v1718) |
static int | open_v1718 (struct inode *inode, struct file *file) |
static int | close_v1718 (struct inode *inode, struct file *file) |
static int | ioctl_v1718 (struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) |
static ssize_t | write_v1718 (struct file *file, const char *buffer, size_t count, loff_t *ppos) |
static ssize_t | read_v1718 (struct file *file, char *buffer, size_t count, loff_t *ppos) |
static int | probe_v1718 (struct usb_interface *intf, const struct usb_device_id *id) |
static void | disconnect_v1718 (struct usb_interface *intf) |
MODULE_DEVICE_TABLE (usb, v1718_table) | |
static int __init | usb_v1718_init (void) |
static void __exit | usb_v1718_cleanup (void) |
module_init (usb_v1718_init) | |
module_exit (usb_v1718_cleanup) | |
MODULE_AUTHOR (DRIVER_AUTHOR) | |
MODULE_DESCRIPTION (DRIVER_DESC) | |
MODULE_LICENSE ("GPL") | |
Variables | |
static struct v1718_usb_data * | minor_table [MAX_DEVICES] |
static struct file_operations | usb_v1718_fops |
static struct usb_class_driver | usb_v1718_class |
static struct usb_device_id | v1718_table [] |
static struct usb_driver | v1718_driver |
#define DRIVER_AUTHOR "CAEN Computing Division <support.computing@caen.it>" |
Definition at line 42 of file CAENUSBdrvB.c.
#define DRIVER_DESC "CAEN USB driver" |
Definition at line 43 of file CAENUSBdrvB.c.
Referenced by usb_v1718_init().
#define DRIVER_VERSION "1.2" |
Definition at line 41 of file CAENUSBdrvB.c.
Referenced by ioctl_v1718(), and usb_v1718_init().
#define IBUF_SIZE 0x10000 /* 64 kbytes */ |
Definition at line 50 of file CAENUSBdrvB.c.
Referenced by probe_v1718(), and read_v1718().
#define MAX_DEVICES 16 |
Definition at line 56 of file CAENUSBdrvB.c.
Referenced by open_v1718(), probe_v1718(), and v1718_delete().
#define NAK_TIMEOUT (HZ) |
Definition at line 48 of file CAENUSBdrvB.c.
Referenced by read_v1718(), and write_v1718().
#define OBUF_SIZE 0x10000 /* 64 kbytes */ |
Definition at line 53 of file CAENUSBdrvB.c.
Referenced by probe_v1718(), and write_v1718().
#define V1718_MINOR_BASE 178 |
Definition at line 45 of file CAENUSBdrvB.c.
Referenced by open_v1718().
Definition at line 62 of file CAENUSBdrvB.c.
|
static |
Definition at line 193 of file CAENUSBdrvB.c.
References v1718_usb_data::lock, v1718_usb_data::open_count, v1718_delete(), and v1718_usb_data::v1718_dev.
|
static |
|
static |
Definition at line 619 of file CAENUSBdrvB.c.
References v1718_usb_data::lock, v1718_usb_data::minor, v1718_usb_data::open_count, v1718_delete(), and v1718_usb_data::v1718_dev.
|
static |
Definition at line 228 of file CAENUSBdrvB.c.
References DRIVER_VERSION, v1718_usb_data::lock, v1718_usb_data::present, v1718_rev_t::rev_buf, v1718_usb_data::v1718_dev, V1718_IOCTL_REBOOTB, V1718_IOCTL_REBOOTF, and V1718_IOCTL_REV.
MODULE_AUTHOR | ( | DRIVER_AUTHOR | ) |
MODULE_DESCRIPTION | ( | DRIVER_DESC | ) |
MODULE_DEVICE_TABLE | ( | usb | , |
v1718_table | |||
) |
module_exit | ( | usb_v1718_cleanup | ) |
module_init | ( | usb_v1718_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |
|
static |
Definition at line 153 of file CAENUSBdrvB.c.
References v1718_usb_data::lock, MAX_DEVICES, v1718_usb_data::minor, v1718_usb_data::open_count, V1718_MINOR_BASE, and v1718_usb_data::wait_q.
|
static |
Definition at line 534 of file CAENUSBdrvB.c.
References dev, v1718_usb_data::ibuf, IBUF_SIZE, v1718_usb_data::lock, MAX_DEVICES, v1718_usb_data::minor, v1718_usb_data::obuf, OBUF_SIZE, v1718_usb_data::present, v1718_delete(), and v1718_usb_data::v1718_dev.
|
static |
Definition at line 397 of file CAENUSBdrvB.c.
References v1718_usb_data::ibuf, IBUF_SIZE, v1718_usb_data::lock, NAK_TIMEOUT, v1718_usb_data::present, v1718_usb_data::v1718_dev, and v1718_usb_data::wait_q.
|
static |
Definition at line 679 of file CAENUSBdrvB.c.
|
static |
|
static |
Definition at line 132 of file CAENUSBdrvB.c.
References i, v1718_usb_data::ibuf, MAX_DEVICES, v1718_usb_data::minor, and v1718_usb_data::obuf.
Referenced by close_v1718(), disconnect_v1718(), and probe_v1718().
|
static |
Definition at line 310 of file CAENUSBdrvB.c.
References v1718_usb_data::lock, NAK_TIMEOUT, v1718_usb_data::obuf, OBUF_SIZE, v1718_usb_data::present, v1718_usb_data::v1718_dev, and v1718_usb_data::wait_q.
|
static |
Definition at line 123 of file CAENUSBdrvB.c.
|
static |
Definition at line 525 of file CAENUSBdrvB.c.
|
static |
Definition at line 510 of file CAENUSBdrvB.c.
|
static |
Definition at line 659 of file CAENUSBdrvB.c.
|
static |
Definition at line 649 of file CAENUSBdrvB.c.