Driver: icp_multi.o
Author: Anne Smorthit <anne.smorthit@sfwte.ch>
Devices: [Inova] ICP_MULTI (icp_multi)
+Status: unknown
Options:
[0] - PCI bus number - if bus number and slot number are 0,
// Define analogue range
-comedi_lrange range_analog={ 4, {
+static comedi_lrange range_analog={ 4, {
UNI_RANGE(5),
UNI_RANGE(10),
BIP_RANGE(5),
#define n_boardtypes (sizeof(boardtypes)/sizeof(boardtype))
-comedi_driver driver_icp_multi={
+static comedi_driver driver_icp_multi={
driver_name: "icp_multi",
module: THIS_MODULE,
attach: icp_multi_attach,
board_name: boardtypes,
offset: sizeof(boardtype),
};
+COMEDI_INITCLEANUP(driver_icp_multi);
typedef struct{
char valid; // card is usable
==============================================================================
*/
-int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan);
-void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan);
+#if 0
+static int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan);
+#endif
+static void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan);
static int icp_multi_reset(comedi_device *dev);
==============================================================================
*/
-int icp_multi_insn_read_ai(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
+static int icp_multi_insn_read_ai(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
{
int n,timeout;
==============================================================================
*/
-int icp_multi_insn_write_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
+static int icp_multi_insn_write_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
{
int n, chan, range, timeout;
==============================================================================
*/
-int icp_multi_insn_read_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
+static int icp_multi_insn_read_ao(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
{
int n,chan;
==============================================================================
*/
-int icp_multi_insn_bits_di(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
+static int icp_multi_insn_bits_di(comedi_device *dev,comedi_subdevice *s, comedi_insn *insn, lsampl_t *data)
{
data[1] = readw(dev->iobase + ICP_MULTI_DI);
==============================================================================
*/
-int icp_multi_insn_read_ctr(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
+static int icp_multi_insn_read_ctr(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
{
return 0;
}
==============================================================================
*/
-int icp_multi_insn_write_ctr(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
+static int icp_multi_insn_write_ctr(comedi_device * dev, comedi_subdevice * s, comedi_insn *insn, lsampl_t *data)
{
return 0;
}
}
+#if 0
/*
==============================================================================
==============================================================================
*/
-int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan)
+static int check_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist, unsigned int n_chan)
{
unsigned int i;
}
return 1;
}
+#endif
==============================================================================
*/
-void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist,
+static void setup_channel_list(comedi_device * dev, comedi_subdevice * s, unsigned int *chanlist,
unsigned int n_chan)
{
unsigned int i, range, chanprog;
return 0;
}
-/*
-==============================================================================
-*/
-COMEDI_INITCLEANUP(driver_icp_multi);
-/*
-==============================================================================
-*/
-
/****************************************************************************/
-void pci_card_list_init(unsigned short pci_vendor, char display);
-void pci_card_list_cleanup(unsigned short pci_vendor);
-struct pcilst_struct *find_free_pci_card_by_device(unsigned short vendor_id, unsigned short device_id);
-int find_free_pci_card_by_position(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot, struct pcilst_struct **card);
-struct pcilst_struct *select_and_alloc_pci_card(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot);
-
-int pci_card_alloc(struct pcilst_struct *amcc);
-int pci_card_free(struct pcilst_struct *amcc);
-void pci_card_list_display(void);
-int pci_card_data(struct pcilst_struct *amcc,
+static void pci_card_list_init(unsigned short pci_vendor, char display);
+static void pci_card_list_cleanup(unsigned short pci_vendor);
+static struct pcilst_struct *find_free_pci_card_by_device(unsigned short vendor_id, unsigned short device_id);
+static int find_free_pci_card_by_position(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot, struct pcilst_struct **card);
+static struct pcilst_struct *select_and_alloc_pci_card(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot);
+
+static int pci_card_alloc(struct pcilst_struct *amcc);
+static int pci_card_free(struct pcilst_struct *amcc);
+static void pci_card_list_display(void);
+static int pci_card_data(struct pcilst_struct *amcc,
unsigned char *pci_bus, unsigned char *pci_slot, unsigned char *pci_func,
unsigned long *io_addr, unsigned short *irq, unsigned short *master);
/****************************************************************************/
/* build list of Inova cards in this system */
-void pci_card_list_init(unsigned short pci_vendor, char display)
+static void pci_card_list_init(unsigned short pci_vendor, char display)
{
struct pci_dev *pcidev;
struct pcilst_struct *inova,*last;
/****************************************************************************/
/* free up list of amcc cards in this system */
-void pci_card_list_cleanup(unsigned short pci_vendor)
+static void pci_card_list_cleanup(unsigned short pci_vendor)
{
struct pcilst_struct *inova,*next;
/****************************************************************************/
/* find first unused card with this device_id */
-struct pcilst_struct *find_free_pci_card_by_device(unsigned short vendor_id, unsigned short device_id)
+static struct pcilst_struct *find_free_pci_card_by_device(unsigned short vendor_id, unsigned short device_id)
{
struct pcilst_struct *inova,*next;
/****************************************************************************/
/* find card on requested position */
-int find_free_pci_card_by_position(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot, struct pcilst_struct **card)
+static int find_free_pci_card_by_position(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot, struct pcilst_struct **card)
{
struct pcilst_struct *inova,*next;
/****************************************************************************/
/* mark card as used */
-int pci_card_alloc(struct pcilst_struct *inova)
+static int pci_card_alloc(struct pcilst_struct *inova)
{
if (!inova) return -1;
/****************************************************************************/
/* mark card as free */
-int pci_card_free(struct pcilst_struct *inova)
+static int pci_card_free(struct pcilst_struct *inova)
{
if (!inova) return -1;
/****************************************************************************/
/* display list of found cards */
-void pci_card_list_display(void)
+static void pci_card_list_display(void)
{
struct pcilst_struct *inova, *next;
/****************************************************************************/
/* return all card information for driver */
-int pci_card_data(struct pcilst_struct *inova,
+static int pci_card_data(struct pcilst_struct *inova,
unsigned char *pci_bus, unsigned char *pci_slot, unsigned char *pci_func,
unsigned long *io_addr, unsigned short *irq, unsigned short *master)
{
/****************************************************************************/
/* select and alloc card */
-struct pcilst_struct *select_and_alloc_pci_card(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot)
+static struct pcilst_struct *select_and_alloc_pci_card(unsigned short vendor_id, unsigned short device_id, unsigned short pci_bus, unsigned short pci_slot)
{
struct pcilst_struct *card;