Commit db2255f5 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: ni_stc.h: refactor 'adbits' boardinfo

For aesthetics, change the 'adbits' in the boardinfo to 'ai_maxdata'
to remove the need for the calculation of the subdevice 'maxdata'.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 817144ae
...@@ -108,7 +108,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -108,7 +108,7 @@ static const struct ni_board_struct ni_boards[] = {
.device_id = 44, .device_id = 44,
.isapnp_id = 0x0000, /* XXX unknown */ .isapnp_id = 0x0000, /* XXX unknown */
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 8192, .ai_fifo_depth = 8192,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
.ai_speed = 800, .ai_speed = 800,
...@@ -124,7 +124,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -124,7 +124,7 @@ static const struct ni_board_struct ni_boards[] = {
.device_id = 25, .device_id = 25,
.isapnp_id = 0x1900, .isapnp_id = 0x1900,
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 2048, .ai_fifo_depth = 2048,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
.ai_speed = 2000, .ai_speed = 2000,
...@@ -140,7 +140,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -140,7 +140,7 @@ static const struct ni_board_struct ni_boards[] = {
.device_id = 36, .device_id = 36,
.isapnp_id = 0x2400, .isapnp_id = 0x2400,
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
.ai_speed = 10000, .ai_speed = 10000,
...@@ -155,7 +155,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -155,7 +155,7 @@ static const struct ni_board_struct ni_boards[] = {
.device_id = 37, .device_id = 37,
.isapnp_id = 0x2500, .isapnp_id = 0x2500,
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
.ai_speed = 10000, .ai_speed = 10000,
...@@ -171,7 +171,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -171,7 +171,7 @@ static const struct ni_board_struct ni_boards[] = {
.device_id = 38, .device_id = 38,
.isapnp_id = 0x2600, .isapnp_id = 0x2600,
.n_adchan = 64, .n_adchan = 64,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 2048, .ai_fifo_depth = 2048,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
.ai_speed = 2000, .ai_speed = 2000,
...@@ -187,7 +187,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -187,7 +187,7 @@ static const struct ni_board_struct ni_boards[] = {
.device_id = 39, .device_id = 39,
.isapnp_id = 0x2700, .isapnp_id = 0x2700,
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_8, .gainlkup = ai_gain_8,
...@@ -203,7 +203,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -203,7 +203,7 @@ static const struct ni_board_struct ni_boards[] = {
.device_id = 50, .device_id = 50,
.isapnp_id = 0x0000, /* XXX unknown */ .isapnp_id = 0x0000, /* XXX unknown */
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_14, .gainlkup = ai_gain_14,
...@@ -220,7 +220,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -220,7 +220,7 @@ static const struct ni_board_struct ni_boards[] = {
.device_id = 51, .device_id = 51,
.isapnp_id = 0x0000, /* XXX unknown */ .isapnp_id = 0x0000, /* XXX unknown */
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, /* unknown */ .alwaysdither = 1, /* unknown */
.gainlkup = ai_gain_14, .gainlkup = ai_gain_14,
......
...@@ -5513,13 +5513,13 @@ static int ni_E_init(struct comedi_device *dev, ...@@ -5513,13 +5513,13 @@ static int ni_E_init(struct comedi_device *dev,
SDF_READABLE | SDF_DIFF | SDF_DITHER | SDF_CMD_READ; SDF_READABLE | SDF_DIFF | SDF_DITHER | SDF_CMD_READ;
if (!devpriv->is_611x) if (!devpriv->is_611x)
s->subdev_flags |= SDF_GROUND | SDF_COMMON | SDF_OTHER; s->subdev_flags |= SDF_GROUND | SDF_COMMON | SDF_OTHER;
if (board->adbits > 16) if (board->ai_maxdata > 0xffff)
s->subdev_flags |= SDF_LSAMPL; s->subdev_flags |= SDF_LSAMPL;
if (devpriv->is_m_series) if (devpriv->is_m_series)
s->subdev_flags |= SDF_SOFT_CALIBRATED; s->subdev_flags |= SDF_SOFT_CALIBRATED;
s->n_chan = board->n_adchan; s->n_chan = board->n_adchan;
s->len_chanlist = 512; s->len_chanlist = 512;
s->maxdata = (1 << board->adbits) - 1; s->maxdata = board->ai_maxdata;
s->range_table = ni_range_lkup[board->gainlkup]; s->range_table = ni_range_lkup[board->gainlkup];
s->insn_read = &ni_ai_insn_read; s->insn_read = &ni_ai_insn_read;
s->insn_config = &ni_ai_insn_config; s->insn_config = &ni_ai_insn_config;
......
...@@ -56,7 +56,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -56,7 +56,7 @@ static const struct ni_board_struct ni_boards[] = {
.name = "DAQCard-ai-16xe-50", .name = "DAQCard-ai-16xe-50",
.device_id = 0x010d, .device_id = 0x010d,
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 1024, .ai_fifo_depth = 1024,
.gainlkup = ai_gain_8, .gainlkup = ai_gain_8,
.ai_speed = 5000, .ai_speed = 5000,
...@@ -66,7 +66,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -66,7 +66,7 @@ static const struct ni_board_struct ni_boards[] = {
.name = "DAQCard-ai-16e-4", .name = "DAQCard-ai-16e-4",
.device_id = 0x010c, .device_id = 0x010c,
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 1024, .ai_fifo_depth = 1024,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
.ai_speed = 4000, .ai_speed = 4000,
...@@ -76,7 +76,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -76,7 +76,7 @@ static const struct ni_board_struct ni_boards[] = {
.name = "DAQCard-6062E", .name = "DAQCard-6062E",
.device_id = 0x02c4, .device_id = 0x02c4,
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 8192, .ai_fifo_depth = 8192,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
.ai_speed = 2000, .ai_speed = 2000,
...@@ -92,7 +92,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -92,7 +92,7 @@ static const struct ni_board_struct ni_boards[] = {
.name = "DAQCard-6024E", .name = "DAQCard-6024E",
.device_id = 0x075e, .device_id = 0x075e,
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 1024, .ai_fifo_depth = 1024,
.gainlkup = ai_gain_4, .gainlkup = ai_gain_4,
.ai_speed = 5000, .ai_speed = 5000,
...@@ -107,7 +107,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -107,7 +107,7 @@ static const struct ni_board_struct ni_boards[] = {
.name = "DAQCard-6036E", .name = "DAQCard-6036E",
.device_id = 0x0245, .device_id = 0x0245,
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 1024, .ai_fifo_depth = 1024,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_4, .gainlkup = ai_gain_4,
......
...@@ -211,7 +211,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -211,7 +211,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCIMIO_16XE_50] = { [BOARD_PCIMIO_16XE_50] = {
.name = "pci-mio-16xe-50", .name = "pci-mio-16xe-50",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 2048, .ai_fifo_depth = 2048,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_8, .gainlkup = ai_gain_8,
...@@ -226,7 +226,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -226,7 +226,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCIMIO_16XE_10] = { [BOARD_PCIMIO_16XE_10] = {
.name = "pci-mio-16xe-10", /* aka pci-6030E */ .name = "pci-mio-16xe-10", /* aka pci-6030E */
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_14, .gainlkup = ai_gain_14,
...@@ -242,7 +242,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -242,7 +242,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6014] = { [BOARD_PCI6014] = {
.name = "pci-6014", .name = "pci-6014",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_4, .gainlkup = ai_gain_4,
...@@ -257,7 +257,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -257,7 +257,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6030E] = { [BOARD_PXI6030E] = {
.name = "pxi-6030e", .name = "pxi-6030e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_14, .gainlkup = ai_gain_14,
...@@ -273,7 +273,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -273,7 +273,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCIMIO_16E_1] = { [BOARD_PCIMIO_16E_1] = {
.name = "pci-mio-16e-1", /* aka pci-6070e */ .name = "pci-mio-16e-1", /* aka pci-6070e */
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
.ai_speed = 800, .ai_speed = 800,
...@@ -288,7 +288,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -288,7 +288,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCIMIO_16E_4] = { [BOARD_PCIMIO_16E_4] = {
.name = "pci-mio-16e-4", /* aka pci-6040e */ .name = "pci-mio-16e-4", /* aka pci-6040e */
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
/* /*
...@@ -307,7 +307,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -307,7 +307,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6040E] = { [BOARD_PXI6040E] = {
.name = "pxi-6040e", .name = "pxi-6040e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
.ai_speed = 2000, .ai_speed = 2000,
...@@ -322,7 +322,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -322,7 +322,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6031E] = { [BOARD_PCI6031E] = {
.name = "pci-6031e", .name = "pci-6031e",
.n_adchan = 64, .n_adchan = 64,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_14, .gainlkup = ai_gain_14,
...@@ -338,7 +338,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -338,7 +338,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6032E] = { [BOARD_PCI6032E] = {
.name = "pci-6032e", .name = "pci-6032e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_14, .gainlkup = ai_gain_14,
...@@ -349,7 +349,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -349,7 +349,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6033E] = { [BOARD_PCI6033E] = {
.name = "pci-6033e", .name = "pci-6033e",
.n_adchan = 64, .n_adchan = 64,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_14, .gainlkup = ai_gain_14,
...@@ -360,7 +360,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -360,7 +360,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6071E] = { [BOARD_PCI6071E] = {
.name = "pci-6071e", .name = "pci-6071e",
.n_adchan = 64, .n_adchan = 64,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
...@@ -376,7 +376,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -376,7 +376,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6023E] = { [BOARD_PCI6023E] = {
.name = "pci-6023e", .name = "pci-6023e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.gainlkup = ai_gain_4, .gainlkup = ai_gain_4,
.ai_speed = 5000, .ai_speed = 5000,
...@@ -386,7 +386,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -386,7 +386,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6024E] = { [BOARD_PCI6024E] = {
.name = "pci-6024e", .name = "pci-6024e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.gainlkup = ai_gain_4, .gainlkup = ai_gain_4,
.ai_speed = 5000, .ai_speed = 5000,
...@@ -400,7 +400,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -400,7 +400,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6025E] = { [BOARD_PCI6025E] = {
.name = "pci-6025e", .name = "pci-6025e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.gainlkup = ai_gain_4, .gainlkup = ai_gain_4,
.ai_speed = 5000, .ai_speed = 5000,
...@@ -415,7 +415,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -415,7 +415,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6025E] = { [BOARD_PXI6025E] = {
.name = "pxi-6025e", .name = "pxi-6025e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.gainlkup = ai_gain_4, .gainlkup = ai_gain_4,
.ai_speed = 5000, .ai_speed = 5000,
...@@ -430,7 +430,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -430,7 +430,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6034E] = { [BOARD_PCI6034E] = {
.name = "pci-6034e", .name = "pci-6034e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_4, .gainlkup = ai_gain_4,
...@@ -441,7 +441,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -441,7 +441,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6035E] = { [BOARD_PCI6035E] = {
.name = "pci-6035e", .name = "pci-6035e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_4, .gainlkup = ai_gain_4,
...@@ -456,7 +456,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -456,7 +456,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6052E] = { [BOARD_PCI6052E] = {
.name = "pci-6052e", .name = "pci-6052e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
...@@ -473,7 +473,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -473,7 +473,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6110] = { [BOARD_PCI6110] = {
.name = "pci-6110", .name = "pci-6110",
.n_adchan = 4, .n_adchan = 4,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 8192, .ai_fifo_depth = 8192,
.alwaysdither = 0, .alwaysdither = 0,
.gainlkup = ai_gain_611x, .gainlkup = ai_gain_611x,
...@@ -490,7 +490,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -490,7 +490,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6111] = { [BOARD_PCI6111] = {
.name = "pci-6111", .name = "pci-6111",
.n_adchan = 2, .n_adchan = 2,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 8192, .ai_fifo_depth = 8192,
.gainlkup = ai_gain_611x, .gainlkup = ai_gain_611x,
.ai_speed = 200, .ai_speed = 200,
...@@ -508,7 +508,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -508,7 +508,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6115] = { /* .device_id = 0x2ed0, */ [BOARD_PCI6115] = { /* .device_id = 0x2ed0, */
.name = "pci-6115", .name = "pci-6115",
.n_adchan = 4, .n_adchan = 4,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 8192, .ai_fifo_depth = 8192,
.gainlkup = ai_gain_611x, .gainlkup = ai_gain_611x,
.ai_speed = 100, .ai_speed = 100,
...@@ -527,7 +527,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -527,7 +527,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6115] = { /* .device_id = ????, */ [BOARD_PXI6115] = { /* .device_id = ????, */
.name = "pxi-6115", .name = "pxi-6115",
.n_adchan = 4, .n_adchan = 4,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 8192, .ai_fifo_depth = 8192,
.gainlkup = ai_gain_611x, .gainlkup = ai_gain_611x,
.ai_speed = 100, .ai_speed = 100,
...@@ -635,7 +635,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -635,7 +635,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6071E] = { [BOARD_PXI6071E] = {
.name = "pxi-6071e", .name = "pxi-6071e",
.n_adchan = 64, .n_adchan = 64,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
...@@ -651,7 +651,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -651,7 +651,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6070E] = { [BOARD_PXI6070E] = {
.name = "pxi-6070e", .name = "pxi-6070e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 12, .ai_maxdata = 0x0fff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
...@@ -667,7 +667,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -667,7 +667,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6052E] = { [BOARD_PXI6052E] = {
.name = "pxi-6052e", .name = "pxi-6052e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_16, .gainlkup = ai_gain_16,
...@@ -683,7 +683,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -683,7 +683,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6031E] = { [BOARD_PXI6031E] = {
.name = "pxi-6031e", .name = "pxi-6031e",
.n_adchan = 64, .n_adchan = 64,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_14, .gainlkup = ai_gain_14,
...@@ -699,7 +699,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -699,7 +699,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6036E] = { [BOARD_PCI6036E] = {
.name = "pci-6036e", .name = "pci-6036e",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, .ai_fifo_depth = 512,
.alwaysdither = 1, .alwaysdither = 1,
.gainlkup = ai_gain_4, .gainlkup = ai_gain_4,
...@@ -714,7 +714,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -714,7 +714,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6220] = { [BOARD_PCI6220] = {
.name = "pci-6220", .name = "pci-6220",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 512, /* FIXME: guess */ .ai_fifo_depth = 512, /* FIXME: guess */
.gainlkup = ai_gain_622x, .gainlkup = ai_gain_622x,
.ai_speed = 4000, .ai_speed = 4000,
...@@ -725,7 +725,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -725,7 +725,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6221] = { [BOARD_PCI6221] = {
.name = "pci-6221", .name = "pci-6221",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_622x, .gainlkup = ai_gain_622x,
.ai_speed = 4000, .ai_speed = 4000,
...@@ -741,7 +741,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -741,7 +741,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6221_37PIN] = { [BOARD_PCI6221_37PIN] = {
.name = "pci-6221_37pin", .name = "pci-6221_37pin",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_622x, .gainlkup = ai_gain_622x,
.ai_speed = 4000, .ai_speed = 4000,
...@@ -757,7 +757,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -757,7 +757,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6224] = { [BOARD_PCI6224] = {
.name = "pci-6224", .name = "pci-6224",
.n_adchan = 32, .n_adchan = 32,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_622x, .gainlkup = ai_gain_622x,
.ai_speed = 4000, .ai_speed = 4000,
...@@ -768,7 +768,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -768,7 +768,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6224] = { [BOARD_PXI6224] = {
.name = "pxi-6224", .name = "pxi-6224",
.n_adchan = 32, .n_adchan = 32,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_622x, .gainlkup = ai_gain_622x,
.ai_speed = 4000, .ai_speed = 4000,
...@@ -779,7 +779,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -779,7 +779,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6225] = { [BOARD_PCI6225] = {
.name = "pci-6225", .name = "pci-6225",
.n_adchan = 80, .n_adchan = 80,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_622x, .gainlkup = ai_gain_622x,
.ai_speed = 4000, .ai_speed = 4000,
...@@ -795,7 +795,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -795,7 +795,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6225] = { [BOARD_PXI6225] = {
.name = "pxi-6225", .name = "pxi-6225",
.n_adchan = 80, .n_adchan = 80,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_622x, .gainlkup = ai_gain_622x,
.ai_speed = 4000, .ai_speed = 4000,
...@@ -811,7 +811,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -811,7 +811,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6229] = { [BOARD_PCI6229] = {
.name = "pci-6229", .name = "pci-6229",
.n_adchan = 32, .n_adchan = 32,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_622x, .gainlkup = ai_gain_622x,
.ai_speed = 4000, .ai_speed = 4000,
...@@ -827,7 +827,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -827,7 +827,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6250] = { [BOARD_PCI6250] = {
.name = "pci-6250", .name = "pci-6250",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 800, .ai_speed = 800,
...@@ -838,7 +838,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -838,7 +838,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6251] = { [BOARD_PCI6251] = {
.name = "pci-6251", .name = "pci-6251",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 800, .ai_speed = 800,
...@@ -854,7 +854,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -854,7 +854,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCIE6251] = { [BOARD_PCIE6251] = {
.name = "pcie-6251", .name = "pcie-6251",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 800, .ai_speed = 800,
...@@ -870,7 +870,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -870,7 +870,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXIE6251] = { [BOARD_PXIE6251] = {
.name = "pxie-6251", .name = "pxie-6251",
.n_adchan = 16, .n_adchan = 16,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 800, .ai_speed = 800,
...@@ -886,7 +886,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -886,7 +886,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6254] = { [BOARD_PCI6254] = {
.name = "pci-6254", .name = "pci-6254",
.n_adchan = 32, .n_adchan = 32,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 800, .ai_speed = 800,
...@@ -897,7 +897,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -897,7 +897,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6259] = { [BOARD_PCI6259] = {
.name = "pci-6259", .name = "pci-6259",
.n_adchan = 32, .n_adchan = 32,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 800, .ai_speed = 800,
...@@ -913,7 +913,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -913,7 +913,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCIE6259] = { [BOARD_PCIE6259] = {
.name = "pcie-6259", .name = "pcie-6259",
.n_adchan = 32, .n_adchan = 32,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 4095, .ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 800, .ai_speed = 800,
...@@ -929,7 +929,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -929,7 +929,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6280] = { [BOARD_PCI6280] = {
.name = "pci-6280", .name = "pci-6280",
.n_adchan = 16, .n_adchan = 16,
.adbits = 18, .ai_maxdata = 0x3ffff,
.ai_fifo_depth = 2047, .ai_fifo_depth = 2047,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 1600, .ai_speed = 1600,
...@@ -941,7 +941,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -941,7 +941,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6281] = { [BOARD_PCI6281] = {
.name = "pci-6281", .name = "pci-6281",
.n_adchan = 16, .n_adchan = 16,
.adbits = 18, .ai_maxdata = 0x3ffff,
.ai_fifo_depth = 2047, .ai_fifo_depth = 2047,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 1600, .ai_speed = 1600,
...@@ -957,7 +957,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -957,7 +957,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6281] = { [BOARD_PXI6281] = {
.name = "pxi-6281", .name = "pxi-6281",
.n_adchan = 16, .n_adchan = 16,
.adbits = 18, .ai_maxdata = 0x3ffff,
.ai_fifo_depth = 2047, .ai_fifo_depth = 2047,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 1600, .ai_speed = 1600,
...@@ -973,7 +973,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -973,7 +973,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6284] = { [BOARD_PCI6284] = {
.name = "pci-6284", .name = "pci-6284",
.n_adchan = 32, .n_adchan = 32,
.adbits = 18, .ai_maxdata = 0x3ffff,
.ai_fifo_depth = 2047, .ai_fifo_depth = 2047,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 1600, .ai_speed = 1600,
...@@ -984,7 +984,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -984,7 +984,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6289] = { [BOARD_PCI6289] = {
.name = "pci-6289", .name = "pci-6289",
.n_adchan = 32, .n_adchan = 32,
.adbits = 18, .ai_maxdata = 0x3ffff,
.ai_fifo_depth = 2047, .ai_fifo_depth = 2047,
.gainlkup = ai_gain_628x, .gainlkup = ai_gain_628x,
.ai_speed = 1600, .ai_speed = 1600,
...@@ -1000,7 +1000,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -1000,7 +1000,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PCI6143] = { [BOARD_PCI6143] = {
.name = "pci-6143", .name = "pci-6143",
.n_adchan = 8, .n_adchan = 8,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 1024, .ai_fifo_depth = 1024,
.gainlkup = ai_gain_6143, .gainlkup = ai_gain_6143,
.ai_speed = 4000, .ai_speed = 4000,
...@@ -1011,7 +1011,7 @@ static const struct ni_board_struct ni_boards[] = { ...@@ -1011,7 +1011,7 @@ static const struct ni_board_struct ni_boards[] = {
[BOARD_PXI6143] = { [BOARD_PXI6143] = {
.name = "pxi-6143", .name = "pxi-6143",
.n_adchan = 8, .n_adchan = 8,
.adbits = 16, .ai_maxdata = 0xffff,
.ai_fifo_depth = 1024, .ai_fifo_depth = 1024,
.gainlkup = ai_gain_6143, .gainlkup = ai_gain_6143,
.ai_speed = 4000, .ai_speed = 4000,
......
...@@ -1393,7 +1393,7 @@ struct ni_board_struct { ...@@ -1393,7 +1393,7 @@ struct ni_board_struct {
int isapnp_id; int isapnp_id;
int n_adchan; int n_adchan;
int adbits; unsigned int ai_maxdata;
int ai_fifo_depth; int ai_fifo_depth;
unsigned int alwaysdither:1; unsigned int alwaysdither:1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment