|
nidas v1.2.3
|
#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, "image/sec: 0 for no throttling, or (N X " __stringify(MAX_THROTTLE_FUNC_RATE) "), for N in [1:" __stringify(IMG_URBS_IN_FLIGHT) "]") | |
| module_param (throttleRate, uint, 0) | |
| static void | klog_shutdown (const char *devname, const char *func, const char *status) |
| static void | klog_error (const char *devname, const char *func, const char *status, int err) |
| static int | check_urb_status (int urbstatus, struct usb_twod *dev, const char *func) |
| 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 |
References klog_error(), and klog_shutdown().
Referenced by twod_img_rx_bulk_callback(), twod_sor_rx_bulk_callback(), and twod_tas_tx_bulk_callback().
|
static |
|
static |
References err.
Referenced by check_urb_status().
|
static |
Referenced by check_urb_status(), urb_throttle_func(), usb_twod_submit_img_urb(), usb_twod_submit_sor_urb(), and write_tas().
| 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 | , |
| "image/sec: 0 for no | throttling, | ||
| or(N X " __stringify(MAX_THROTTLE_FUNC_RATE) ") | , | ||
| for N in " | [1:" __stringify(IMG_URBS_IN_FLIGHT) "] ) |
| 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, TWOD_MUTEX_UNLOCK, usbtwod_32, and usbtwod_64.
|
static |
References check_urb_status(), TWOD_IMGv2_TYPE, TWOD_IMGv3_TYPE, and usb_twod_submit_img_urb().
Referenced by twod_make_img_urb().
|
static |
References 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(), USB2D_64_V3_PRODUCT_ID, usbtwod_32, and usbtwod_64.
|
static |
|
static |
References 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 check_urb_status(), TWOD_SOR_TYPE, TWOD_SORv3_TYPE, and usb_twod_submit_sor_urb().
Referenced by twod_make_sor_urb().
|
static |
References check_urb_status().
Referenced by twod_make_tas_urb().
|
static |
References klog_shutdown().
Referenced by twod_open().
|
static |
References twod_driver.
|
static |
References REPO_REVISION, and twod_driver.
|
static |
References klog_shutdown(), and throttleRate.
Referenced by twod_img_rx_bulk_callback(), twod_open(), and twod_read().
|
static |
References klog_shutdown().
Referenced by twod_open(), twod_read(), and twod_sor_rx_bulk_callback().
|
static |
References klog_shutdown().
Referenced by send_tas_timer_func().
|
static |
Referenced by twod_open(), twod_release(), and usb_twod_submit_img_urb().
|
static |
Referenced by twod_open(), usb_twod_exit(), and usb_twod_init().
|
static |
|
static |
|
static |
Referenced by twod_disconnect(), and twod_probe().
|
static |
Referenced by twod_disconnect(), and twod_probe().