staging: comedi: addi_apci_3501: cleanup comments in hwdrv_apci3501.c
The watchdog/timer subdevice in this driver is basically broke. The subdevice functions abuse the comedi API and the (*insn_config) simply doesn't work due to it's treating data[0] as a parameter and not as the config "instruction". For now, cleanup the comments for the functions so they are at least readable. Then we can figure out how to fix the subdevice. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
9798df7269
commit
1ef0cfb192
1 changed files with 32 additions and 73 deletions
|
@ -4,31 +4,17 @@
|
||||||
#define ADDIDATA_WATCHDOG 2
|
#define ADDIDATA_WATCHDOG 2
|
||||||
|
|
||||||
/*
|
/*
|
||||||
+----------------------------------------------------------------------------+
|
* (*insn_config) for the timer subdevice
|
||||||
| Function Name : int i_APCI3501_ConfigTimerCounterWatchdog |
|
*
|
||||||
| (struct comedi_device *dev,struct comedi_subdevice *s, |
|
* Configures The Timer, Counter or Watchdog
|
||||||
| struct comedi_insn *insn,unsigned int *data) |
|
* Data Pointer contains configuration parameters as below
|
||||||
+----------------------------------------------------------------------------+
|
* data[0] : 0 Configure As Timer
|
||||||
| Task : Configures The Timer , Counter or Watchdog |
|
* 1 Configure As Counter
|
||||||
+----------------------------------------------------------------------------+
|
* 2 Configure As Watchdog
|
||||||
| Input Parameters : struct comedi_device *dev : Driver handle |
|
* data[1] : 1 Enable Interrupt
|
||||||
| unsigned int *data : Data Pointer contains |
|
* 0 Disable Interrupt
|
||||||
| configuration parameters as below |
|
* data[2] : Time Unit
|
||||||
| |
|
* data[3] : Reload Value
|
||||||
| data[0] : 0 Configure As Timer |
|
|
||||||
| 1 Configure As Counter |
|
|
||||||
| 2 Configure As Watchdog |
|
|
||||||
| data[1] : 1 Enable Interrupt |
|
|
||||||
| 0 Disable Interrupt |
|
|
||||||
| data[2] : Time Unit |
|
|
||||||
| data[3] : Reload Value |
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
| Output Parameters : -- |
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
| Return Value : TRUE : No error occur |
|
|
||||||
| : FALSE : Error occur. Return the error |
|
|
||||||
| |
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
static int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device *dev,
|
static int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device *dev,
|
||||||
struct comedi_subdevice *s,
|
struct comedi_subdevice *s,
|
||||||
|
@ -89,30 +75,17 @@ static int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device *dev,
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
+----------------------------------------------------------------------------+
|
* (*insn_write) for the timer subdevice
|
||||||
| Function Name : int i_APCI3501_StartStopWriteTimerCounterWatchdog |
|
*
|
||||||
| (struct comedi_device *dev,struct comedi_subdevice *s, |
|
* Start / Stop The Selected Timer , Counter or Watchdog
|
||||||
| struct comedi_insn *insn,unsigned int *data) |
|
* Data Pointer contains configuration parameters as below
|
||||||
+----------------------------------------------------------------------------+
|
* data[0] : 0 Timer
|
||||||
| Task : Start / Stop The Selected Timer , Counter or Watchdog |
|
* 1 Counter
|
||||||
+----------------------------------------------------------------------------+
|
* 2 Watchdog
|
||||||
| Input Parameters : struct comedi_device *dev : Driver handle |
|
* data[1] : 1 Start
|
||||||
| unsigned int *data : Data Pointer contains |
|
* 0 Stop
|
||||||
| configuration parameters as below |
|
* 2 Trigger
|
||||||
| |
|
|
||||||
| data[0] : 0 Timer |
|
|
||||||
| 1 Counter |
|
|
||||||
| 2 Watchdog | | data[1] : 1 Start |
|
|
||||||
| 0 Stop | 2 Trigger |
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
| Output Parameters : -- |
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
| Return Value : TRUE : No error occur |
|
|
||||||
| : FALSE : Error occur. Return the error |
|
|
||||||
| |
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
|
static int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
|
||||||
struct comedi_subdevice *s,
|
struct comedi_subdevice *s,
|
||||||
struct comedi_insn *insn,
|
struct comedi_insn *insn,
|
||||||
|
@ -171,29 +144,15 @@ static int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device *d
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
+----------------------------------------------------------------------------+
|
* (*insn_read) for the timer subdevice
|
||||||
| Function Name : int i_APCI3501_ReadTimerCounterWatchdog |
|
*
|
||||||
| (struct comedi_device *dev,struct comedi_subdevice *s, |
|
* Read The Selected Timer, Counter or Watchdog
|
||||||
| struct comedi_insn *insn,unsigned int *data) |
|
* Data Pointer contains configuration parameters as below
|
||||||
+----------------------------------------------------------------------------+
|
* data[0] : 0 Timer
|
||||||
| Task : Read The Selected Timer , Counter or Watchdog |
|
* 1 Counter
|
||||||
+----------------------------------------------------------------------------+
|
* 2 Watchdog
|
||||||
| Input Parameters : struct comedi_device *dev : Driver handle |
|
* data[1] : Timer Counter Watchdog Number
|
||||||
| unsigned int *data : Data Pointer contains |
|
|
||||||
| configuration parameters as below |
|
|
||||||
| |
|
|
||||||
| data[0] : 0 Timer |
|
|
||||||
| 1 Counter |
|
|
||||||
| 2 Watchdog | | data[1] : Timer Counter Watchdog Number |
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
| Output Parameters : -- |
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
| Return Value : TRUE : No error occur |
|
|
||||||
| : FALSE : Error occur. Return the error |
|
|
||||||
| |
|
|
||||||
+----------------------------------------------------------------------------+
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device *dev,
|
static int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device *dev,
|
||||||
struct comedi_subdevice *s,
|
struct comedi_subdevice *s,
|
||||||
struct comedi_insn *insn,
|
struct comedi_insn *insn,
|
||||||
|
|
Loading…
Add table
Reference in a new issue