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

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

For aesthetics, change the 'aobits' in the boardinfo to 'ao_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 db2255f5
......@@ -113,7 +113,7 @@ static const struct ni_board_struct ni_boards[] = {
.gainlkup = ai_gain_16,
.ai_speed = 800,
.n_aochan = 2,
.aobits = 12,
.ao_maxdata = 0x0fff,
.ao_fifo_depth = 2048,
.ao_range_table = &range_ni_E_ao_ext,
.ao_speed = 1000,
......@@ -129,7 +129,7 @@ static const struct ni_board_struct ni_boards[] = {
.gainlkup = ai_gain_16,
.ai_speed = 2000,
.n_aochan = 2,
.aobits = 12,
.ao_maxdata = 0x0fff,
.ao_fifo_depth = 2048,
.ao_range_table = &range_ni_E_ao_ext,
.ao_speed = 1000,
......@@ -145,7 +145,7 @@ static const struct ni_board_struct ni_boards[] = {
.gainlkup = ai_gain_16,
.ai_speed = 10000,
.n_aochan = 2,
.aobits = 12,
.ao_maxdata = 0x0fff,
.ao_range_table = &range_ni_E_ao_ext,
.ao_speed = 10000,
.num_p0_dio_channels = 8,
......@@ -160,7 +160,7 @@ static const struct ni_board_struct ni_boards[] = {
.gainlkup = ai_gain_16,
.ai_speed = 10000,
.n_aochan = 2,
.aobits = 12,
.ao_maxdata = 0x0fff,
.ao_range_table = &range_ni_E_ao_ext,
.ao_speed = 10000,
.num_p0_dio_channels = 8,
......@@ -176,7 +176,7 @@ static const struct ni_board_struct ni_boards[] = {
.gainlkup = ai_gain_16,
.ai_speed = 2000,
.n_aochan = 2,
.aobits = 12,
.ao_maxdata = 0x0fff,
.ao_fifo_depth = 2048,
.ao_range_table = &range_ni_E_ao_ext,
.ao_speed = 1000,
......@@ -193,7 +193,7 @@ static const struct ni_board_struct ni_boards[] = {
.gainlkup = ai_gain_8,
.ai_speed = 50000,
.n_aochan = 2,
.aobits = 12,
.ao_maxdata = 0x0fff,
.ao_range_table = &range_bipolar10,
.ao_speed = 50000,
.num_p0_dio_channels = 8,
......@@ -209,7 +209,7 @@ static const struct ni_board_struct ni_boards[] = {
.gainlkup = ai_gain_14,
.ai_speed = 10000,
.n_aochan = 2,
.aobits = 16,
.ao_maxdata = 0xffff,
.ao_fifo_depth = 2048,
.ao_range_table = &range_ni_E_ao_ext,
.ao_speed = 1000,
......
......@@ -5544,7 +5544,7 @@ static int ni_E_init(struct comedi_device *dev,
if (devpriv->is_m_series)
s->subdev_flags |= SDF_SOFT_CALIBRATED;
s->n_chan = board->n_aochan;
s->maxdata = (1 << board->aobits) - 1;
s->maxdata = board->ao_maxdata;
s->range_table = board->ao_range_table;
s->insn_read = &ni_ao_insn_read;
s->insn_write = &ni_ao_insn_write;
......
......@@ -81,7 +81,7 @@ static const struct ni_board_struct ni_boards[] = {
.gainlkup = ai_gain_16,
.ai_speed = 2000,
.n_aochan = 2,
.aobits = 12,
.ao_maxdata = 0x0fff,
.ao_fifo_depth = 2048,
.ao_range_table = &range_bipolar10,
.ao_speed = 1176,
......@@ -97,7 +97,7 @@ static const struct ni_board_struct ni_boards[] = {
.gainlkup = ai_gain_4,
.ai_speed = 5000,
.n_aochan = 2,
.aobits = 12,
.ao_maxdata = 0x0fff,
.ao_range_table = &range_bipolar10,
.ao_speed = 1000000,
.num_p0_dio_channels = 8,
......@@ -113,7 +113,7 @@ static const struct ni_board_struct ni_boards[] = {
.gainlkup = ai_gain_4,
.ai_speed = 5000,
.n_aochan = 2,
.aobits = 16,
.ao_maxdata = 0xffff,
.ao_range_table = &range_bipolar10,
.ao_speed = 1000000,
.num_p0_dio_channels = 8,
......@@ -124,7 +124,7 @@ static const struct ni_board_struct ni_boards[] = {
.name = "DAQCard-6715",
.device_id = 0x0000, /* unknown */
.n_aochan = 8,
.aobits = 12,
.ao_maxdata = 0x0fff,
.ao_671x = 8192,
.num_p0_dio_channels = 8,
.caldac = { mb88341, mb88341 },
......
This diff is collapsed.
......@@ -1401,7 +1401,7 @@ struct ni_board_struct {
int ai_speed;
int n_aochan;
int aobits;
unsigned int ao_maxdata;
int ao_fifo_depth;
const struct comedi_lrange *ao_range_table;
unsigned ao_speed;
......
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