nidas
v1.2-1520
|
#include "usbtwod.h"
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/usb.h>
#include <linux/poll.h>
#include <linux/timer.h>
#include <linux/moduleparam.h>
#include <nidas/linux/klog.h>
#include <nidas/linux/Revision.h>
Macros | |
#define | REPO_REVISION "unknown" |
#define | NCAR_VENDOR_ID 0x2D2D |
#define | USB2D_64_PRODUCT_ID 0x2D00 |
#define | USB2D_32_PRODUCT_ID 0x2D01 |
#define | USB2D_64_V3_PRODUCT_ID 0x2D03 |
#define | TWOD_MUTEX_LOCK(d) mutex_lock(d); |
#define | TWOD_MUTEX_UNLOCK(d) mutex_unlock(d); |
Functions | |
MODULE_DEVICE_TABLE (usb, twod_table) | |
static | DEFINE_MUTEX (twod_open_lock) |
MODULE_PARM_DESC (throttleRate,"desired sampling rate (image/sec). 100/N or 100*N where N is integer, or 0 to sample as fast as possible") | |
module_param (throttleRate, uint, 0) | |
static void | twod_dev_free (struct usb_twod *dev) |
static void | twod_dev_delete (struct kref *kref) |
static void | twod_tas_tx_bulk_callback (struct urb *urb) |
static struct urb * | twod_make_tas_urb (struct usb_twod *dev) |
static int | write_tas (struct usb_twod *dev) |
static void | send_tas_timer_func (struct timer_list *tlist) |
static int | twod_set_sor_rate (struct usb_twod *dev, int rate) |
static int | usb_twod_submit_img_urb (struct usb_twod *dev, struct urb *urb) |
static int | usb_twod_submit_sor_urb (struct usb_twod *dev, struct urb *urb) |
static void | urb_throttle_func (struct timer_list *tlist) |
static void | twod_img_rx_bulk_callback (struct urb *urb) |
static struct urb * | twod_make_img_urb (struct usb_twod *dev) |
static void | twod_sor_rx_bulk_callback (struct urb *urb) |
static struct urb * | twod_make_sor_urb (struct usb_twod *dev) |
static int | twod_open (struct inode *inode, struct file *file) |
static int | twod_release (struct inode *inode, struct file *file) |
static unsigned int | twod_poll (struct file *file, poll_table *wait) |
static ssize_t | twod_read (struct file *file, char __user *buffer, size_t count, loff_t *ppos) |
static long | twod_ioctl (struct file *file, unsigned int cmd, unsigned long arg) |
static int | twod_probe (struct usb_interface *interface, const struct usb_device_id *id) |
static void | twod_disconnect (struct usb_interface *interface) |
static int __init | usb_twod_init (void) |
static void __exit | usb_twod_exit (void) |
module_init (usb_twod_init) | |
module_exit (usb_twod_exit) | |
MODULE_LICENSE ("GPL") | |
MODULE_AUTHOR ("Chris Webster <cjw@ucar.edu>") | |
MODULE_DESCRIPTION ("USB PMS-2D Probe Driver") | |
MODULE_VERSION (REPO_REVISION) | |
Variables | |
static struct usb_device_id | twod_table [] |
static unsigned int | throttleRate = 0 |
static struct usb_driver | twod_driver |
static struct file_operations | twod_fops |
static struct usb_class_driver | usbtwod_64 |
static struct usb_class_driver | usbtwod_32 |
#define NCAR_VENDOR_ID 0x2D2D |
#define REPO_REVISION "unknown" |
Referenced by usb_twod_init().
#define TWOD_MUTEX_LOCK | ( | d | ) | mutex_lock(d); |
Referenced by twod_disconnect(), and twod_open().
#define TWOD_MUTEX_UNLOCK | ( | d | ) | mutex_unlock(d); |
Referenced by twod_disconnect(), and twod_open().
#define USB2D_32_PRODUCT_ID 0x2D01 |
#define USB2D_64_PRODUCT_ID 0x2D00 |
#define USB2D_64_V3_PRODUCT_ID 0x2D03 |
Referenced by twod_probe().
|
static |
MODULE_AUTHOR | ( | "Chris Webster <cjw@ucar.edu>" | ) |
MODULE_DESCRIPTION | ( | "USB PMS-2D Probe Driver" | ) |
MODULE_DEVICE_TABLE | ( | usb | , |
twod_table | |||
) |
module_exit | ( | usb_twod_exit | ) |
module_init | ( | usb_twod_init | ) |
MODULE_LICENSE | ( | "GPL" | ) |
module_param | ( | throttleRate | , |
uint | , | ||
0 | |||
) |
MODULE_PARM_DESC | ( | throttleRate | , |
"desired sampling rate (image/sec). 100/N or 100*N where N is | integer, | ||
or 0 to sample as fast as possible" | |||
) |
MODULE_VERSION | ( | REPO_REVISION | ) |
|
static |
References write_tas().
Referenced by twod_open().
|
static |
References twod_dev_free().
Referenced by twod_disconnect(), twod_open(), twod_probe(), and twod_release().
|
static |
Referenced by twod_dev_delete(), and twod_release().
|
static |
References twod_dev_delete(), TWOD_MUTEX_LOCK, and TWOD_MUTEX_UNLOCK.
|
static |
References TWOD_IMGv2_TYPE, TWOD_IMGv3_TYPE, and usb_twod_submit_img_urb().
Referenced by twod_make_img_urb().
|
static |
References _Tap2D_v2::div10, if(), _Tap2D_v2::ntap, twod_set_sor_rate(), USB2D_GET_STATUS, USB2D_IOC_MAGIC, USB2D_SET_SOR_RATE, and USB2D_SET_TAS.
|
static |
References twod_img_rx_bulk_callback().
Referenced by twod_open().
|
static |
References twod_sor_rx_bulk_callback().
Referenced by twod_open().
|
static |
References twod_tas_tx_bulk_callback().
Referenced by twod_open().
|
static |
|
static |
|
static |
References twod_dev_delete(), and USB2D_64_V3_PRODUCT_ID.
|
static |
|
static |
References if(), throttleRate, twod_dev_delete(), twod_dev_free(), and twod_set_sor_rate().
|
static |
References rate, and TMSECS_PER_SEC.
Referenced by twod_ioctl(), and twod_release().
|
static |
References if(), TWOD_SOR_TYPE, TWOD_SORv3_TYPE, and usb_twod_submit_sor_urb().
Referenced by twod_make_sor_urb().
|
static |
Referenced by twod_make_tas_urb().
|
static |
Referenced by twod_open().
|
static |
|
static |
References REPO_REVISION.
|
static |
References throttleRate.
Referenced by twod_img_rx_bulk_callback(), twod_open(), and twod_read().
|
static |
Referenced by twod_open(), twod_read(), and twod_sor_rx_bulk_callback().
|
static |
Referenced by send_tas_timer_func().
|
static |
Referenced by twod_open(), twod_release(), and usb_twod_submit_img_urb().
|
static |
Referenced by twod_open().
|
static |
|
static |
|
static |