staging: comedi: ni_pcimio: Support more PXI cards

Add support for NI PXI-6220, PXI-6221, PXI-6229, PXI-6250, PXI-6254,
PXI-6259, PXIe-6259, PXI-6280, PXI-6284, and PXI-6289 boards, treating
them the same as the correspondingly numbered PCI and PCIe boards (apart
from having different Comedi board name strings).  The same has
previously been done for other PXI boards supported by the driver.

The PCI device IDs for the newly supported boards come from the
"nixswv.inf" file in National Instrument's Windows drivers.

Also, sort `ni_pcimio_pci_table[]` by PCI device ID.  It is mostly
sorted already, so only the entries for PXI-6251 and PXIe-6251 need
moving.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Ian Abbott 2017-01-16 14:12:26 +00:00 committed by Greg Kroah-Hartman
parent 0d0ad8298d
commit 910f404afc
2 changed files with 167 additions and 14 deletions

View File

@ -1070,9 +1070,11 @@ config COMEDI_NI_PCIMIO
PCI-MIO-16E-4, PCI-6014, PCI-6040E, PXI-6040E, PCI-6030E, PCI-6031E,
PCI-6032E, PCI-6033E, PCI-6071E, PCI-6023E, PCI-6024E, PCI-6025E,
PXI-6025E, PCI-6034E, PCI-6035E, PCI-6052E, PCI-6110, PCI-6111,
PCI-6220, PCI-6221, PCI-6224, PXI-6224, PCI-6225, PXI-6225, PCI-6229,
PCI-6250, PCI-6251, PCIe-6251, PCI-6254, PCI-6259, PCIe-6259,
PCI-6280, PCI-6281, PXI-6281, PCI-6284, PCI-6289, PCI-6711, PXI-6711,
PCI-6220, PXI-6220, PCI-6221, PXI-6221, PCI-6224, PXI-6224, PCI-6225,
PXI-6225, PCI-6229, PXI-6229, PCI-6250, PXI-6250, PCI-6251, PXI-6251,
PCIe-6251, PXIe-6251, PCI-6254, PXI-6254, PCI-6259, PXI-6259,
PCIe-6259, PXIe-6259, PCI-6280, PXI-6280, PCI-6281, PXI-6281,
PCI-6284, PXI-6284, PCI-6289, PXI-6289, PCI-6711, PXI-6711,
PCI-6713, PXI-6713, PXI-6071E, PCI-6070E, PXI-6070E, PXI-6052E,
PCI-6036E, PCI-6731, PCI-6733, PXI-6733, PCI-6143, PXI-6143

View File

@ -25,17 +25,16 @@
* PCI-MIO-16XE-10, PXI-6030E, PCI-MIO-16E-1, PCI-MIO-16E-4, PCI-6014,
* PCI-6040E, PXI-6040E, PCI-6030E, PCI-6031E, PCI-6032E, PCI-6033E,
* PCI-6071E, PCI-6023E, PCI-6024E, PCI-6025E, PXI-6025E, PCI-6034E,
* PCI-6035E, PCI-6052E,
* PCI-6110, PCI-6111, PCI-6220, PCI-6221, PCI-6224, PXI-6224,
* PCI-6225, PXI-6225, PCI-6229, PCI-6250,
* PCI-6251, PXI-6251, PCIe-6251, PXIe-6251,
* PCI-6254, PCI-6259, PCIe-6259,
* PCI-6280, PCI-6281, PXI-6281, PCI-6284, PCI-6289,
* PCI-6711, PXI-6711, PCI-6713, PXI-6713,
* PXI-6071E, PCI-6070E, PXI-6070E,
* PCI-6035E, PCI-6052E, PCI-6110, PCI-6111, PCI-6220, PXI-6220,
* PCI-6221, PXI-6221, PCI-6224, PXI-6224, PCI-6225, PXI-6225,
* PCI-6229, PXI-6229, PCI-6250, PXI-6250, PCI-6251, PXI-6251,
* PCIe-6251, PXIe-6251, PCI-6254, PXI-6254, PCI-6259, PXI-6259,
* PCIe-6259, PXIe-6259, PCI-6280, PXI-6280, PCI-6281, PXI-6281,
* PCI-6284, PXI-6284, PCI-6289, PXI-6289, PCI-6711, PXI-6711,
* PCI-6713, PXI-6713, PXI-6071E, PCI-6070E, PXI-6070E,
* PXI-6052E, PCI-6036E, PCI-6731, PCI-6733, PXI-6733,
* PCI-6143, PXI-6143
* Updated: Mon, 09 Jan 2012 14:52:48 +0000
* Updated: Mon, 16 Jan 2017 12:56:04 +0000
*
* These boards are almost identical to the AT-MIO E series, except that
* they use the PCI bus instead of ISA (i.e., AT). See the notes for the
@ -181,26 +180,36 @@ enum ni_pcimio_boardid {
BOARD_PXI6031E,
BOARD_PCI6036E,
BOARD_PCI6220,
BOARD_PXI6220,
BOARD_PCI6221,
BOARD_PCI6221_37PIN,
BOARD_PXI6221,
BOARD_PCI6224,
BOARD_PXI6224,
BOARD_PCI6225,
BOARD_PXI6225,
BOARD_PCI6229,
BOARD_PXI6229,
BOARD_PCI6250,
BOARD_PXI6250,
BOARD_PCI6251,
BOARD_PXI6251,
BOARD_PCIE6251,
BOARD_PXIE6251,
BOARD_PCI6254,
BOARD_PXI6254,
BOARD_PCI6259,
BOARD_PXI6259,
BOARD_PCIE6259,
BOARD_PXIE6259,
BOARD_PCI6280,
BOARD_PXI6280,
BOARD_PCI6281,
BOARD_PXI6281,
BOARD_PCI6284,
BOARD_PXI6284,
BOARD_PCI6289,
BOARD_PXI6289,
BOARD_PCI6143,
BOARD_PXI6143,
};
@ -684,6 +693,16 @@ static const struct ni_board_struct ni_boards[] = {
.reg_type = ni_reg_622x,
.caldac = { caldac_none },
},
[BOARD_PXI6220] = {
.name = "pxi-6220",
.n_adchan = 16,
.ai_maxdata = 0xffff,
.ai_fifo_depth = 512, /* FIXME: guess */
.gainlkup = ai_gain_622x,
.ai_speed = 4000,
.reg_type = ni_reg_622x,
.caldac = { caldac_none },
},
[BOARD_PCI6221] = {
.name = "pci-6221",
.n_adchan = 16,
@ -714,6 +733,21 @@ static const struct ni_board_struct ni_boards[] = {
.ao_speed = 1200,
.caldac = { caldac_none },
},
[BOARD_PXI6221] = {
.name = "pxi-6221",
.n_adchan = 16,
.ai_maxdata = 0xffff,
.ai_fifo_depth = 4095,
.gainlkup = ai_gain_622x,
.ai_speed = 4000,
.n_aochan = 2,
.ao_maxdata = 0xffff,
.ao_fifo_depth = 8191,
.ao_range_table = &range_bipolar10,
.reg_type = ni_reg_622x,
.ao_speed = 1200,
.caldac = { caldac_none },
},
[BOARD_PCI6224] = {
.name = "pci-6224",
.n_adchan = 32,
@ -784,6 +818,22 @@ static const struct ni_board_struct ni_boards[] = {
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PXI6229] = {
.name = "pxi-6229",
.n_adchan = 32,
.ai_maxdata = 0xffff,
.ai_fifo_depth = 4095,
.gainlkup = ai_gain_622x,
.ai_speed = 4000,
.n_aochan = 4,
.ao_maxdata = 0xffff,
.ao_fifo_depth = 8191,
.ao_range_table = &range_bipolar10,
.reg_type = ni_reg_622x,
.ao_speed = 1200,
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PCI6250] = {
.name = "pci-6250",
.n_adchan = 16,
@ -794,6 +844,16 @@ static const struct ni_board_struct ni_boards[] = {
.reg_type = ni_reg_625x,
.caldac = { caldac_none },
},
[BOARD_PXI6250] = {
.name = "pxi-6250",
.n_adchan = 16,
.ai_maxdata = 0xffff,
.ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x,
.ai_speed = 800,
.reg_type = ni_reg_625x,
.caldac = { caldac_none },
},
[BOARD_PCI6251] = {
.name = "pci-6251",
.n_adchan = 16,
@ -865,6 +925,17 @@ static const struct ni_board_struct ni_boards[] = {
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PXI6254] = {
.name = "pxi-6254",
.n_adchan = 32,
.ai_maxdata = 0xffff,
.ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x,
.ai_speed = 800,
.reg_type = ni_reg_625x,
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PCI6259] = {
.name = "pci-6259",
.n_adchan = 32,
@ -881,6 +952,22 @@ static const struct ni_board_struct ni_boards[] = {
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PXI6259] = {
.name = "pxi-6259",
.n_adchan = 32,
.ai_maxdata = 0xffff,
.ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x,
.ai_speed = 800,
.n_aochan = 4,
.ao_maxdata = 0xffff,
.ao_fifo_depth = 8191,
.ao_range_table = &range_ni_M_625x_ao,
.reg_type = ni_reg_625x,
.ao_speed = 350,
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PCIE6259] = {
.name = "pcie-6259",
.n_adchan = 32,
@ -897,6 +984,22 @@ static const struct ni_board_struct ni_boards[] = {
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PXIE6259] = {
.name = "pxie-6259",
.n_adchan = 32,
.ai_maxdata = 0xffff,
.ai_fifo_depth = 4095,
.gainlkup = ai_gain_628x,
.ai_speed = 800,
.n_aochan = 4,
.ao_maxdata = 0xffff,
.ao_fifo_depth = 8191,
.ao_range_table = &range_ni_M_625x_ao,
.reg_type = ni_reg_625x,
.ao_speed = 350,
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PCI6280] = {
.name = "pci-6280",
.n_adchan = 16,
@ -908,6 +1011,17 @@ static const struct ni_board_struct ni_boards[] = {
.reg_type = ni_reg_628x,
.caldac = { caldac_none },
},
[BOARD_PXI6280] = {
.name = "pxi-6280",
.n_adchan = 16,
.ai_maxdata = 0x3ffff,
.ai_fifo_depth = 2047,
.gainlkup = ai_gain_628x,
.ai_speed = 1600,
.ao_fifo_depth = 8191,
.reg_type = ni_reg_628x,
.caldac = { caldac_none },
},
[BOARD_PCI6281] = {
.name = "pci-6281",
.n_adchan = 16,
@ -949,6 +1063,17 @@ static const struct ni_board_struct ni_boards[] = {
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PXI6284] = {
.name = "pxi-6284",
.n_adchan = 32,
.ai_maxdata = 0x3ffff,
.ai_fifo_depth = 2047,
.gainlkup = ai_gain_628x,
.ai_speed = 1600,
.reg_type = ni_reg_628x,
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PCI6289] = {
.name = "pci-6289",
.n_adchan = 32,
@ -965,6 +1090,22 @@ static const struct ni_board_struct ni_boards[] = {
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PXI6289] = {
.name = "pxi-6289",
.n_adchan = 32,
.ai_maxdata = 0x3ffff,
.ai_fifo_depth = 2047,
.gainlkup = ai_gain_628x,
.ai_speed = 1600,
.n_aochan = 4,
.ao_maxdata = 0xffff,
.ao_fifo_depth = 8191,
.ao_range_table = &range_ni_M_628x_ao,
.reg_type = ni_reg_628x,
.ao_speed = 350,
.has_32dio_chan = 1,
.caldac = { caldac_none },
},
[BOARD_PCI6143] = {
.name = "pci-6143",
.n_adchan = 8,
@ -1284,14 +1425,24 @@ static const struct pci_device_id ni_pcimio_pci_table[] = {
{ PCI_VDEVICE(NI, 0x70aa), BOARD_PCI6229 },
{ PCI_VDEVICE(NI, 0x70ab), BOARD_PCI6259 },
{ PCI_VDEVICE(NI, 0x70ac), BOARD_PCI6289 },
{ PCI_VDEVICE(NI, 0x70ad), BOARD_PXI6251 },
{ PCI_VDEVICE(NI, 0x70ae), BOARD_PXI6220 },
{ PCI_VDEVICE(NI, 0x70af), BOARD_PCI6221 },
{ PCI_VDEVICE(NI, 0x70b0), BOARD_PCI6220 },
{ PCI_VDEVICE(NI, 0x70b1), BOARD_PXI6229 },
{ PCI_VDEVICE(NI, 0x70b2), BOARD_PXI6259 },
{ PCI_VDEVICE(NI, 0x70b3), BOARD_PXI6289 },
{ PCI_VDEVICE(NI, 0x70b4), BOARD_PCI6250 },
{ PCI_VDEVICE(NI, 0x70b5), BOARD_PXI6221 },
{ PCI_VDEVICE(NI, 0x70b6), BOARD_PCI6280 },
{ PCI_VDEVICE(NI, 0x70b7), BOARD_PCI6254 },
{ PCI_VDEVICE(NI, 0x70b8), BOARD_PCI6251 },
{ PCI_VDEVICE(NI, 0x70b9), BOARD_PXI6250 },
{ PCI_VDEVICE(NI, 0x70ba), BOARD_PXI6254 },
{ PCI_VDEVICE(NI, 0x70bb), BOARD_PXI6280 },
{ PCI_VDEVICE(NI, 0x70bc), BOARD_PCI6284 },
{ PCI_VDEVICE(NI, 0x70bd), BOARD_PCI6281 },
{ PCI_VDEVICE(NI, 0x70be), BOARD_PXI6284 },
{ PCI_VDEVICE(NI, 0x70bf), BOARD_PXI6281 },
{ PCI_VDEVICE(NI, 0x70c0), BOARD_PCI6143 },
{ PCI_VDEVICE(NI, 0x70f2), BOARD_PCI6224 },
@ -1299,11 +1450,11 @@ static const struct pci_device_id ni_pcimio_pci_table[] = {
{ PCI_VDEVICE(NI, 0x710d), BOARD_PXI6143 },
{ PCI_VDEVICE(NI, 0x716c), BOARD_PCI6225 },
{ PCI_VDEVICE(NI, 0x716d), BOARD_PXI6225 },
{ PCI_VDEVICE(NI, 0x717d), BOARD_PCIE6251 },
{ PCI_VDEVICE(NI, 0x717f), BOARD_PCIE6259 },
{ PCI_VDEVICE(NI, 0x71bc), BOARD_PCI6221_37PIN },
{ PCI_VDEVICE(NI, 0x717d), BOARD_PCIE6251 },
{ PCI_VDEVICE(NI, 0x72e8), BOARD_PXIE6251 },
{ PCI_VDEVICE(NI, 0x70ad), BOARD_PXI6251 },
{ PCI_VDEVICE(NI, 0x72e9), BOARD_PXIE6259 },
{ 0 }
};
MODULE_DEVICE_TABLE(pci, ni_pcimio_pci_table);