Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304510
b: refs/heads/master
c: 92bc80d
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 30, 2012
1 parent e1218d9 commit 316abb4
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 91 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4c6dacbd383c0cdd84826cb0663b6bd81eaf21fb
refs/heads/master: 92bc80dfbbc79dad7a7bd3dd3aa0348ad6a667f9
169 changes: 79 additions & 90 deletions trunk/drivers/staging/comedi/drivers/pcl812.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,6 @@ static const struct comedi_lrange range_a821pgh_ai = { 4, {
}
};

static int pcl812_attach(struct comedi_device *dev,
struct comedi_devconfig *it);
static int pcl812_detach(struct comedi_device *dev);

struct pcl812_board {

const char *name; /* board name */
Expand All @@ -340,88 +336,8 @@ struct pcl812_board {
unsigned char haveMPC508; /* 1=board use MPC508A multiplexor */
};

static const struct pcl812_board boardtypes[] = {
{"pcl812", boardPCL812, 16, 0, 2, 16, 16, 0x0fff,
33000, 500, &range_bipolar10, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"pcl812pg", boardPCL812PG, 16, 0, 2, 16, 16, 0x0fff,
33000, 500, &range_pcl812pg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"acl8112pg", boardPCL812PG, 16, 0, 2, 16, 16, 0x0fff,
10000, 500, &range_pcl812pg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"acl8112dg", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
10000, 500, &range_acl8112dg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 1},
{"acl8112hg", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
10000, 500, &range_acl8112hg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 1},
{"a821pgl", boardA821, 16, 8, 1, 16, 16, 0x0fff,
10000, 500, &range_pcl813b_ai, &range_unipolar5,
0x000c, 0x00, PCLx1x_IORANGE, 0},
{"a821pglnda", boardA821, 16, 8, 0, 0, 0, 0x0fff,
10000, 500, &range_pcl813b_ai, NULL,
0x000c, 0x00, PCLx1x_IORANGE, 0},
{"a821pgh", boardA821, 16, 8, 1, 16, 16, 0x0fff,
10000, 500, &range_a821pgh_ai, &range_unipolar5,
0x000c, 0x00, PCLx1x_IORANGE, 0},
{"a822pgl", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
10000, 500, &range_acl8112dg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"a822pgh", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
10000, 500, &range_acl8112hg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"a823pgl", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
8000, 500, &range_acl8112dg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"a823pgh", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
8000, 500, &range_acl8112hg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"pcl813", boardPCL813, 32, 0, 0, 0, 0, 0x0fff,
0, 0, &range_pcl813b_ai, NULL,
0x0000, 0x00, PCLx1x_IORANGE, 0},
{"pcl813b", boardPCL813B, 32, 0, 0, 0, 0, 0x0fff,
0, 0, &range_pcl813b_ai, NULL,
0x0000, 0x00, PCLx1x_IORANGE, 0},
{"acl8113", boardACL8113, 32, 0, 0, 0, 0, 0x0fff,
0, 0, &range_acl8113_1_ai, NULL,
0x0000, 0x00, PCLx1x_IORANGE, 0},
{"iso813", boardISO813, 32, 0, 0, 0, 0, 0x0fff,
0, 0, &range_iso813_1_ai, NULL,
0x0000, 0x00, PCLx1x_IORANGE, 0},
{"acl8216", boardACL8216, 16, 8, 2, 16, 16, 0xffff,
10000, 500, &range_pcl813b2_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 1},
{"a826pg", boardACL8216, 16, 8, 2, 16, 16, 0xffff,
10000, 500, &range_pcl813b2_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
};

#define this_board ((const struct pcl812_board *)dev->board_ptr)

static struct comedi_driver driver_pcl812 = {
.driver_name = "pcl812",
.module = THIS_MODULE,
.attach = pcl812_attach,
.detach = pcl812_detach,
.board_name = &boardtypes[0].name,
.num_names = ARRAY_SIZE(boardtypes),
.offset = sizeof(struct pcl812_board),
};

static int __init driver_pcl812_init_module(void)
{
return comedi_driver_register(&driver_pcl812);
}

static void __exit driver_pcl812_cleanup_module(void)
{
comedi_driver_unregister(&driver_pcl812);
}

module_init(driver_pcl812_init_module);
module_exit(driver_pcl812_cleanup_module);

struct pcl812_private {

unsigned char valid; /* =1 device is OK */
Expand Down Expand Up @@ -1355,9 +1271,6 @@ static void pcl812_reset(struct comedi_device *dev)
#endif
}

/*
==============================================================================
*/
static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
{
int ret, subdev;
Expand Down Expand Up @@ -1701,9 +1614,6 @@ static int pcl812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
return 0;
}

/*
==============================================================================
*/
static int pcl812_detach(struct comedi_device *dev)
{

Expand All @@ -1714,6 +1624,85 @@ static int pcl812_detach(struct comedi_device *dev)
return 0;
}

static const struct pcl812_board boardtypes[] = {
{"pcl812", boardPCL812, 16, 0, 2, 16, 16, 0x0fff,
33000, 500, &range_bipolar10, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"pcl812pg", boardPCL812PG, 16, 0, 2, 16, 16, 0x0fff,
33000, 500, &range_pcl812pg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"acl8112pg", boardPCL812PG, 16, 0, 2, 16, 16, 0x0fff,
10000, 500, &range_pcl812pg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"acl8112dg", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
10000, 500, &range_acl8112dg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 1},
{"acl8112hg", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
10000, 500, &range_acl8112hg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 1},
{"a821pgl", boardA821, 16, 8, 1, 16, 16, 0x0fff,
10000, 500, &range_pcl813b_ai, &range_unipolar5,
0x000c, 0x00, PCLx1x_IORANGE, 0},
{"a821pglnda", boardA821, 16, 8, 0, 0, 0, 0x0fff,
10000, 500, &range_pcl813b_ai, NULL,
0x000c, 0x00, PCLx1x_IORANGE, 0},
{"a821pgh", boardA821, 16, 8, 1, 16, 16, 0x0fff,
10000, 500, &range_a821pgh_ai, &range_unipolar5,
0x000c, 0x00, PCLx1x_IORANGE, 0},
{"a822pgl", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
10000, 500, &range_acl8112dg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"a822pgh", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
10000, 500, &range_acl8112hg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"a823pgl", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
8000, 500, &range_acl8112dg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"a823pgh", boardACL8112, 16, 8, 2, 16, 16, 0x0fff,
8000, 500, &range_acl8112hg_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
{"pcl813", boardPCL813, 32, 0, 0, 0, 0, 0x0fff,
0, 0, &range_pcl813b_ai, NULL,
0x0000, 0x00, PCLx1x_IORANGE, 0},
{"pcl813b", boardPCL813B, 32, 0, 0, 0, 0, 0x0fff,
0, 0, &range_pcl813b_ai, NULL,
0x0000, 0x00, PCLx1x_IORANGE, 0},
{"acl8113", boardACL8113, 32, 0, 0, 0, 0, 0x0fff,
0, 0, &range_acl8113_1_ai, NULL,
0x0000, 0x00, PCLx1x_IORANGE, 0},
{"iso813", boardISO813, 32, 0, 0, 0, 0, 0x0fff,
0, 0, &range_iso813_1_ai, NULL,
0x0000, 0x00, PCLx1x_IORANGE, 0},
{"acl8216", boardACL8216, 16, 8, 2, 16, 16, 0xffff,
10000, 500, &range_pcl813b2_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 1},
{"a826pg", boardACL8216, 16, 8, 2, 16, 16, 0xffff,
10000, 500, &range_pcl813b2_ai, &range_unipolar5,
0xdcfc, 0x0a, PCLx1x_IORANGE, 0},
};

static struct comedi_driver driver_pcl812 = {
.driver_name = "pcl812",
.module = THIS_MODULE,
.attach = pcl812_attach,
.detach = pcl812_detach,
.board_name = &boardtypes[0].name,
.num_names = ARRAY_SIZE(boardtypes),
.offset = sizeof(struct pcl812_board),
};

static int __init driver_pcl812_init_module(void)
{
return comedi_driver_register(&driver_pcl812);
}
module_init(driver_pcl812_init_module);

static void __exit driver_pcl812_cleanup_module(void)
{
comedi_driver_unregister(&driver_pcl812);
}
module_exit(driver_pcl812_cleanup_module);

MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");
MODULE_LICENSE("GPL");

0 comments on commit 316abb4

Please sign in to comment.