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

staging: comedi: s526: fix the block comments

Tidy up the block comments to fix the checkpatch.pl warnings.
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 4f3ed256
...@@ -176,15 +176,17 @@ static int s526_gpct_insn_config(struct comedi_device *dev, ...@@ -176,15 +176,17 @@ static int s526_gpct_insn_config(struct comedi_device *dev,
unsigned int val; unsigned int val;
union cmReg cmReg; union cmReg cmReg;
/* Check what type of Counter the user requested, data[0] contains */ /*
/* the Application type */ * Check what type of Counter the user requested
* data[0] contains the Application type
*/
switch (data[0]) { switch (data[0]) {
case INSN_CONFIG_GPCT_QUADRATURE_ENCODER: case INSN_CONFIG_GPCT_QUADRATURE_ENCODER:
/* /*
data[0]: Application Type * data[0]: Application Type
data[1]: Counter Mode Register Value * data[1]: Counter Mode Register Value
data[2]: Pre-load Register Value * data[2]: Pre-load Register Value
data[3]: Conter Control Register * data[3]: Conter Control Register
*/ */
devpriv->gpct_config[chan] = data[0]; devpriv->gpct_config[chan] = data[0];
...@@ -214,11 +216,13 @@ static int s526_gpct_insn_config(struct comedi_device *dev, ...@@ -214,11 +216,13 @@ static int s526_gpct_insn_config(struct comedi_device *dev,
cmReg.reg.clockSource = 0; cmReg.reg.clockSource = 0;
/* When to take into account the indexpulse: */ /* When to take into account the indexpulse: */
/*if (data[2] == GPCT_IndexPhaseLowLow) { /*
} else if (data[2] == GPCT_IndexPhaseLowHigh) { * if (data[2] == GPCT_IndexPhaseLowLow) {
} else if (data[2] == GPCT_IndexPhaseHighLow) { * } else if (data[2] == GPCT_IndexPhaseLowHigh) {
} else if (data[2] == GPCT_IndexPhaseHighHigh) { * } else if (data[2] == GPCT_IndexPhaseHighLow) {
}*/ * } else if (data[2] == GPCT_IndexPhaseHighHigh) {
* }
*/
/* Take into account the index pulse? */ /* Take into account the index pulse? */
if (data[3] == GPCT_RESET_COUNTER_ON_INDEX) if (data[3] == GPCT_RESET_COUNTER_ON_INDEX)
/* Auto load with INDEX^ */ /* Auto load with INDEX^ */
...@@ -248,11 +252,11 @@ static int s526_gpct_insn_config(struct comedi_device *dev, ...@@ -248,11 +252,11 @@ static int s526_gpct_insn_config(struct comedi_device *dev,
case INSN_CONFIG_GPCT_SINGLE_PULSE_GENERATOR: case INSN_CONFIG_GPCT_SINGLE_PULSE_GENERATOR:
/* /*
data[0]: Application Type * data[0]: Application Type
data[1]: Counter Mode Register Value * data[1]: Counter Mode Register Value
data[2]: Pre-load Register 0 Value * data[2]: Pre-load Register 0 Value
data[3]: Pre-load Register 1 Value * data[3]: Pre-load Register 1 Value
data[4]: Conter Control Register * data[4]: Conter Control Register
*/ */
devpriv->gpct_config[chan] = data[0]; devpriv->gpct_config[chan] = data[0];
...@@ -281,11 +285,11 @@ static int s526_gpct_insn_config(struct comedi_device *dev, ...@@ -281,11 +285,11 @@ static int s526_gpct_insn_config(struct comedi_device *dev,
case INSN_CONFIG_GPCT_PULSE_TRAIN_GENERATOR: case INSN_CONFIG_GPCT_PULSE_TRAIN_GENERATOR:
/* /*
data[0]: Application Type * data[0]: Application Type
data[1]: Counter Mode Register Value * data[1]: Counter Mode Register Value
data[2]: Pre-load Register 0 Value * data[2]: Pre-load Register 0 Value
data[3]: Pre-load Register 1 Value * data[3]: Pre-load Register 1 Value
data[4]: Conter Control Register * data[4]: Conter Control Register
*/ */
devpriv->gpct_config[chan] = data[0]; devpriv->gpct_config[chan] = data[0];
...@@ -332,11 +336,12 @@ static int s526_gpct_winsn(struct comedi_device *dev, ...@@ -332,11 +336,12 @@ static int s526_gpct_winsn(struct comedi_device *dev,
/* Check what Application of Counter this channel is configured for */ /* Check what Application of Counter this channel is configured for */
switch (devpriv->gpct_config[chan]) { switch (devpriv->gpct_config[chan]) {
case INSN_CONFIG_GPCT_PULSE_TRAIN_GENERATOR: case INSN_CONFIG_GPCT_PULSE_TRAIN_GENERATOR:
/* data[0] contains the PULSE_WIDTH /*
data[1] contains the PULSE_PERIOD * data[0] contains the PULSE_WIDTH
@pre PULSE_PERIOD > PULSE_WIDTH > 0 * data[1] contains the PULSE_PERIOD
The above periods must be expressed as a multiple of the * @pre PULSE_PERIOD > PULSE_WIDTH > 0
pulse frequency on the selected source * The above periods must be expressed as a multiple of the
* pulse frequency on the selected source
*/ */
if ((data[1] <= data[0]) || !data[0]) if ((data[1] <= data[0]) || !data[0])
return -EINVAL; return -EINVAL;
......
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