nidas v1.2.3
|
#include <linux/types.h>
#include <linux/module.h>
#include <linux/version.h>
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/interrupt.h>
#include <linux/fs.h>
#include <linux/workqueue.h>
#include <linux/poll.h>
#include <linux/delay.h>
#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <asm/io.h>
#include <linux/cdev.h>
#include <linux/device.h>
#include "lamsx.h"
#include <nidas/linux/ver_macros.h>
#include <nidas/linux/Revision.h>
#include <nidas/linux/klog.h>
#include <nidas/linux/isa_bus.h>
#include <nidas/linux/util.h>
Classes | |
struct | bh_data |
struct | LAMS_board |
Macros | |
#define | MAX_LAMS_BOARDS 3 |
#define | IRQF_SHARED SA_SHIRQ |
#define | REPO_REVISION "unknown" |
#define | RAM_CLEAR_OFFSET 0x00 |
#define | PEAK_CLEAR_OFFSET 0x02 |
#define | AVG_LSW_DATA_OFFSET 0x04 |
#define | AVG_MSW_DATA_OFFSET 0x06 |
#define | PEAK_DATA_OFFSET 0x08 |
#define | TAS_BELOW_OFFSET 0x0A |
#define | TAS_ABOVE_OFFSET 0x0C |
#define | IOPORT_REGION_SIZE 16 |
#define | SPECTRAL_POINTS_TO_SKIP 0 |
#define | LAMS_ISR_SAMPLE_QUEUE_SIZE 128 |
#define | LAMS_OUTPUT_SAMPLE_QUEUE_SIZE 32 |
Functions | |
module_param_array (ioports, int, numboards, 0) | |
module_param_array (irqs, int, numirqs, 0) | |
MODULE_AUTHOR ("Gordon Maclean <maclean@ucar.edu>") | |
MODULE_LICENSE ("Dual BSD/GPL") | |
MODULE_DESCRIPTION ("Driver for LAMX card") | |
MODULE_VERSION (REPO_REVISION) | |
static int | setNAvg (struct LAMS_board *brd, int val) |
static void | lams_bottom_half (struct work_struct *work) |
Work queue function that processes the raw samples from the ISR. | |
static irqreturn_t | lams_irq_handler (int irq, void *dev_id) |
static int | lams_request_irq (struct LAMS_board *brd) |
static int | lams_remove_irq (struct LAMS_board *brd) |
static int | lams_open (struct inode *inode, struct file *filp) |
static int | lams_release (struct inode *inode, struct file *filp) |
static ssize_t | lams_read (struct file *filp, char __user *buf, size_t count, loff_t *f_pos) |
static unsigned int | lams_poll (struct file *filp, poll_table *wait) |
static long | lams_ioctl (struct file *filp, unsigned int cmd, unsigned long arg) |
static void | lams_cleanup (void) |
static int __init | lams_init (void) |
module_init (lams_init) | |
module_exit (lams_cleanup) | |
Variables | |
static const char * | driver_name = "lamsx" |
static unsigned int | ioports [MAX_LAMS_BOARDS] = { 0x220, 0, 0 } |
static int | numboards = 0 |
static int | irqs [MAX_LAMS_BOARDS] = { 4, 0, 0 } |
static int | numirqs = 0 |
static dev_t | lams_device = MKDEV(0,0) |
static struct class * | lams_class |
static struct LAMS_board * | boards = 0 |
static struct workqueue_struct * | work_queue = 0 |
static struct file_operations | lams_fops |
#define AVG_LSW_DATA_OFFSET 0x04 |
Referenced by lams_init().
#define AVG_MSW_DATA_OFFSET 0x06 |
Referenced by lams_init().
#define IOPORT_REGION_SIZE 16 |
Referenced by lams_cleanup(), and lams_init().
#define IRQF_SHARED SA_SHIRQ |
#define LAMS_ISR_SAMPLE_QUEUE_SIZE 128 |
Referenced by lams_bottom_half(), lams_irq_handler(), and lams_open().
#define LAMS_OUTPUT_SAMPLE_QUEUE_SIZE 32 |
Referenced by lams_bottom_half(), lams_irq_handler(), and lams_open().
#define MAX_LAMS_BOARDS 3 |
Referenced by lams_init().
#define PEAK_CLEAR_OFFSET 0x02 |
Referenced by lams_init().
#define PEAK_DATA_OFFSET 0x08 |
Referenced by lams_init().
#define RAM_CLEAR_OFFSET 0x00 |
Referenced by lams_init().
#define REPO_REVISION "unknown" |
Referenced by lams_init().
#define SPECTRAL_POINTS_TO_SKIP 0 |
Referenced by lams_init().
#define TAS_ABOVE_OFFSET 0x0C |
Referenced by lams_ioctl().
#define TAS_BELOW_OFFSET 0x0A |
Referenced by lams_ioctl().
|
static |
Work queue function that processes the raw samples from the ISR.
References lams_avg_sample::data, LAMS_ISR_SAMPLE_QUEUE_SIZE, LAMS_OUTPUT_SAMPLE_QUEUE_SIZE, LAMS_SPECAVG_SAMPLE_TYPE, LAMS_SPECTRA_SIZE, SIZEOF_DSM_SAMPLE_HEADER, and LAMS_board::worker.
Referenced by lams_init().
|
static |
References boards, IOPORT_REGION_SIZE, lams_class, lams_device, numboards, and work_queue.
Referenced by lams_init().
|
static |
References AVG_LSW_DATA_OFFSET, AVG_MSW_DATA_OFFSET, boards, driver_name, err, IOPORT_REGION_SIZE, ioports, irqs, lams_bottom_half(), lams_class, lams_cleanup(), lams_device, lams_fops, MAX_LAMS_BOARDS, numboards, PEAK_CLEAR_OFFSET, PEAK_DATA_OFFSET, RAM_CLEAR_OFFSET, REPO_REVISION, setNAvg(), SPECTRAL_POINTS_TO_SKIP, and work_queue.
|
static |
References boards, err, LAMS_GET_STATUS, LAMS_IOC_MAXNR, LAMS_MAGIC, LAMS_N_AVG, LAMS_N_PEAKS, LAMS_N_SKIP, LAMS_SET_CHN, LAMS_TAS_ABOVE, LAMS_TAS_BELOW, numboards, setNAvg(), TAS_ABOVE_OFFSET, and TAS_BELOW_OFFSET.
|
static |
References LAMS_ISR_SAMPLE_QUEUE_SIZE, LAMS_OUTPUT_SAMPLE_QUEUE_SIZE, LAMS_SPECAVG_SAMPLE_TYPE, LAMS_SPECPEAK_SAMPLE_TYPE, LAMS_SPECTRA_SIZE, SIZEOF_DSM_SAMPLE_HEADER, and work_queue.
Referenced by lams_request_irq().
|
static |
|
static |
|
static |
References nidas_circbuf_read_nowait().
|
static |
References boards, free_dsm_circ_buf(), lams_remove_irq(), numboards, and work_queue.
|
static |
Referenced by lams_release().
|
static |
References driver_name, irqs, and lams_irq_handler().
Referenced by lams_open().
MODULE_AUTHOR | ( | "Gordon Maclean <maclean@ucar.edu>" | ) |
MODULE_DESCRIPTION | ( | "Driver for LAMX card" | ) |
module_exit | ( | lams_cleanup | ) |
module_init | ( | lams_init | ) |
MODULE_LICENSE | ( | "Dual BSD/GPL" | ) |
MODULE_VERSION | ( | REPO_REVISION | ) |
|
static |
Referenced by lams_init(), and lams_ioctl().
|
static |
Referenced by lams_cleanup(), lams_init(), lams_ioctl(), lams_open(), and lams_release().
|
static |
Referenced by lams_init(), and lams_request_irq().
|
static |
Referenced by lams_init().
|
static |
Referenced by lams_init(), and lams_request_irq().
|
static |
Referenced by lams_cleanup(), and lams_init().
|
static |
Referenced by lams_cleanup(), and lams_init().
|
static |
Referenced by lams_init().
|
static |
Referenced by lams_cleanup(), lams_init(), lams_ioctl(), lams_open(), and lams_release().
|
static |
|
static |
Referenced by lams_cleanup(), lams_init(), lams_irq_handler(), and lams_release().