mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-28 11:18:45 +07:00
Staging: comedi: fix "foo * bar" should be "foo *bar"
Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
9096a4eaf4
commit
da91b2692e
@ -144,7 +144,7 @@ static int subdev_8255_cb(int dir, int port, int data, unsigned long arg)
|
||||
}
|
||||
|
||||
static int subdev_8255_insn(struct comedi_device *dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (data[0]) {
|
||||
s->state &= ~data[0];
|
||||
@ -169,7 +169,7 @@ static int subdev_8255_insn(struct comedi_device *dev, struct comedi_subdevice *
|
||||
}
|
||||
|
||||
static int subdev_8255_insn_config(struct comedi_device *dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int mask;
|
||||
unsigned int bits;
|
||||
@ -223,7 +223,7 @@ static void do_config(struct comedi_device *dev, struct comedi_subdevice * s)
|
||||
}
|
||||
|
||||
static int subdev_8255_cmdtest(struct comedi_device *dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
|
@ -28,16 +28,16 @@
|
||||
|
||||
#if defined(CONFIG_COMEDI_8255) || defined(CONFIG_COMEDI_8255_MODULE)
|
||||
|
||||
int subdev_8255_init(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
int subdev_8255_init(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int (*cb) (int, int, int, unsigned long), unsigned long arg);
|
||||
int subdev_8255_init_irq(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
int subdev_8255_init_irq(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int (*cb) (int, int, int, unsigned long), unsigned long arg);
|
||||
void subdev_8255_cleanup(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
void subdev_8255_interrupt(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
void subdev_8255_cleanup(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
void subdev_8255_interrupt(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
|
||||
#else
|
||||
|
||||
static inline int subdev_8255_init(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static inline int subdev_8255_init(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
void *x, unsigned long y)
|
||||
{
|
||||
printk("8255 support not configured -- disabling subdevice\n");
|
||||
@ -47,8 +47,8 @@ static inline int subdev_8255_init(struct comedi_device * dev, struct comedi_sub
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void subdev_8255_cleanup(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s)
|
||||
static inline void subdev_8255_cleanup(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ static struct comedi_driver driver_acl7225b = {
|
||||
COMEDI_INITCLEANUP(driver_acl7225b);
|
||||
|
||||
static int acl7225b_do_insn(struct comedi_device *dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -72,7 +72,7 @@ static int acl7225b_do_insn(struct comedi_device *dev, struct comedi_subdevice *
|
||||
}
|
||||
|
||||
static int acl7225b_di_insn(struct comedi_device *dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
|
@ -219,8 +219,8 @@ int i_InsnConfig_InitTimer(struct comedi_device *dev,struct comedi_subdevice *s,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnConfigInitTimer(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnConfigInitTimer(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
int i_ReturnValue = 0;
|
||||
@ -448,9 +448,9 @@ i_ReturnValue=insn->n;
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnWriteEnableDisableTimer(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_DummyRead;
|
||||
@ -595,7 +595,7 @@ int i_APCI1710_InsnReadAllTimerValue(struct comedi_device *dev, struct comedi_su
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned char b_ModulNbr, b_ReadType;
|
||||
unsigned int * pul_TimerValueArray;
|
||||
unsigned int *pul_TimerValueArray;
|
||||
|
||||
b_ModulNbr = CR_AREF(insn->chanspec);
|
||||
b_ReadType = CR_CHAN(insn->chanspec);
|
||||
@ -681,8 +681,8 @@ struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char b_BitsType;
|
||||
int i_ReturnValue = 0;
|
||||
@ -760,9 +760,9 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device * dev, struct comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_ReadTimerValue(struct comedi_device * dev,
|
||||
int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
|
||||
unsigned int * pul_TimerValue)
|
||||
unsigned int *pul_TimerValue)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -848,9 +848,9 @@ int i_APCI1710_ReadTimerValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_GetTimerOutputLevel(struct comedi_device * dev,
|
||||
int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
|
||||
unsigned char * pb_OutputLevel)
|
||||
unsigned char *pb_OutputLevel)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_TimerStatus;
|
||||
@ -929,7 +929,7 @@ int i_APCI1710_GetTimerOutputLevel(struct comedi_device * dev,
|
||||
|
||||
int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
|
||||
unsigned char * pb_TimerStatus)
|
||||
unsigned char *pb_TimerStatus)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_TimerStatus;
|
||||
@ -1006,7 +1006,7 @@ int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_WriteTimerValue(struct comedi_device * dev,
|
||||
int i_APCI1710_WriteTimerValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
|
||||
unsigned int ul_WriteValue)
|
||||
{
|
||||
|
@ -55,15 +55,15 @@ int i_APCI1710_InsnBitsTimer(struct comedi_device *dev, struct comedi_subdevice
|
||||
*/
|
||||
int i_APCI1710_ReadTimerValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
|
||||
unsigned int * pul_TimerValue);
|
||||
unsigned int *pul_TimerValue);
|
||||
|
||||
int i_APCI1710_GetTimerOutputLevel(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
|
||||
unsigned char * pb_OutputLevel);
|
||||
unsigned char *pb_OutputLevel);
|
||||
|
||||
int i_APCI1710_GetTimerProgressStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_TimerNbr,
|
||||
unsigned char * pb_TimerStatus);
|
||||
unsigned char *pb_TimerStatus);
|
||||
|
||||
/*
|
||||
* 82X54 WRITE FUNCTION
|
||||
|
@ -131,8 +131,8 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnConfigInitChrono(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnConfigInitChrono(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int ul_TimerValue = 0;
|
||||
@ -840,8 +840,8 @@ struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnWriteEnableDisableChrono(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned char b_ModulNbr, b_CycleMode, b_InterruptEnable, b_Action;
|
||||
@ -1090,8 +1090,8 @@ struct comedi_insn *insn,unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnReadChrono(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnReadChrono(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char b_ReadType;
|
||||
int i_ReturnValue = insn->n;
|
||||
@ -1194,8 +1194,8 @@ int i_APCI1710_InsnReadChrono(struct comedi_device * dev, struct comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_ChronoStatus)
|
||||
int i_APCI1710_GetChronoProgressStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char *pb_ChronoStatus)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_Status;
|
||||
@ -1355,9 +1355,9 @@ int i_APCI1710_GetChronoProgressStatus(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_ReadChronoValue(struct comedi_device * dev,
|
||||
int i_APCI1710_ReadChronoValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned int ui_TimeOut, unsigned char * pb_ChronoStatus, unsigned int * pul_ChronoValue)
|
||||
unsigned int ui_TimeOut, unsigned char *pb_ChronoStatus, unsigned int *pul_ChronoValue)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_Status;
|
||||
@ -1619,13 +1619,13 @@ int i_APCI1710_ReadChronoValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
|
||||
int i_APCI1710_ConvertChronoValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned int ul_ChronoValue,
|
||||
unsigned int * pul_Hour,
|
||||
unsigned char * pb_Minute,
|
||||
unsigned char * pb_Second,
|
||||
unsigned int * pui_MilliSecond, unsigned int * pui_MicroSecond, unsigned int * pui_NanoSecond)
|
||||
unsigned int *pul_Hour,
|
||||
unsigned char *pb_Minute,
|
||||
unsigned char *pb_Second,
|
||||
unsigned int *pui_MilliSecond, unsigned int *pui_MicroSecond, unsigned int *pui_NanoSecond)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
double d_Hour;
|
||||
@ -1876,14 +1876,14 @@ int i_APCI1710_ConvertChronoValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnBitsChronoDigitalIO(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned char b_ModulNbr, b_OutputChannel, b_InputChannel, b_IOType;
|
||||
unsigned int dw_Status;
|
||||
unsigned char * pb_ChannelStatus;
|
||||
unsigned char * pb_PortValue;
|
||||
unsigned char *pb_ChannelStatus;
|
||||
unsigned char *pb_PortValue;
|
||||
|
||||
b_ModulNbr = CR_AREF(insn->chanspec);
|
||||
i_ReturnValue = insn->n;
|
||||
|
@ -50,21 +50,21 @@ int i_APCI1710_InsnReadChrono(struct comedi_device *dev, struct comedi_subdevice
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
int i_APCI1710_GetChronoProgressStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_ChronoStatus);
|
||||
unsigned char b_ModulNbr, unsigned char *pb_ChronoStatus);
|
||||
|
||||
int i_APCI1710_ReadChronoValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned int ui_TimeOut, unsigned char * pb_ChronoStatus,
|
||||
unsigned int * pul_ChronoValue);
|
||||
unsigned int ui_TimeOut, unsigned char *pb_ChronoStatus,
|
||||
unsigned int *pul_ChronoValue);
|
||||
|
||||
int i_APCI1710_ConvertChronoValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned int ul_ChronoValue,
|
||||
unsigned int * pul_Hour,
|
||||
unsigned char * pb_Minute,
|
||||
unsigned char * pb_Second,
|
||||
unsigned int * pui_MilliSecond, unsigned int * pui_MicroSecond,
|
||||
unsigned int * pui_NanoSecond);
|
||||
unsigned int *pul_Hour,
|
||||
unsigned char *pb_Minute,
|
||||
unsigned char *pb_Second,
|
||||
unsigned int *pui_MilliSecond, unsigned int *pui_MicroSecond,
|
||||
unsigned int *pui_NanoSecond);
|
||||
|
||||
/*
|
||||
* CHRONOMETER DIGITAL INPUT OUTPUT FUNCTION
|
||||
|
@ -99,8 +99,8 @@ Activates and deactivates the digital output memory.
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnConfigDigitalIO(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnConfigDigitalIO(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char b_ModulNbr, b_ChannelAMode, b_ChannelBMode;
|
||||
unsigned char b_MemoryOnOff, b_ConfigType;
|
||||
@ -293,13 +293,13 @@ int i_APCI1710_InsnConfigDigitalIO(struct comedi_device * dev, struct comedi_sub
|
||||
* unsigned char_ b_ModulNbr, unsigned char_ b_InputChannel,
|
||||
* unsigned char *_ pb_ChannelStatus)
|
||||
*/
|
||||
int i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg;
|
||||
unsigned char b_ModulNbr, b_InputChannel;
|
||||
unsigned char * pb_ChannelStatus;
|
||||
unsigned char *pb_ChannelStatus;
|
||||
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
|
||||
b_InputChannel = (unsigned char) CR_CHAN(insn->chanspec);
|
||||
data[0] = 0;
|
||||
@ -481,8 +481,8 @@ int i_APCI1710_InsnReadDigitalIOChlValue(struct comedi_device * dev,
|
||||
* _INT_ i_APCI1710_SetDigitalIOChlOn (unsigned char_ b_BoardHandle,
|
||||
* unsigned char_ b_ModulNbr, unsigned char_ b_OutputChannel)
|
||||
*/
|
||||
int i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_WriteValue = 0;
|
||||
@ -731,8 +731,8 @@ int i_APCI1710_InsnWriteDigitalIOChlOnOff(struct comedi_device * dev,
|
||||
* b_BoardHandle, unsigned char_ b_ModulNbr, unsigned char_
|
||||
* b_PortValue)
|
||||
*/
|
||||
int i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_WriteValue = 0;
|
||||
@ -740,7 +740,7 @@ int i_APCI1710_InsnBitsDigitalIOPortOnOff(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, b_PortValue;
|
||||
unsigned char b_PortOperation, b_PortOnOFF;
|
||||
|
||||
unsigned char * pb_PortValue;
|
||||
unsigned char *pb_PortValue;
|
||||
|
||||
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
|
||||
b_PortOperation = (unsigned char) data[0]; /* Input or output */
|
||||
|
@ -75,8 +75,8 @@ struct comedi_insn *insn,unsigned int *data)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnConfigINCCPT(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_ConfigType;
|
||||
int i_ReturnValue = 0;
|
||||
@ -299,7 +299,7 @@ int i_APCI1710_InsnConfigINCCPT(struct comedi_device * dev, struct comedi_subdev
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InitCounter(struct comedi_device * dev,
|
||||
int i_APCI1710_InitCounter(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned char b_CounterRange,
|
||||
unsigned char b_FirstCounterModus,
|
||||
@ -545,7 +545,7 @@ int i_APCI1710_InitCounter(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_CounterAutoTest(struct comedi_device * dev, unsigned char * pb_TestStatus)
|
||||
int i_APCI1710_CounterAutoTest(struct comedi_device *dev, unsigned char *pb_TestStatus)
|
||||
{
|
||||
unsigned char b_ModulCpt = 0;
|
||||
int i_ReturnValue = 0;
|
||||
@ -708,7 +708,7 @@ int i_APCI1710_CounterAutoTest(struct comedi_device * dev, unsigned char * pb_Te
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InitIndex(struct comedi_device * dev,
|
||||
int i_APCI1710_InitIndex(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned char b_ReferenceAction,
|
||||
unsigned char b_IndexOperation, unsigned char b_AutoMode, unsigned char b_InterruptEnable)
|
||||
@ -1152,7 +1152,7 @@ int i_APCI1710_InitIndex(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InitReference(struct comedi_device * dev,
|
||||
int i_APCI1710_InitReference(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_ReferenceLevel)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
@ -1277,7 +1277,7 @@ int i_APCI1710_InitReference(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InitExternalStrobe(struct comedi_device * dev,
|
||||
int i_APCI1710_InitExternalStrobe(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_ExternalStrobe, unsigned char b_ExternalStrobeLevel)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
@ -1391,7 +1391,7 @@ int i_APCI1710_InitExternalStrobe(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InitCompareLogic(struct comedi_device * dev,
|
||||
int i_APCI1710_InitCompareLogic(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned int ui_CompareValue)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
@ -1487,11 +1487,11 @@ int i_APCI1710_InitCompareLogic(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InitFrequencyMeasurement(struct comedi_device * dev,
|
||||
int i_APCI1710_InitFrequencyMeasurement(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned char b_PCIInputClock,
|
||||
unsigned char b_TimingUnity,
|
||||
unsigned int ul_TimingInterval, unsigned int * pul_RealTimingInterval)
|
||||
unsigned int ul_TimingInterval, unsigned int *pul_RealTimingInterval)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int ul_TimerValue = 0;
|
||||
@ -2015,8 +2015,8 @@ struct comedi_insn *insn,unsigned int *data) |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnBitsINCCPT(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_BitsType;
|
||||
int i_ReturnValue = 0;
|
||||
@ -2091,7 +2091,7 @@ int i_APCI1710_InsnBitsINCCPT(struct comedi_device * dev, struct comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_ClearCounterValue(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
int i_APCI1710_ClearCounterValue(struct comedi_device *dev, unsigned char b_ModulNbr)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -2151,7 +2151,7 @@ int i_APCI1710_ClearCounterValue(struct comedi_device * dev, unsigned char b_Mod
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_ClearAllCounterValue(struct comedi_device * dev)
|
||||
int i_APCI1710_ClearAllCounterValue(struct comedi_device *dev)
|
||||
{
|
||||
unsigned char b_ModulCpt = 0;
|
||||
int i_ReturnValue = 0;
|
||||
@ -2297,7 +2297,7 @@ int i_APCI1710_ClearAllCounterValue(struct comedi_device * dev)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_SetInputFilter(struct comedi_device * dev,
|
||||
int i_APCI1710_SetInputFilter(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_PCIInputClock, unsigned char b_Filter)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
@ -2561,7 +2561,7 @@ int i_APCI1710_SetInputFilter(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_LatchCounter(struct comedi_device * dev,
|
||||
int i_APCI1710_LatchCounter(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_LatchReg)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
@ -2658,7 +2658,7 @@ int i_APCI1710_LatchCounter(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_SetIndexAndReferenceSource(struct comedi_device * dev,
|
||||
int i_APCI1710_SetIndexAndReferenceSource(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_SourceSelection)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
@ -2795,7 +2795,7 @@ int i_APCI1710_SetIndexAndReferenceSource(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_SetDigitalChlOn(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
int i_APCI1710_SetDigitalChlOn(struct comedi_device *dev, unsigned char b_ModulNbr)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -2875,7 +2875,7 @@ int i_APCI1710_SetDigitalChlOn(struct comedi_device * dev, unsigned char b_Modul
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_SetDigitalChlOff(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
int i_APCI1710_SetDigitalChlOff(struct comedi_device *dev, unsigned char b_ModulNbr)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -2951,8 +2951,8 @@ struct comedi_insn *insn,unsigned int *data) |
|
||||
| Return Value :
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnWriteINCCPT(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_WriteType;
|
||||
int i_ReturnValue = 0;
|
||||
@ -3047,7 +3047,7 @@ int i_APCI1710_InsnWriteINCCPT(struct comedi_device * dev, struct comedi_subdevi
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_EnableLatchInterrupt(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
int i_APCI1710_EnableLatchInterrupt(struct comedi_device *dev, unsigned char b_ModulNbr)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -3133,7 +3133,7 @@ int i_APCI1710_EnableLatchInterrupt(struct comedi_device * dev, unsigned char b_
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_DisableLatchInterrupt(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
int i_APCI1710_DisableLatchInterrupt(struct comedi_device *dev, unsigned char b_ModulNbr)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -3231,7 +3231,7 @@ int i_APCI1710_DisableLatchInterrupt(struct comedi_device * dev, unsigned char b
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_Write16BitCounterValue(struct comedi_device * dev,
|
||||
int i_APCI1710_Write16BitCounterValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_SelectedCounter, unsigned int ui_WriteValue)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
@ -3316,7 +3316,7 @@ int i_APCI1710_Write16BitCounterValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_Write32BitCounterValue(struct comedi_device * dev,
|
||||
int i_APCI1710_Write32BitCounterValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned int ul_WriteValue)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
@ -3383,7 +3383,7 @@ int i_APCI1710_Write32BitCounterValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_EnableIndex(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
int i_APCI1710_EnableIndex(struct comedi_device *dev, unsigned char b_ModulNbr)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int ul_InterruptLatchReg;
|
||||
@ -3481,7 +3481,7 @@ int i_APCI1710_EnableIndex(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_DisableIndex(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
int i_APCI1710_DisableIndex(struct comedi_device *dev, unsigned char b_ModulNbr)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -3580,7 +3580,7 @@ int i_APCI1710_DisableIndex(struct comedi_device * dev, unsigned char b_ModulNbr
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_EnableCompareLogic(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
int i_APCI1710_EnableCompareLogic(struct comedi_device *dev, unsigned char b_ModulNbr)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -3680,7 +3680,7 @@ int i_APCI1710_EnableCompareLogic(struct comedi_device * dev, unsigned char b_Mo
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_DisableCompareLogic(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
int i_APCI1710_DisableCompareLogic(struct comedi_device *dev, unsigned char b_ModulNbr)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -3789,7 +3789,7 @@ int i_APCI1710_DisableCompareLogic(struct comedi_device * dev, unsigned char b_M
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_EnableFrequencyMeasurement(struct comedi_device * dev,
|
||||
int i_APCI1710_EnableFrequencyMeasurement(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_InterruptEnable)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
@ -3936,7 +3936,7 @@ int i_APCI1710_EnableFrequencyMeasurement(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_DisableFrequencyMeasurement(struct comedi_device * dev, unsigned char b_ModulNbr)
|
||||
int i_APCI1710_DisableFrequencyMeasurement(struct comedi_device *dev, unsigned char b_ModulNbr)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -4049,8 +4049,8 @@ struct comedi_insn *insn,unsigned int *data) |
|
||||
| Return Value :
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnReadINCCPT(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_ReadType;
|
||||
int i_ReturnValue = 0;
|
||||
@ -4193,8 +4193,8 @@ int i_APCI1710_InsnReadINCCPT(struct comedi_device * dev, struct comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_ReadLatchRegisterStatus(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_LatchReg, unsigned char * pb_LatchStatus)
|
||||
int i_APCI1710_ReadLatchRegisterStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_LatchReg, unsigned char *pb_LatchStatus)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_LatchReg;
|
||||
@ -4280,8 +4280,8 @@ int i_APCI1710_ReadLatchRegisterStatus(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_ReadLatchRegisterValue(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_LatchReg, unsigned int * pul_LatchValue)
|
||||
int i_APCI1710_ReadLatchRegisterValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_LatchReg, unsigned int *pul_LatchValue)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -4364,8 +4364,8 @@ int i_APCI1710_ReadLatchRegisterValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_Read16BitCounterValue(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_SelectedCounter, unsigned int * pui_CounterValue)
|
||||
int i_APCI1710_Read16BitCounterValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_SelectedCounter, unsigned int *pui_CounterValue)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_LathchValue = 0;
|
||||
@ -4459,8 +4459,8 @@ int i_APCI1710_Read16BitCounterValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_Read32BitCounterValue(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned int * pul_CounterValue)
|
||||
int i_APCI1710_Read32BitCounterValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned int *pul_CounterValue)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
|
||||
@ -4535,8 +4535,8 @@ int i_APCI1710_Read32BitCounterValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_GetIndexStatus(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_IndexStatus)
|
||||
int i_APCI1710_GetIndexStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char *pb_IndexStatus)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg = 0;
|
||||
@ -4619,8 +4619,8 @@ int i_APCI1710_GetIndexStatus(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_GetReferenceStatus(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_ReferenceStatus)
|
||||
int i_APCI1710_GetReferenceStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char *pb_ReferenceStatus)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg = 0;
|
||||
@ -4703,8 +4703,8 @@ int i_APCI1710_GetReferenceStatus(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_GetUASStatus(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_UASStatus)
|
||||
int i_APCI1710_GetUASStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char *pb_UASStatus)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg = 0;
|
||||
@ -4771,8 +4771,8 @@ int i_APCI1710_GetUASStatus(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_GetCBStatus(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_CBStatus)
|
||||
int i_APCI1710_GetCBStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char *pb_CBStatus)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg = 0;
|
||||
@ -4853,8 +4853,8 @@ int i_APCI1710_GetCBStatus(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_Get16BitCBStatus(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_CBStatusCounter0, unsigned char * pb_CBStatusCounter1)
|
||||
int i_APCI1710_Get16BitCBStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char *pb_CBStatusCounter0, unsigned char *pb_CBStatusCounter1)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg = 0;
|
||||
@ -4966,8 +4966,8 @@ int i_APCI1710_Get16BitCBStatus(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_GetUDStatus(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_UDStatus)
|
||||
int i_APCI1710_GetUDStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char *pb_UDStatus)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg = 0;
|
||||
@ -5040,8 +5040,8 @@ int i_APCI1710_GetUDStatus(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device * dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_UDStatus)
|
||||
int i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char *pb_UDStatus)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg = 0;
|
||||
@ -5145,9 +5145,9 @@ int i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_ReadFrequencyMeasurement(struct comedi_device * dev,
|
||||
int i_APCI1710_ReadFrequencyMeasurement(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned char * pb_Status, unsigned char * pb_UDStatus, unsigned int * pul_ReadValue)
|
||||
unsigned char *pb_Status, unsigned char *pb_UDStatus, unsigned int *pul_ReadValue)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int ui_16BitValue;
|
||||
|
@ -178,7 +178,7 @@ int i_APCI1710_InitFrequencyMeasurement(struct comedi_device *dev,
|
||||
unsigned char b_PCIInputClock,
|
||||
unsigned char b_TimingUnity,
|
||||
unsigned int ul_TimingInterval,
|
||||
unsigned int * pul_RealTimingInterval);
|
||||
unsigned int *pul_RealTimingInterval);
|
||||
|
||||
/* INSN BITS */
|
||||
int i_APCI1710_ClearCounterValue(struct comedi_device *dev, unsigned char b_ModulNbr);
|
||||
@ -230,42 +230,42 @@ int i_APCI1710_DisableFrequencyMeasurement(struct comedi_device *dev,
|
||||
/* INSN READ */
|
||||
int i_APCI1710_ReadLatchRegisterStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_LatchReg,
|
||||
unsigned char * pb_LatchStatus);
|
||||
unsigned char *pb_LatchStatus);
|
||||
|
||||
int i_APCI1710_ReadLatchRegisterValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_LatchReg,
|
||||
unsigned int * pul_LatchValue);
|
||||
unsigned int *pul_LatchValue);
|
||||
|
||||
int i_APCI1710_Read16BitCounterValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char b_SelectedCounter,
|
||||
unsigned int * pui_CounterValue);
|
||||
unsigned int *pui_CounterValue);
|
||||
|
||||
int i_APCI1710_Read32BitCounterValue(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned int * pul_CounterValue);
|
||||
unsigned char b_ModulNbr, unsigned int *pul_CounterValue);
|
||||
|
||||
int i_APCI1710_GetIndexStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_IndexStatus);
|
||||
unsigned char b_ModulNbr, unsigned char *pb_IndexStatus);
|
||||
|
||||
int i_APCI1710_GetReferenceStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_ReferenceStatus);
|
||||
unsigned char b_ModulNbr, unsigned char *pb_ReferenceStatus);
|
||||
|
||||
int i_APCI1710_GetUASStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_UASStatus);
|
||||
unsigned char b_ModulNbr, unsigned char *pb_UASStatus);
|
||||
|
||||
int i_APCI1710_GetCBStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_CBStatus);
|
||||
unsigned char b_ModulNbr, unsigned char *pb_CBStatus);
|
||||
|
||||
int i_APCI1710_Get16BitCBStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_CBStatusCounter0,
|
||||
unsigned char * pb_CBStatusCounter1);
|
||||
unsigned char b_ModulNbr, unsigned char *pb_CBStatusCounter0,
|
||||
unsigned char *pb_CBStatusCounter1);
|
||||
|
||||
int i_APCI1710_GetUDStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_UDStatus);
|
||||
unsigned char b_ModulNbr, unsigned char *pb_UDStatus);
|
||||
|
||||
int i_APCI1710_GetInterruptUDLatchedStatus(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr, unsigned char * pb_UDStatus);
|
||||
unsigned char b_ModulNbr, unsigned char *pb_UDStatus);
|
||||
|
||||
int i_APCI1710_ReadFrequencyMeasurement(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned char * pb_Status, unsigned char * pb_UDStatus,
|
||||
unsigned int * pul_ReadValue);
|
||||
unsigned char *pb_Status, unsigned char *pb_UDStatus,
|
||||
unsigned int *pul_ReadValue);
|
||||
|
@ -123,8 +123,8 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_IntRegister;
|
||||
@ -414,8 +414,8 @@ int i_APCI1710_InsnConfigInitPulseEncoder(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned char b_ModulNbr;
|
||||
@ -708,16 +708,16 @@ int i_APCI1710_InsnWriteEnableDisablePulseEncoder(struct comedi_device * dev,
|
||||
|
||||
unsigned char *_ pb_Status)
|
||||
*/
|
||||
int i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusRegister;
|
||||
unsigned char b_ModulNbr;
|
||||
unsigned char b_PulseEncoderNbr;
|
||||
unsigned char * pb_Status;
|
||||
unsigned char *pb_Status;
|
||||
unsigned char b_Type;
|
||||
unsigned int * pul_ReadValue;
|
||||
unsigned int *pul_ReadValue;
|
||||
unsigned int ul_WriteValue;
|
||||
|
||||
i_ReturnValue = insn->n;
|
||||
@ -834,8 +834,8 @@ int i_APCI1710_InsnBitsReadWritePulseEncoder(struct comedi_device * dev,
|
||||
return (i_ReturnValue);
|
||||
}
|
||||
|
||||
int i_APCI1710_InsnReadInterruptPulseEncoder(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnReadInterruptPulseEncoder(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
data[0] = devpriv->s_InterruptParameters.
|
||||
|
@ -70,8 +70,8 @@ struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnConfigPWM(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char b_ConfigType;
|
||||
int i_ReturnValue = 0;
|
||||
@ -179,14 +179,14 @@ int i_APCI1710_InsnConfigPWM(struct comedi_device * dev, struct comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InitPWM(struct comedi_device * dev,
|
||||
int i_APCI1710_InitPWM(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned char b_PWM,
|
||||
unsigned char b_ClockSelection,
|
||||
unsigned char b_TimingUnit,
|
||||
unsigned int ul_LowTiming,
|
||||
unsigned int ul_HighTiming,
|
||||
unsigned int * pul_RealLowTiming, unsigned int * pul_RealHighTiming)
|
||||
unsigned int *pul_RealLowTiming, unsigned int *pul_RealHighTiming)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int ul_LowTimerValue = 0;
|
||||
@ -1534,16 +1534,16 @@ int i_APCI1710_InitPWM(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_GetPWMInitialisation(struct comedi_device * dev,
|
||||
int i_APCI1710_GetPWMInitialisation(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned char b_PWM,
|
||||
unsigned char * pb_TimingUnit,
|
||||
unsigned int * pul_LowTiming,
|
||||
unsigned int * pul_HighTiming,
|
||||
unsigned char * pb_StartLevel,
|
||||
unsigned char * pb_StopMode,
|
||||
unsigned char * pb_StopLevel,
|
||||
unsigned char * pb_ExternGate, unsigned char * pb_InterruptEnable, unsigned char * pb_Enable)
|
||||
unsigned char *pb_TimingUnit,
|
||||
unsigned int *pul_LowTiming,
|
||||
unsigned int *pul_HighTiming,
|
||||
unsigned char *pb_StartLevel,
|
||||
unsigned char *pb_StopMode,
|
||||
unsigned char *pb_StopLevel,
|
||||
unsigned char *pb_ExternGate, unsigned char *pb_InterruptEnable, unsigned char *pb_Enable)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_Status;
|
||||
@ -1683,8 +1683,8 @@ struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnWritePWM(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char b_WriteType;
|
||||
int i_ReturnValue = 0;
|
||||
@ -1806,7 +1806,7 @@ int i_APCI1710_InsnWritePWM(struct comedi_device * dev, struct comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_EnablePWM(struct comedi_device * dev,
|
||||
int i_APCI1710_EnablePWM(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned char b_PWM,
|
||||
unsigned char b_StartLevel,
|
||||
@ -2062,7 +2062,7 @@ int i_APCI1710_EnablePWM(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_DisablePWM(struct comedi_device * dev, unsigned char b_ModulNbr, unsigned char b_PWM)
|
||||
int i_APCI1710_DisablePWM(struct comedi_device *dev, unsigned char b_ModulNbr, unsigned char b_PWM)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_Status;
|
||||
@ -2189,7 +2189,7 @@ int i_APCI1710_DisablePWM(struct comedi_device * dev, unsigned char b_ModulNbr,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
|
||||
int i_APCI1710_SetNewPWMTiming(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned char b_PWM, unsigned char b_TimingUnit, unsigned int ul_LowTiming, unsigned int ul_HighTiming)
|
||||
{
|
||||
@ -3460,16 +3460,16 @@ int i_APCI1710_SetNewPWMTiming(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_Status;
|
||||
|
||||
unsigned char b_ModulNbr;
|
||||
unsigned char b_PWM;
|
||||
unsigned char * pb_PWMOutputStatus;
|
||||
unsigned char * pb_ExternGateStatus;
|
||||
unsigned char *pb_PWMOutputStatus;
|
||||
unsigned char *pb_ExternGateStatus;
|
||||
|
||||
i_ReturnValue = insn->n;
|
||||
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
|
||||
@ -3561,8 +3561,8 @@ int i_APCI1710_InsnReadGetPWMStatus(struct comedi_device * dev, struct comedi_su
|
||||
return (i_ReturnValue);
|
||||
}
|
||||
|
||||
int i_APCI1710_InsnBitsReadPWMInterrupt(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnBitsReadPWMInterrupt(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = devpriv->s_InterruptParameters.
|
||||
s_FIFOInterruptParameters[devpriv->
|
||||
|
@ -36,19 +36,19 @@ int i_APCI1710_InitPWM(struct comedi_device *dev,
|
||||
unsigned char b_TimingUnit,
|
||||
unsigned int ul_LowTiming,
|
||||
unsigned int ul_HighTiming,
|
||||
unsigned int * pul_RealLowTiming, unsigned int * pul_RealHighTiming);
|
||||
unsigned int *pul_RealLowTiming, unsigned int *pul_RealHighTiming);
|
||||
|
||||
int i_APCI1710_GetPWMInitialisation(struct comedi_device *dev,
|
||||
unsigned char b_ModulNbr,
|
||||
unsigned char b_PWM,
|
||||
unsigned char * pb_TimingUnit,
|
||||
unsigned int * pul_LowTiming,
|
||||
unsigned int * pul_HighTiming,
|
||||
unsigned char * pb_StartLevel,
|
||||
unsigned char * pb_StopMode,
|
||||
unsigned char * pb_StopLevel,
|
||||
unsigned char * pb_ExternGate,
|
||||
unsigned char * pb_InterruptEnable, unsigned char * pb_Enable);
|
||||
unsigned char *pb_TimingUnit,
|
||||
unsigned int *pul_LowTiming,
|
||||
unsigned int *pul_HighTiming,
|
||||
unsigned char *pb_StartLevel,
|
||||
unsigned char *pb_StopMode,
|
||||
unsigned char *pb_StopLevel,
|
||||
unsigned char *pb_ExternGate,
|
||||
unsigned char *pb_InterruptEnable, unsigned char *pb_Enable);
|
||||
|
||||
int i_APCI1710_InsnWritePWM(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
@ -133,8 +133,8 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnConfigInitSSI(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnConfigInitSSI(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int ui_TimerValue;
|
||||
@ -400,8 +400,8 @@ pul_Position = (unsigned int *) &data[0];
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnReadSSIValue(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned char b_Cpt;
|
||||
@ -416,10 +416,10 @@ int i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdev
|
||||
unsigned char b_ModulNbr;
|
||||
unsigned char b_SelectedSSI;
|
||||
unsigned char b_ReadType;
|
||||
unsigned int * pul_Position;
|
||||
unsigned int * pul_TurnCpt;
|
||||
unsigned int * pul_Position1;
|
||||
unsigned int * pul_TurnCpt1;
|
||||
unsigned int *pul_Position;
|
||||
unsigned int *pul_TurnCpt;
|
||||
unsigned int *pul_Position1;
|
||||
unsigned int *pul_TurnCpt1;
|
||||
|
||||
i_ReturnValue = insn->n;
|
||||
pul_Position1 = (unsigned int *) & data[0];
|
||||
@ -735,15 +735,15 @@ int i_APCI1710_InsnReadSSIValue(struct comedi_device * dev, struct comedi_subdev
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnBitsSSIDigitalIO(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg;
|
||||
unsigned char b_ModulNbr;
|
||||
unsigned char b_InputChannel;
|
||||
unsigned char * pb_ChannelStatus;
|
||||
unsigned char * pb_InputStatus;
|
||||
unsigned char *pb_ChannelStatus;
|
||||
unsigned char *pb_InputStatus;
|
||||
unsigned char b_IOType;
|
||||
i_ReturnValue = insn->n;
|
||||
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
|
||||
|
@ -130,8 +130,8 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int ul_TimerValue = 0;
|
||||
@ -987,8 +987,8 @@ int i_APCI1710_InsnConfigInitTorCounter(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_Status;
|
||||
@ -1460,20 +1460,20 @@ int i_APCI1710_InsnWriteEnableDisableTorCounter(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_Status;
|
||||
unsigned char b_ModulNbr;
|
||||
unsigned char b_TorCounter;
|
||||
unsigned char * pb_TimingUnit;
|
||||
unsigned int * pul_TimingInterval;
|
||||
unsigned char * pb_InputMode;
|
||||
unsigned char * pb_ExternGate;
|
||||
unsigned char * pb_CycleMode;
|
||||
unsigned char * pb_Enable;
|
||||
unsigned char * pb_InterruptEnable;
|
||||
unsigned char *pb_TimingUnit;
|
||||
unsigned int *pul_TimingInterval;
|
||||
unsigned char *pb_InputMode;
|
||||
unsigned char *pb_ExternGate;
|
||||
unsigned char *pb_CycleMode;
|
||||
unsigned char *pb_Enable;
|
||||
unsigned char *pb_InterruptEnable;
|
||||
|
||||
i_ReturnValue = insn->n;
|
||||
b_ModulNbr = CR_AREF(insn->chanspec);
|
||||
@ -1700,8 +1700,8 @@ int i_APCI1710_InsnReadGetTorCounterInitialisation(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_Status;
|
||||
@ -1711,8 +1711,8 @@ int i_APCI1710_InsnBitsGetTorCounterProgressStatusAndValue(struct comedi_device
|
||||
unsigned char b_TorCounter;
|
||||
unsigned char b_ReadType;
|
||||
unsigned int ui_TimeOut;
|
||||
unsigned char * pb_TorCounterStatus;
|
||||
unsigned int * pul_TorCounterValue;
|
||||
unsigned char *pb_TorCounterStatus;
|
||||
unsigned int *pul_TorCounterValue;
|
||||
|
||||
i_ReturnValue = insn->n;
|
||||
b_ModulNbr = CR_AREF(insn->chanspec);
|
||||
|
@ -100,8 +100,8 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnConfigInitTTLIO(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnConfigInitTTLIO(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned char b_ModulNbr;
|
||||
@ -406,8 +406,8 @@ APCI1710_TTL_READCHANNEL
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnBitsReadTTLIO(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg;
|
||||
@ -415,8 +415,8 @@ int i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subde
|
||||
unsigned char b_SelectedPort;
|
||||
unsigned char b_InputChannel;
|
||||
unsigned char b_ReadType;
|
||||
unsigned char * pb_ChannelStatus;
|
||||
unsigned char * pb_PortValue;
|
||||
unsigned char *pb_ChannelStatus;
|
||||
unsigned char *pb_PortValue;
|
||||
|
||||
i_ReturnValue = insn->n;
|
||||
b_ReadType = (unsigned char) data[0];
|
||||
@ -655,13 +655,13 @@ int i_APCI1710_InsnBitsReadTTLIO(struct comedi_device * dev, struct comedi_subde
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg;
|
||||
unsigned char b_ModulNbr;
|
||||
unsigned int * pul_PortValue;
|
||||
unsigned int *pul_PortValue;
|
||||
|
||||
b_ModulNbr = (unsigned char) CR_AREF(insn->chanspec);
|
||||
i_ReturnValue = insn->n;
|
||||
@ -825,8 +825,8 @@ int i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,struct comedi
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1710_InsnWriteSetTTLIOChlOnOff(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = 0;
|
||||
unsigned int dw_StatusReg = 0;
|
||||
|
@ -68,7 +68,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
|
||||
int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
|
||||
unsigned int dw_PCIBoardEepromAddress,
|
||||
unsigned short w_EepromStartAddress, unsigned short * pw_DataRead)
|
||||
unsigned short w_EepromStartAddress, unsigned short *pw_DataRead)
|
||||
{
|
||||
unsigned int dw_eeprom_busy = 0;
|
||||
int i_Counter = 0;
|
||||
|
@ -24,4 +24,4 @@
|
||||
|
||||
int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
|
||||
unsigned int dw_PCIBoardEepromAddress,
|
||||
unsigned short w_EepromStartAddress, unsigned short * pw_DataRead);
|
||||
unsigned short w_EepromStartAddress, unsigned short *pw_DataRead);
|
||||
|
@ -2559,7 +2559,7 @@ COMEDI_PCI_INITCLEANUP(driver_addi, addi_apci_tbl);
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
static int i_ADDI_Attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret, pages, i, n_subdevices;
|
||||
@ -2926,7 +2926,7 @@ static int i_ADDI_Attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
static int i_ADDI_Detach(struct comedi_device * dev)
|
||||
static int i_ADDI_Detach(struct comedi_device *dev)
|
||||
{
|
||||
|
||||
if (dev->private) {
|
||||
@ -2992,7 +2992,7 @@ static int i_ADDI_Detach(struct comedi_device * dev)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
static int i_ADDI_Reset(struct comedi_device * dev)
|
||||
static int i_ADDI_Reset(struct comedi_device *dev)
|
||||
{
|
||||
|
||||
this_board->i_hwdrv_Reset(dev);
|
||||
@ -3046,8 +3046,8 @@ static irqreturn_t v_ADDI_Interrupt(int irq, void *d)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
static int i_ADDIDATA_InsnReadEeprom(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int i_ADDIDATA_InsnReadEeprom(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned short w_Data;
|
||||
unsigned short w_Address;
|
||||
|
@ -362,7 +362,7 @@ struct addi_private {
|
||||
unsigned int ui_AiNbrofChannels; /* how many channels is measured */
|
||||
unsigned int ui_AiScanLength; /* Length of actual scanlist */
|
||||
unsigned int ui_AiActualScanPosition; /* position in actual scan */
|
||||
unsigned int * pui_AiChannelList; /* actual chanlist */
|
||||
unsigned int *pui_AiChannelList; /* actual chanlist */
|
||||
unsigned int ui_AiChannelList[32]; /* actual chanlist */
|
||||
unsigned char b_AiChannelConfiguration[32]; /* actual chanlist */
|
||||
unsigned int ui_AiReadData[32];
|
||||
|
@ -152,7 +152,7 @@ void v_EepromClock76(unsigned int dw_Address, unsigned int dw_RegisterValue);
|
||||
void v_EepromWaitBusy(unsigned short w_PCIBoardEepromAddress);
|
||||
void v_EepromSendCommand76(unsigned int dw_Address, unsigned int dw_EepromCommand,
|
||||
unsigned char b_DataLengthInBits);
|
||||
void v_EepromCs76Read(unsigned int dw_Address, unsigned short w_offset, unsigned short * pw_Value);
|
||||
void v_EepromCs76Read(unsigned int dw_Address, unsigned short w_offset, unsigned short *pw_Value);
|
||||
|
||||
/*
|
||||
+----------------------------------------------------------------------------+
|
||||
@ -652,7 +652,7 @@ void v_EepromSendCommand76(unsigned int dw_Address, unsigned int dw_EepromComman
|
||||
|
||||
*/
|
||||
|
||||
void v_EepromCs76Read(unsigned int dw_Address, unsigned short w_offset, unsigned short * pw_Value)
|
||||
void v_EepromCs76Read(unsigned int dw_Address, unsigned short w_offset, unsigned short *pw_Value)
|
||||
{
|
||||
|
||||
char c_BitPos = 0;
|
||||
@ -985,7 +985,7 @@ int i_EepromReadDigitalInputHeader(unsigned short w_PCIBoardEepromAddress,
|
||||
*/
|
||||
int i_EepromReadDigitalOutputHeader(unsigned short w_PCIBoardEepromAddress,
|
||||
char *pc_PCIChipInformation, unsigned short w_Address,
|
||||
struct str_DigitalOutputHeader * s_Header)
|
||||
struct str_DigitalOutputHeader *s_Header)
|
||||
{
|
||||
/* Read Nbr channels */
|
||||
s_Header->w_Nchannel =
|
||||
@ -1016,7 +1016,7 @@ int i_EepromReadDigitalOutputHeader(unsigned short w_PCIBoardEepromAddress,
|
||||
*/
|
||||
int i_EepromReadTimerHeader(unsigned short w_PCIBoardEepromAddress,
|
||||
char *pc_PCIChipInformation, unsigned short w_Address,
|
||||
struct str_TimerMainHeader * s_Header)
|
||||
struct str_TimerMainHeader *s_Header)
|
||||
{
|
||||
|
||||
unsigned short i, w_Size = 0, w_Temp;
|
||||
@ -1120,7 +1120,7 @@ int i_EepromReadAnlogOutputHeader(unsigned short w_PCIBoardEepromAddress,
|
||||
/* Reads only for ONE hardware component */
|
||||
int i_EepromReadAnlogInputHeader(unsigned short w_PCIBoardEepromAddress,
|
||||
char *pc_PCIChipInformation, unsigned short w_Address,
|
||||
struct str_AnalogInputHeader * s_Header)
|
||||
struct str_AnalogInputHeader *s_Header)
|
||||
{
|
||||
unsigned short w_Temp, w_Offset;
|
||||
w_Temp = w_EepromReadWord(w_PCIBoardEepromAddress,
|
||||
|
@ -56,7 +56,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
#include "APCI1710_Pwm.c"
|
||||
#include "APCI1710_INCCPT.c"
|
||||
|
||||
void i_ADDI_AttachPCI1710(struct comedi_device * dev)
|
||||
void i_ADDI_AttachPCI1710(struct comedi_device *dev)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret = 0;
|
||||
@ -195,11 +195,11 @@ void i_ADDI_AttachPCI1710(struct comedi_device * dev)
|
||||
s->insn_bits = i_APCI1710_InsnBitsINCCPT;
|
||||
}
|
||||
|
||||
int i_APCI1710_Reset(struct comedi_device * dev);
|
||||
int i_APCI1710_Reset(struct comedi_device *dev);
|
||||
void v_APCI1710_Interrupt(int irq, void *d);
|
||||
/* for 1710 */
|
||||
|
||||
int i_APCI1710_Reset(struct comedi_device * dev)
|
||||
int i_APCI1710_Reset(struct comedi_device *dev)
|
||||
{
|
||||
int ret;
|
||||
unsigned int dw_Dummy;
|
||||
|
@ -109,8 +109,8 @@ int i_Flag = 1;
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI035_ConfigTimerWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI035_ConfigTimerWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Status = 0;
|
||||
unsigned int ui_Command = 0;
|
||||
@ -278,8 +278,8 @@ int i_APCI035_ConfigTimerWatchdog(struct comedi_device * dev, struct comedi_subd
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Command = 0;
|
||||
int i_Count = 0;
|
||||
@ -393,8 +393,8 @@ int i_APCI035_StartStopWriteTimerWatchdog(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI035_ReadTimerWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI035_ReadTimerWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Status = 0; /* Status register */
|
||||
i_WatchdogNbr = insn->unused[0];
|
||||
@ -449,8 +449,8 @@ int i_APCI035_ReadTimerWatchdog(struct comedi_device * dev, struct comedi_subdev
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI035_ConfigAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI035_ConfigAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
devpriv->tsk_Current = current;
|
||||
outl(0x200 | 0, devpriv->iobase + 128 + 0x4);
|
||||
@ -486,8 +486,8 @@ int i_APCI035_ConfigAnalogInput(struct comedi_device * dev, struct comedi_subdev
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI035_ReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI035_ReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_CommandRegister = 0;
|
||||
/******************/
|
||||
@ -521,7 +521,7 @@ int i_APCI035_ReadAnalogInput(struct comedi_device * dev, struct comedi_subdevic
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI035_Reset(struct comedi_device * dev)
|
||||
int i_APCI035_Reset(struct comedi_device *dev)
|
||||
{
|
||||
int i_Count = 0;
|
||||
for (i_Count = 1; i_Count <= 4; i_Count++) {
|
||||
|
@ -84,8 +84,8 @@ unsigned int ui_InterruptStatus = 0;
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1032_ConfigDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_TmpValue;
|
||||
|
||||
@ -144,8 +144,8 @@ int i_APCI1032_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subd
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1032_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1032_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_TmpValue = 0;
|
||||
unsigned int ui_Channel;
|
||||
@ -185,8 +185,8 @@ int i_APCI1032_Read1DigitalInput(struct comedi_device * dev, struct comedi_subde
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1032_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1032_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_PortValue = data[0];
|
||||
unsigned int ui_Mask = 0;
|
||||
@ -277,7 +277,7 @@ static void v_APCI1032_Interrupt(int irq, void *d)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1032_Reset(struct comedi_device * dev)
|
||||
int i_APCI1032_Reset(struct comedi_device *dev)
|
||||
{
|
||||
outl(0x0, devpriv->iobase + APCI1032_DIGITAL_IP_IRQ); /* disable the interrupts */
|
||||
inl(devpriv->iobase + APCI1032_DIGITAL_IP_INTERRUPT_STATUS); /* Reset the interrupt status register */
|
||||
|
@ -137,8 +137,8 @@ int i_TimerCounter1Enabled = 0, i_TimerCounter2Enabled =
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1500_ConfigDigitalInputEvent(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_ConfigDigitalInputEvent(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_PatternPolarity = 0, i_PatternTransition = 0, i_PatternMask = 0;
|
||||
int i_MaxChannel = 0, i_Count = 0, i_EventMask = 0;
|
||||
@ -519,8 +519,8 @@ int i_APCI1500_ConfigDigitalInputEvent(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1500_StartStopInputEvent(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_StartStopInputEvent(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_Event1InterruptStatus = 0, i_Event2InterruptStatus =
|
||||
0, i_RegValue;
|
||||
@ -784,8 +784,8 @@ int i_APCI1500_StartStopInputEvent(struct comedi_device * dev, struct comedi_sub
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1500_Initialisation(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_Initialisation(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_DummyRead = 0;
|
||||
/******************/
|
||||
@ -957,8 +957,8 @@ int i_APCI1500_Initialisation(struct comedi_device * dev, struct comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1500_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_PortValue = data[1];
|
||||
unsigned int ui_Mask = 0;
|
||||
@ -1040,8 +1040,8 @@ int i_APCI1500_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_su
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
devpriv->b_OutputMemoryStatus = data[0];
|
||||
return insn->n;
|
||||
@ -1067,8 +1067,8 @@ int i_APCI1500_ConfigDigitalOutputErrorInterrupt(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1500_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
static unsigned int ui_Temp = 0;
|
||||
unsigned int ui_Temp1;
|
||||
@ -1261,8 +1261,8 @@ int i_APCI1500_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subd
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_TimerCounterMode, i_MasterConfiguration;
|
||||
|
||||
@ -1860,8 +1860,8 @@ int i_APCI1500_ConfigCounterTimerWatchdog(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_CommandAndStatusValue;
|
||||
|
||||
@ -2182,8 +2182,8 @@ int i_APCI1500_StartStopTriggerTimerCounterWatchdog(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_CommandAndStatusValue;
|
||||
switch (data[0]) {
|
||||
@ -2370,8 +2370,8 @@ int i_APCI1500_ReadCounterTimerWatchdog(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1500_ReadInterruptMask(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_ReadInterruptMask(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = i_InterruptMask;
|
||||
data[1] = i_InputChannel;
|
||||
@ -2401,8 +2401,8 @@ int i_APCI1500_ReadInterruptMask(struct comedi_device * dev, struct comedi_subde
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1500_ConfigureInterrupt(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1500_ConfigureInterrupt(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Status;
|
||||
int i_RegValue;
|
||||
@ -2822,7 +2822,7 @@ static void v_APCI1500_Interrupt(int irq, void *d)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1500_Reset(struct comedi_device * dev)
|
||||
int i_APCI1500_Reset(struct comedi_device *dev)
|
||||
{
|
||||
int i_DummyRead = 0;
|
||||
i_TimerCounter1Init = 0;
|
||||
|
@ -73,8 +73,8 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1516_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1516_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_TmpValue = 0;
|
||||
unsigned int ui_Channel;
|
||||
@ -114,8 +114,8 @@ int i_APCI1516_Read1DigitalInput(struct comedi_device * dev, struct comedi_subde
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1516_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1516_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
unsigned int ui_PortValue = data[0];
|
||||
@ -171,8 +171,8 @@ int i_APCI1516_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_su
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1516_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1516_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
devpriv->b_OutputMemoryStatus = data[0];
|
||||
return insn->n;
|
||||
@ -199,8 +199,8 @@ int i_APCI1516_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_sub
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1516_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1516_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp, ui_Temp1;
|
||||
unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */
|
||||
@ -359,8 +359,8 @@ int i_APCI1516_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subd
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1516_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1516_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
unsigned int ui_Temp;
|
||||
@ -419,8 +419,8 @@ int i_APCI1516_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subde
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1516_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1516_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (data[0] == 0) {
|
||||
/* Disable the watchdog */
|
||||
@ -465,8 +465,8 @@ int i_APCI1516_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1516_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1516_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
switch (data[0]) {
|
||||
case 0: /* stop the watchdog */
|
||||
@ -510,8 +510,8 @@ int i_APCI1516_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1516_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1516_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = inw(devpriv->i_IobaseAddon + APCI1516_WATCHDOG_STATUS) & 0x1;
|
||||
return insn->n;
|
||||
@ -532,7 +532,7 @@ int i_APCI1516_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1516_Reset(struct comedi_device * dev)
|
||||
int i_APCI1516_Reset(struct comedi_device *dev)
|
||||
{
|
||||
outw(0x0, devpriv->iobase + APCI1516_DIGITAL_OP); /* RESETS THE DIGITAL OUTPUTS */
|
||||
outw(0x0, devpriv->i_IobaseAddon + APCI1516_WATCHDOG_ENABLEDISABLE);
|
||||
|
@ -86,8 +86,8 @@ unsigned int ui_InterruptData, ui_Type;
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1564_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1564_ConfigDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
devpriv->tsk_Current = current;
|
||||
/*******************************/
|
||||
@ -147,8 +147,8 @@ int i_APCI1564_ConfigDigitalInput(struct comedi_device * dev, struct comedi_subd
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1564_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1564_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_TmpValue = 0;
|
||||
unsigned int ui_Channel;
|
||||
@ -189,8 +189,8 @@ int i_APCI1564_Read1DigitalInput(struct comedi_device * dev, struct comedi_subde
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1564_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_PortValue = data[0];
|
||||
unsigned int ui_Mask = 0;
|
||||
@ -257,8 +257,8 @@ int i_APCI1564_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_su
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1564_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ul_Command = 0;
|
||||
|
||||
@ -314,8 +314,8 @@ int i_APCI1564_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_sub
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1564_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1564_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp, ui_Temp1;
|
||||
unsigned int ui_NoOfChannel;
|
||||
@ -488,8 +488,8 @@ int i_APCI1564_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subd
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1564_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp;
|
||||
unsigned int ui_NoOfChannel;
|
||||
@ -566,8 +566,8 @@ int i_APCI1564_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subde
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ul_Command1 = 0;
|
||||
devpriv->tsk_Current = current;
|
||||
@ -720,8 +720,8 @@ int i_APCI1564_ConfigTimerCounterWatchdog(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ul_Command1 = 0;
|
||||
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
|
||||
@ -815,8 +815,8 @@ int i_APCI1564_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ul_Command1 = 0;
|
||||
|
||||
@ -894,8 +894,8 @@ int i_APCI1564_ReadTimerCounterWatchdog(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1564_ReadInterruptStatus(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI1564_ReadInterruptStatus(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
*data = ui_Type;
|
||||
return insn->n;
|
||||
@ -1083,7 +1083,7 @@ static void v_APCI1564_Interrupt(int irq, void *d)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI1564_Reset(struct comedi_device * dev)
|
||||
int i_APCI1564_Reset(struct comedi_device *dev)
|
||||
{
|
||||
outl(0x0, devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP_IRQ); /* disable the interrupts */
|
||||
inl(devpriv->i_IobaseAmcc + APCI1564_DIGITAL_IP_INTERRUPT_STATUS); /* Reset the interrupt status register */
|
||||
|
@ -90,8 +90,8 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_Command = 0;
|
||||
@ -283,8 +283,8 @@ int i_APCI16XX_InsnConfigInitTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_Command = 0;
|
||||
@ -430,8 +430,8 @@ int i_APCI16XX_InsnBitsReadTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char b_Command = (unsigned char) CR_AREF(insn->chanspec);
|
||||
int i_ReturnValue = insn->n;
|
||||
@ -570,8 +570,8 @@ int i_APCI16XX_InsnReadTTLIOAllPortValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_Command = 0;
|
||||
@ -774,7 +774,7 @@ int i_APCI16XX_InsnBitsWriteTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI16XX_Reset(struct comedi_device * dev)
|
||||
int i_APCI16XX_Reset(struct comedi_device *dev)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
@ -75,8 +75,8 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI2016_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2016_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if ((data[0] != 0) && (data[0] != 1)) {
|
||||
comedi_error(dev,
|
||||
@ -111,8 +111,8 @@ int i_APCI2016_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_sub
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI2016_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2016_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_NoOfChannel;
|
||||
unsigned int ui_Temp, ui_Temp1;
|
||||
@ -266,8 +266,8 @@ int i_APCI2016_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subd
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI2016_BitsDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2016_BitsDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp;
|
||||
unsigned int ui_NoOfChannel;
|
||||
@ -337,8 +337,8 @@ int i_APCI2016_BitsDigitalOutput(struct comedi_device * dev, struct comedi_subde
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI2016_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2016_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
if (data[0] == 0) {
|
||||
@ -380,8 +380,8 @@ int i_APCI2016_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevic
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI2016_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2016_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
switch (data[0]) {
|
||||
@ -427,8 +427,8 @@ int i_APCI2016_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2016_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2016_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
udelay(5);
|
||||
data[0] = inw(devpriv->i_IobaseAddon + APCI2016_WATCHDOG_STATUS) & 0x1;
|
||||
@ -450,7 +450,7 @@ int i_APCI2016_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2016_Reset(struct comedi_device * dev)
|
||||
int i_APCI2016_Reset(struct comedi_device *dev)
|
||||
{
|
||||
outw(0x0, devpriv->iobase + APCI2016_DIGITAL_OP); /* Resets the digital output channels */
|
||||
outw(0x0, devpriv->i_IobaseAddon + APCI2016_WATCHDOG_ENABLEDISABLE);
|
||||
|
@ -79,8 +79,8 @@ unsigned int ui_InterruptData, ui_Type;
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2032_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ul_Command = 0;
|
||||
devpriv->tsk_Current = current;
|
||||
@ -134,8 +134,8 @@ int i_APCI2032_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_sub
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2032_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2032_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp, ui_Temp1;
|
||||
unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */
|
||||
@ -313,8 +313,8 @@ int i_APCI2032_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subd
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2032_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2032_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp;
|
||||
unsigned int ui_NoOfChannel;
|
||||
@ -380,8 +380,8 @@ int i_APCI2032_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subde
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI2032_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2032_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (data[0] == 0) {
|
||||
/* Disable the watchdog */
|
||||
@ -421,8 +421,8 @@ int i_APCI2032_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2032_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2032_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
switch (data[0]) {
|
||||
case 0: /* stop the watchdog */
|
||||
@ -466,8 +466,8 @@ int i_APCI2032_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2032_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2032_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
data[0] =
|
||||
@ -544,8 +544,8 @@ void v_APCI2032_Interrupt(int irq, void *d)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2032_ReadInterruptStatus(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2032_ReadInterruptStatus(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
*data = ui_Type;
|
||||
return insn->n;
|
||||
@ -567,7 +567,7 @@ int i_APCI2032_ReadInterruptStatus(struct comedi_device * dev, struct comedi_sub
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2032_Reset(struct comedi_device * dev)
|
||||
int i_APCI2032_Reset(struct comedi_device *dev)
|
||||
{
|
||||
devpriv->b_DigitalOutputRegister = 0;
|
||||
ui_Type = 0;
|
||||
|
@ -73,8 +73,8 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI2200_Read1DigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2200_Read1DigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_TmpValue = 0;
|
||||
unsigned int ui_Channel;
|
||||
@ -112,8 +112,8 @@ int i_APCI2200_Read1DigitalInput(struct comedi_device * dev, struct comedi_subde
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2200_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2200_ReadMoreDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
unsigned int ui_PortValue = data[0];
|
||||
@ -169,8 +169,8 @@ int i_APCI2200_ReadMoreDigitalInput(struct comedi_device * dev, struct comedi_su
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI2200_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2200_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
devpriv->b_OutputMemoryStatus = data[0];
|
||||
return insn->n;
|
||||
@ -197,8 +197,8 @@ int i_APCI2200_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_sub
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2200_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2200_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp, ui_Temp1;
|
||||
unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */
|
||||
@ -354,8 +354,8 @@ int i_APCI2200_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subd
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2200_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2200_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
unsigned int ui_Temp;
|
||||
@ -418,8 +418,8 @@ int i_APCI2200_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subde
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2200_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2200_ConfigWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (data[0] == 0) {
|
||||
/* Disable the watchdog */
|
||||
@ -464,8 +464,8 @@ int i_APCI2200_ConfigWatchdog(struct comedi_device * dev, struct comedi_subdevic
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2200_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2200_StartStopWriteWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
switch (data[0]) {
|
||||
case 0: /* stop the watchdog */
|
||||
@ -509,8 +509,8 @@ int i_APCI2200_StartStopWriteWatchdog(struct comedi_device * dev, struct comedi_
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2200_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI2200_ReadWatchdog(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] =
|
||||
inw(devpriv->iobase + APCI2200_WATCHDOG +
|
||||
@ -533,7 +533,7 @@ int i_APCI2200_ReadWatchdog(struct comedi_device * dev, struct comedi_subdevice
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI2200_Reset(struct comedi_device * dev)
|
||||
int i_APCI2200_Reset(struct comedi_device *dev)
|
||||
{
|
||||
outw(0x0, devpriv->iobase + APCI2200_DIGITAL_OP); /* RESETS THE DIGITAL OUTPUTS */
|
||||
outw(0x0,
|
||||
|
@ -74,8 +74,8 @@ static unsigned int ui_Temp = 0;
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_InsnConfigAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3120_InsnConfigAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
@ -145,8 +145,8 @@ int i_APCI3120_InsnConfigAnalogInput(struct comedi_device * dev, struct comedi_s
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_InsnReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3120_InsnReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned short us_ConvertTiming, us_TmpValue, i;
|
||||
unsigned char b_Tmp;
|
||||
@ -412,7 +412,7 @@ int i_APCI3120_InsnReadAnalogInput(struct comedi_device * dev, struct comedi_sub
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
int i_APCI3120_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
/* Disable A2P Fifo write and AMWEN signal */
|
||||
outw(0, devpriv->i_IobaseAddon + 4);
|
||||
@ -482,8 +482,8 @@ int i_APCI3120_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_s
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
int i_APCI3120_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp; /* divisor1,divisor2; */
|
||||
@ -639,7 +639,7 @@ int i_APCI3120_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_CommandAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
int i_APCI3120_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
@ -713,8 +713,8 @@ int i_APCI3120_CommandAnalogInput(struct comedi_device * dev, struct comedi_subd
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device * dev,
|
||||
struct comedi_subdevice * s)
|
||||
int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device *dev,
|
||||
struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned char b_Tmp;
|
||||
unsigned int ui_Tmp, ui_DelayTiming = 0, ui_TimerValue1 = 0, dmalen0 =
|
||||
@ -1250,7 +1250,7 @@ int i_APCI3120_CyclicAnalogInput(int mode, struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_Reset(struct comedi_device * dev)
|
||||
int i_APCI3120_Reset(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int i;
|
||||
unsigned short us_TmpValue;
|
||||
@ -1330,7 +1330,7 @@ int i_APCI3120_Reset(struct comedi_device * dev)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_SetupChannelList(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
int i_APCI3120_SetupChannelList(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int n_chan, unsigned int *chanlist, char check)
|
||||
{
|
||||
unsigned int i; /* , differencial=0, bipolar=0; */
|
||||
@ -1394,7 +1394,7 @@ int i_APCI3120_SetupChannelList(struct comedi_device * dev, struct comedi_subdev
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_ExttrigEnable(struct comedi_device * dev)
|
||||
int i_APCI3120_ExttrigEnable(struct comedi_device *dev)
|
||||
{
|
||||
|
||||
devpriv->us_OutputRegister |= APCI3120_ENABLE_EXT_TRIGGER;
|
||||
@ -1419,7 +1419,7 @@ int i_APCI3120_ExttrigEnable(struct comedi_device * dev)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_ExttrigDisable(struct comedi_device * dev)
|
||||
int i_APCI3120_ExttrigDisable(struct comedi_device *dev)
|
||||
{
|
||||
devpriv->us_OutputRegister &= ~APCI3120_ENABLE_EXT_TRIGGER;
|
||||
outw(devpriv->us_OutputRegister, dev->iobase + APCI3120_WR_ADDRESS);
|
||||
@ -1665,7 +1665,7 @@ void v_APCI3120_Interrupt(int irq, void *d)
|
||||
*/
|
||||
|
||||
|
||||
int i_APCI3120_InterruptHandleEos(struct comedi_device * dev)
|
||||
int i_APCI3120_InterruptHandleEos(struct comedi_device *dev)
|
||||
{
|
||||
int n_chan, i;
|
||||
struct comedi_subdevice *s = dev->subdevices + 0;
|
||||
@ -1877,8 +1877,8 @@ void v_APCI3120_InterruptDma(int irq, void *d)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
|
||||
void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, short *dma_buffer, unsigned int num_samples)
|
||||
{
|
||||
devpriv->ui_AiActualScan +=
|
||||
(s->async->cur_chan + num_samples) / devpriv->ui_AiScanLength;
|
||||
@ -1919,8 +1919,8 @@ void v_APCI3120_InterruptDmaMoveBlock16bit(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3120_InsnConfigTimer(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
unsigned int ui_Timervalue2;
|
||||
@ -2079,8 +2079,8 @@ int i_APCI3120_InsnConfigTimer(struct comedi_device * dev, struct comedi_subdevi
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3120_InsnWriteTimer(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
unsigned int ui_Timervalue2 = 0;
|
||||
@ -2267,8 +2267,8 @@ int i_APCI3120_InsnWriteTimer(struct comedi_device * dev, struct comedi_subdevic
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3120_InsnReadTimer(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3120_InsnReadTimer(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char b_Tmp;
|
||||
unsigned short us_TmpValue, us_TmpValue_2, us_StatusValue;
|
||||
@ -2387,8 +2387,8 @@ int i_APCI3120_InsnReadDigitalInput(struct comedi_device *dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3120_InsnBitsDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3120_InsnBitsDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_TmpValue;
|
||||
ui_TmpValue = (unsigned int) inw(devpriv->iobase + APCI3120_RD_STATUS);
|
||||
@ -2426,8 +2426,8 @@ int i_APCI3120_InsnBitsDigitalInput(struct comedi_device * dev, struct comedi_su
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
if ((data[0] != 0) && (data[0] != 1)) {
|
||||
@ -2472,7 +2472,7 @@ int i_APCI3120_InsnConfigDigitalOutput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device * dev,
|
||||
int i_APCI3120_InsnBitsDigitalOutput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn,
|
||||
unsigned int *data)
|
||||
|
@ -112,7 +112,7 @@ struct str_BoardInfos s_BoardInfos[100]; /* 100 will be the max number of board
|
||||
|
||||
int i_AddiHeaderRW_ReadEeprom(int i_NbOfWordsToRead,
|
||||
unsigned int dw_PCIBoardEepromAddress,
|
||||
unsigned short w_EepromStartAddress, unsigned short * pw_DataRead)
|
||||
unsigned short w_EepromStartAddress, unsigned short *pw_DataRead)
|
||||
{
|
||||
unsigned int dw_eeprom_busy = 0;
|
||||
int i_Counter = 0;
|
||||
@ -453,9 +453,9 @@ void v_GetAPCI3200EepromCalibrationValue(unsigned int dw_PCIBoardEepromAddress,
|
||||
}
|
||||
}
|
||||
|
||||
int i_APCI3200_GetChannelCalibrationValue(struct comedi_device * dev,
|
||||
unsigned int ui_Channel_num, unsigned int * CJCCurrentSource,
|
||||
unsigned int * ChannelCurrentSource, unsigned int * ChannelGainFactor)
|
||||
int i_APCI3200_GetChannelCalibrationValue(struct comedi_device *dev,
|
||||
unsigned int ui_Channel_num, unsigned int *CJCCurrentSource,
|
||||
unsigned int *ChannelCurrentSource, unsigned int *ChannelGainFactor)
|
||||
{
|
||||
int i_DiffChannel = 0;
|
||||
int i_Module = 0;
|
||||
@ -550,8 +550,8 @@ int i_APCI3200_GetChannelCalibrationValue(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3200_ReadDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3200_ReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp = 0;
|
||||
unsigned int ui_NoOfChannel = 0;
|
||||
@ -608,8 +608,8 @@ int i_APCI3200_ReadDigitalInput(struct comedi_device * dev, struct comedi_subdev
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3200_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
if ((data[0] != 0) && (data[0] != 1)) {
|
||||
@ -653,8 +653,8 @@ int i_APCI3200_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_sub
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3200_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp = 0, ui_Temp1 = 0;
|
||||
unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */
|
||||
@ -766,8 +766,8 @@ int i_APCI3200_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subd
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3200_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp;
|
||||
unsigned int ui_NoOfChannel;
|
||||
@ -874,8 +874,8 @@ int i_APCI3200_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subde
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_ConfigAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3200_ConfigAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
unsigned int ul_Config = 0, ul_Temp = 0;
|
||||
@ -1361,8 +1361,8 @@ int i_APCI3200_ConfigAnalogInput(struct comedi_device * dev, struct comedi_subde
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_ReadAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3200_ReadAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_DummyValue = 0;
|
||||
int i_ConvertCJCCalibration;
|
||||
@ -1651,8 +1651,8 @@ int i_APCI3200_ReadAnalogInput(struct comedi_device * dev, struct comedi_subdevi
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_Read1AnalogInputChannel(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3200_Read1AnalogInputChannel(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_EOC = 0;
|
||||
unsigned int ui_ChannelNo = 0;
|
||||
@ -1776,7 +1776,7 @@ int i_APCI3200_Read1AnalogInputChannel(struct comedi_device * dev,
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device * dev, unsigned int * data)
|
||||
int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp = 0, ui_EOC = 0;
|
||||
unsigned int ui_CommandRegister = 0;
|
||||
@ -1912,7 +1912,7 @@ int i_APCI3200_ReadCalibrationOffsetValue(struct comedi_device * dev, unsigned i
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_ReadCalibrationGainValue(struct comedi_device * dev, unsigned int * data)
|
||||
int i_APCI3200_ReadCalibrationGainValue(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_EOC = 0;
|
||||
int ui_CommandRegister = 0;
|
||||
@ -2048,7 +2048,7 @@ int i_APCI3200_ReadCalibrationGainValue(struct comedi_device * dev, unsigned int
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3200_ReadCJCValue(struct comedi_device * dev, unsigned int * data)
|
||||
int i_APCI3200_ReadCJCValue(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_EOC = 0;
|
||||
int ui_CommandRegister = 0;
|
||||
@ -2167,7 +2167,7 @@ int i_APCI3200_ReadCJCValue(struct comedi_device * dev, unsigned int * data)
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_ReadCJCCalOffset(struct comedi_device * dev, unsigned int * data)
|
||||
int i_APCI3200_ReadCJCCalOffset(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_EOC = 0;
|
||||
int ui_CommandRegister = 0;
|
||||
@ -2283,7 +2283,7 @@ int i_APCI3200_ReadCJCCalOffset(struct comedi_device * dev, unsigned int * data)
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_ReadCJCCalGain(struct comedi_device * dev, unsigned int * data)
|
||||
int i_APCI3200_ReadCJCCalGain(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_EOC = 0;
|
||||
int ui_CommandRegister = 0;
|
||||
@ -2404,8 +2404,8 @@ int i_APCI3200_ReadCJCCalGain(struct comedi_device * dev, unsigned int * data)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Configuration = 0;
|
||||
int i_Temp; /* ,i_TimeUnit; */
|
||||
@ -2529,8 +2529,8 @@ int i_APCI3200_InsnBits_AnalogInput_Test(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
i_APCI3200_Reset(dev);
|
||||
return insn->n;
|
||||
@ -2560,8 +2560,8 @@ int i_APCI3200_InsnWriteReleaseAnalogInput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3200_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
int i_APCI3200_CommandTestAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
|
||||
int err = 0;
|
||||
@ -2764,7 +2764,7 @@ int i_APCI3200_CommandTestAnalogInput(struct comedi_device * dev, struct comedi_
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3200_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
int i_APCI3200_StopCyclicAcquisition(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned int ui_Configuration = 0;
|
||||
/* i_InterruptFlag=0; */
|
||||
@ -2814,7 +2814,7 @@ int i_APCI3200_StopCyclicAcquisition(struct comedi_device * dev, struct comedi_s
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3200_CommandAnalogInput(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
int i_APCI3200_CommandAnalogInput(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int ui_Configuration = 0;
|
||||
@ -3001,7 +3001,7 @@ int i_APCI3200_CommandAnalogInput(struct comedi_device * dev, struct comedi_subd
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3200_Reset(struct comedi_device * dev)
|
||||
int i_APCI3200_Reset(struct comedi_device *dev)
|
||||
{
|
||||
int i_Temp;
|
||||
unsigned int dw_Dummy;
|
||||
@ -3499,7 +3499,7 @@ void v_APCI3200_Interrupt(int irq, void *d)
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3200_InterruptHandleEos(struct comedi_device * dev)
|
||||
int i_APCI3200_InterruptHandleEos(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int ui_StatusRegister = 0;
|
||||
struct comedi_subdevice *s = dev->subdevices + 0;
|
||||
|
@ -73,8 +73,8 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3501_ReadDigitalInput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3501_ReadDigitalInput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp;
|
||||
unsigned int ui_NoOfChannel;
|
||||
@ -121,8 +121,8 @@ int i_APCI3501_ReadDigitalInput(struct comedi_device * dev, struct comedi_subdev
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3501_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3501_ConfigDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
if ((data[0] != 0) && (data[0] != 1)) {
|
||||
@ -161,8 +161,8 @@ int i_APCI3501_ConfigDigitalOutput(struct comedi_device * dev, struct comedi_sub
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3501_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3501_WriteDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp, ui_Temp1;
|
||||
unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */
|
||||
@ -248,8 +248,8 @@ int i_APCI3501_WriteDigitalOutput(struct comedi_device * dev, struct comedi_subd
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3501_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3501_ReadDigitalOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ui_Temp;
|
||||
unsigned int ui_NoOfChannel;
|
||||
@ -298,8 +298,8 @@ int i_APCI3501_ReadDigitalOutput(struct comedi_device * dev, struct comedi_subde
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3501_ConfigAnalogOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3501_ConfigAnalogOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
outl(data[0],
|
||||
devpriv->iobase + APCI3501_ANALOG_OUTPUT +
|
||||
@ -336,8 +336,8 @@ int i_APCI3501_ConfigAnalogOutput(struct comedi_device * dev, struct comedi_subd
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3501_WriteAnalogOutput(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ul_Command1 = 0, ul_Channel_no, ul_Polarity, ul_DAC_Ready = 0;;
|
||||
|
||||
@ -410,8 +410,8 @@ int i_APCI3501_WriteAnalogOutput(struct comedi_device * dev, struct comedi_subde
|
||||
| |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ul_Command1 = 0;
|
||||
devpriv->tsk_Current = current;
|
||||
@ -511,8 +511,8 @@ int i_APCI3501_ConfigTimerCounterWatchdog(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int ul_Command1 = 0;
|
||||
int i_Temp;
|
||||
@ -613,8 +613,8 @@ int i_APCI3501_StartStopWriteTimerCounterWatchdog(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
if (devpriv->b_TimerSelectMode == ADDIDATA_WATCHDOG) {
|
||||
@ -654,7 +654,7 @@ int i_APCI3501_ReadTimerCounterWatchdog(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3501_Reset(struct comedi_device * dev)
|
||||
int i_APCI3501_Reset(struct comedi_device *dev)
|
||||
{
|
||||
int i_Count = 0, i_temp = 0;
|
||||
unsigned int ul_Command1 = 0, ul_Polarity, ul_DAC_Ready = 0;
|
||||
|
@ -68,7 +68,7 @@ You shoud also find the complete GPL in the COPYING file accompanying this sourc
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_TestConversionStarted(struct comedi_device * dev)
|
||||
int i_APCI3XXX_TestConversionStarted(struct comedi_device *dev)
|
||||
{
|
||||
if ((readl((void *)(devpriv->dw_AiBase + 8)) & 0x80000UL) == 0x80000UL) {
|
||||
return (1);
|
||||
@ -105,8 +105,8 @@ int i_APCI3XXX_TestConversionStarted(struct comedi_device * dev)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_TimeBase = 0;
|
||||
@ -295,8 +295,8 @@ int i_APCI3XXX_AnalogInputConfigOperatingMode(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_InsnConfigAnalogInput(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnConfigAnalogInput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
|
||||
@ -355,8 +355,8 @@ int i_APCI3XXX_InsnConfigAnalogInput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnReadAnalogInput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_Configuration = (unsigned char) CR_RANGE(insn->chanspec);
|
||||
@ -684,8 +684,8 @@ void v_APCI3XXX_Interrupt(int irq, void *d)
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char b_Range = (unsigned char) CR_RANGE(insn->chanspec);
|
||||
unsigned char b_Channel = (unsigned char) CR_CHAN(insn->chanspec);
|
||||
@ -791,8 +791,8 @@ int i_APCI3XXX_InsnWriteAnalogOutput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_InsnConfigInitTTLIO(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnConfigInitTTLIO(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_Command = 0;
|
||||
@ -919,8 +919,8 @@ int i_APCI3XXX_InsnConfigInitTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_InsnBitsTTLIO(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnBitsTTLIO(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_ChannelCpt = 0;
|
||||
@ -1074,8 +1074,8 @@ int i_APCI3XXX_InsnBitsTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_InsnReadTTLIO(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnReadTTLIO(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char b_Channel = (unsigned char) CR_CHAN(insn->chanspec);
|
||||
int i_ReturnValue = insn->n;
|
||||
@ -1187,8 +1187,8 @@ int i_APCI3XXX_InsnReadTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_Channel = (unsigned char) CR_CHAN(insn->chanspec);
|
||||
@ -1298,8 +1298,8 @@ int i_APCI3XXX_InsnWriteTTLIO(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_InsnReadDigitalInput(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnReadDigitalInput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_Channel = (unsigned char) CR_CHAN(insn->chanspec);
|
||||
@ -1356,8 +1356,8 @@ int i_APCI3XXX_InsnReadDigitalInput(struct comedi_device * dev,
|
||||
| -101 : Data size error |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3XXX_InsnBitsDigitalInput(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnBitsDigitalInput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned int dw_Temp = 0;
|
||||
@ -1409,8 +1409,8 @@ int i_APCI3XXX_InsnBitsDigitalInput(struct comedi_device * dev,
|
||||
| -101 : Data size error |
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
int i_APCI3XXX_InsnBitsDigitalOutput(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnBitsDigitalOutput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_ChannelCpt = 0;
|
||||
@ -1505,8 +1505,8 @@ int i_APCI3XXX_InsnBitsDigitalOutput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_InsnWriteDigitalOutput(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnWriteDigitalOutput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_Channel = CR_CHAN(insn->chanspec);
|
||||
@ -1580,8 +1580,8 @@ int i_APCI3XXX_InsnWriteDigitalOutput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_InsnReadDigitalOutput(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
int i_APCI3XXX_InsnReadDigitalOutput(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i_ReturnValue = insn->n;
|
||||
unsigned char b_Channel = CR_CHAN(insn->chanspec);
|
||||
@ -1638,7 +1638,7 @@ int i_APCI3XXX_InsnReadDigitalOutput(struct comedi_device * dev,
|
||||
+----------------------------------------------------------------------------+
|
||||
*/
|
||||
|
||||
int i_APCI3XXX_Reset(struct comedi_device * dev)
|
||||
int i_APCI3XXX_Reset(struct comedi_device *dev)
|
||||
{
|
||||
unsigned char b_Cpt = 0;
|
||||
|
||||
|
@ -107,8 +107,8 @@ struct pci6208_private {
|
||||
|
||||
#define devpriv ((struct pci6208_private *)dev->private)
|
||||
|
||||
static int pci6208_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pci6208_detach(struct comedi_device * dev);
|
||||
static int pci6208_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pci6208_detach(struct comedi_device *dev);
|
||||
|
||||
#define pci6208_board_nbr \
|
||||
(sizeof(pci6208_boards) / sizeof(struct pci6208_board))
|
||||
@ -122,16 +122,16 @@ static struct comedi_driver driver_pci6208 = {
|
||||
|
||||
COMEDI_PCI_INITCLEANUP(driver_pci6208, pci6208_pci_table);
|
||||
|
||||
static int pci6208_find_device(struct comedi_device * dev, int bus, int slot);
|
||||
static int pci6208_find_device(struct comedi_device *dev, int bus, int slot);
|
||||
static int
|
||||
pci6208_pci_setup(struct pci_dev *pci_dev, unsigned long *io_base_ptr,
|
||||
int dev_minor);
|
||||
|
||||
/*read/write functions*/
|
||||
static int pci6208_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int pci6208_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int pci6208_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int pci6208_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
/* static int pci6208_dio_insn_bits(struct comedi_device *dev,struct comedi_subdevice *s, */
|
||||
/* struct comedi_insn *insn,unsigned int *data); */
|
||||
/* static int pci6208_dio_insn_config(struct comedi_device *dev,struct comedi_subdevice *s, */
|
||||
@ -143,7 +143,7 @@ static int pci6208_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int pci6208_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pci6208_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int retval;
|
||||
@ -206,7 +206,7 @@ static int pci6208_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int pci6208_detach(struct comedi_device * dev)
|
||||
static int pci6208_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: pci6208: remove\n", dev->minor);
|
||||
|
||||
@ -220,8 +220,8 @@ static int pci6208_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pci6208_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci6208_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i = 0, Data_Read;
|
||||
unsigned short chan = CR_CHAN(insn->chanspec);
|
||||
@ -245,8 +245,8 @@ static int pci6208_ao_winsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
|
||||
/* AO subdevices should have a read insn as well as a write insn.
|
||||
* Usually this means copying a value stored in devpriv. */
|
||||
static int pci6208_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci6208_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -306,7 +306,7 @@ static int pci6208_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
/* return 1; */
|
||||
/* } */
|
||||
|
||||
static int pci6208_find_device(struct comedi_device * dev, int bus, int slot)
|
||||
static int pci6208_find_device(struct comedi_device *dev, int bus, int slot)
|
||||
{
|
||||
struct pci_dev *pci_dev;
|
||||
int i;
|
||||
|
@ -64,8 +64,8 @@ struct adl_pci7296_private {
|
||||
|
||||
#define devpriv ((struct adl_pci7296_private *)dev->private)
|
||||
|
||||
static int adl_pci7296_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int adl_pci7296_detach(struct comedi_device * dev);
|
||||
static int adl_pci7296_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int adl_pci7296_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_adl_pci7296 = {
|
||||
driver_name:"adl_pci7296",
|
||||
module:THIS_MODULE,
|
||||
@ -73,7 +73,7 @@ static struct comedi_driver driver_adl_pci7296 = {
|
||||
detach:adl_pci7296_detach,
|
||||
};
|
||||
|
||||
static int adl_pci7296_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int adl_pci7296_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct pci_dev *pcidev;
|
||||
struct comedi_subdevice *s;
|
||||
@ -149,7 +149,7 @@ static int adl_pci7296_attach(struct comedi_device * dev, struct comedi_devconfi
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int adl_pci7296_detach(struct comedi_device * dev)
|
||||
static int adl_pci7296_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: pci7432: remove\n", dev->minor);
|
||||
|
||||
|
@ -58,8 +58,8 @@ struct adl_pci7432_private {
|
||||
|
||||
#define devpriv ((struct adl_pci7432_private *)dev->private)
|
||||
|
||||
static int adl_pci7432_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int adl_pci7432_detach(struct comedi_device * dev);
|
||||
static int adl_pci7432_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int adl_pci7432_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_adl_pci7432 = {
|
||||
driver_name:"adl_pci7432",
|
||||
module:THIS_MODULE,
|
||||
@ -69,15 +69,15 @@ static struct comedi_driver driver_adl_pci7432 = {
|
||||
|
||||
/* Digital IO */
|
||||
|
||||
static int adl_pci7432_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int adl_pci7432_di_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int adl_pci7432_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int adl_pci7432_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
/* */
|
||||
|
||||
static int adl_pci7432_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int adl_pci7432_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct pci_dev *pcidev;
|
||||
struct comedi_subdevice *s;
|
||||
@ -150,7 +150,7 @@ static int adl_pci7432_attach(struct comedi_device * dev, struct comedi_devconfi
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int adl_pci7432_detach(struct comedi_device * dev)
|
||||
static int adl_pci7432_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: pci7432: remove\n", dev->minor);
|
||||
|
||||
@ -164,8 +164,8 @@ static int adl_pci7432_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int adl_pci7432_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int adl_pci7432_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
printk("comedi: pci7432_do_insn_bits called\n");
|
||||
printk("comedi: data0: %8x data1: %8x\n", data[0], data[1]);
|
||||
@ -184,8 +184,8 @@ static int adl_pci7432_do_insn_bits(struct comedi_device * dev, struct comedi_su
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int adl_pci7432_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int adl_pci7432_di_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
printk("comedi: pci7432_di_insn_bits called\n");
|
||||
printk("comedi: data0: %8x data1: %8x\n", data[0], data[1]);
|
||||
|
@ -70,8 +70,8 @@ struct adl_pci8164_private {
|
||||
|
||||
#define devpriv ((struct adl_pci8164_private *)dev->private)
|
||||
|
||||
static int adl_pci8164_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int adl_pci8164_detach(struct comedi_device * dev);
|
||||
static int adl_pci8164_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int adl_pci8164_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_adl_pci8164 = {
|
||||
driver_name:"adl_pci8164",
|
||||
module:THIS_MODULE,
|
||||
@ -79,31 +79,31 @@ static struct comedi_driver driver_adl_pci8164 = {
|
||||
detach:adl_pci8164_detach,
|
||||
};
|
||||
|
||||
static int adl_pci8164_insn_read_msts(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int adl_pci8164_insn_read_msts(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int adl_pci8164_insn_read_ssts(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int adl_pci8164_insn_read_buf0(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int adl_pci8164_insn_read_buf1(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int adl_pci8164_insn_write_cmd(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int adl_pci8164_insn_write_otp(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int adl_pci8164_insn_write_otp(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int adl_pci8164_insn_write_buf0(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int adl_pci8164_insn_write_buf1(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int adl_pci8164_insn_write_buf1(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int adl_pci8164_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int adl_pci8164_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct pci_dev *pcidev;
|
||||
struct comedi_subdevice *s;
|
||||
@ -194,7 +194,7 @@ static int adl_pci8164_attach(struct comedi_device * dev, struct comedi_devconfi
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int adl_pci8164_detach(struct comedi_device * dev)
|
||||
static int adl_pci8164_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: pci8164: remove\n", dev->minor);
|
||||
|
||||
@ -208,8 +208,8 @@ static int adl_pci8164_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int adl_pci8164_insn_read_msts(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int adl_pci8164_insn_read_msts(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int axis, axis_reg;
|
||||
char *axisname;
|
||||
@ -245,8 +245,8 @@ static int adl_pci8164_insn_read_msts(struct comedi_device * dev, struct comedi_
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int adl_pci8164_insn_read_ssts(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int axis, axis_reg;
|
||||
char *axisname;
|
||||
@ -282,8 +282,8 @@ static int adl_pci8164_insn_read_ssts(struct comedi_device * dev, struct comedi_
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int adl_pci8164_insn_read_buf0(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int axis, axis_reg;
|
||||
char *axisname;
|
||||
@ -319,8 +319,8 @@ static int adl_pci8164_insn_read_buf0(struct comedi_device * dev, struct comedi_
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int adl_pci8164_insn_read_buf1(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int axis, axis_reg;
|
||||
|
||||
@ -357,8 +357,8 @@ static int adl_pci8164_insn_read_buf1(struct comedi_device * dev, struct comedi_
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int adl_pci8164_insn_write_cmd(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int axis, axis_reg;
|
||||
|
||||
@ -395,8 +395,8 @@ static int adl_pci8164_insn_write_cmd(struct comedi_device * dev, struct comedi_
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int adl_pci8164_insn_write_otp(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int adl_pci8164_insn_write_otp(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int axis, axis_reg;
|
||||
|
||||
@ -433,8 +433,8 @@ static int adl_pci8164_insn_write_otp(struct comedi_device * dev, struct comedi_
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int adl_pci8164_insn_write_buf0(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int axis, axis_reg;
|
||||
|
||||
@ -471,8 +471,8 @@ static int adl_pci8164_insn_write_buf0(struct comedi_device * dev,
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int adl_pci8164_insn_write_buf1(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int adl_pci8164_insn_write_buf1(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int axis, axis_reg;
|
||||
|
||||
|
@ -264,9 +264,9 @@ Configuration options:
|
||||
|
||||
/* Function prototypes */
|
||||
|
||||
static int pci9111_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pci9111_detach(struct comedi_device * dev);
|
||||
static void pci9111_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int pci9111_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pci9111_detach(struct comedi_device *dev);
|
||||
static void pci9111_ai_munge(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
void *data, unsigned int num_bytes, unsigned int start_chan_index);
|
||||
|
||||
static const struct comedi_lrange pci9111_hr_ai_range = {
|
||||
@ -406,7 +406,7 @@ static void plx9050_interrupt_control(unsigned long io_base,
|
||||
|
||||
/* 8254 timer */
|
||||
|
||||
static void pci9111_timer_set(struct comedi_device * dev)
|
||||
static void pci9111_timer_set(struct comedi_device *dev)
|
||||
{
|
||||
pci9111_8254_control_set(PCI9111_8254_COUNTER_0 |
|
||||
PCI9111_8254_READ_LOAD_LSB_MSB |
|
||||
@ -432,7 +432,7 @@ enum pci9111_trigger_sources {
|
||||
external
|
||||
};
|
||||
|
||||
static void pci9111_trigger_source_set(struct comedi_device * dev,
|
||||
static void pci9111_trigger_source_set(struct comedi_device *dev,
|
||||
enum pci9111_trigger_sources source)
|
||||
{
|
||||
int flags;
|
||||
@ -456,7 +456,7 @@ static void pci9111_trigger_source_set(struct comedi_device * dev,
|
||||
pci9111_trigger_and_autoscan_set(flags);
|
||||
}
|
||||
|
||||
static void pci9111_pretrigger_set(struct comedi_device * dev, bool pretrigger)
|
||||
static void pci9111_pretrigger_set(struct comedi_device *dev, bool pretrigger)
|
||||
{
|
||||
int flags;
|
||||
|
||||
@ -468,7 +468,7 @@ static void pci9111_pretrigger_set(struct comedi_device * dev, bool pretrigger)
|
||||
pci9111_trigger_and_autoscan_set(flags);
|
||||
}
|
||||
|
||||
static void pci9111_autoscan_set(struct comedi_device * dev, bool autoscan)
|
||||
static void pci9111_autoscan_set(struct comedi_device *dev, bool autoscan)
|
||||
{
|
||||
int flags;
|
||||
|
||||
@ -490,7 +490,7 @@ enum pci9111_ISC1_sources {
|
||||
irq_on_external_trigger
|
||||
};
|
||||
|
||||
static void pci9111_interrupt_source_set(struct comedi_device * dev,
|
||||
static void pci9111_interrupt_source_set(struct comedi_device *dev,
|
||||
enum pci9111_ISC0_sources irq_0_source, enum pci9111_ISC1_sources irq_1_source)
|
||||
{
|
||||
int flags;
|
||||
@ -514,7 +514,7 @@ static void pci9111_interrupt_source_set(struct comedi_device * dev,
|
||||
|
||||
#undef AI_DO_CMD_DEBUG
|
||||
|
||||
static int pci9111_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci9111_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
/* Disable interrupts */
|
||||
|
||||
@ -542,8 +542,8 @@ static int pci9111_ai_cancel(struct comedi_device * dev, struct comedi_subdevice
|
||||
if (!src || tmp != src) error++
|
||||
|
||||
static int
|
||||
pci9111_ai_do_cmd_test(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_cmd * cmd)
|
||||
pci9111_ai_do_cmd_test(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_cmd *cmd)
|
||||
{
|
||||
int tmp;
|
||||
int error = 0;
|
||||
@ -741,7 +741,7 @@ pci9111_ai_do_cmd_test(struct comedi_device * dev,
|
||||
|
||||
/* Analog input command */
|
||||
|
||||
static int pci9111_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * subdevice)
|
||||
static int pci9111_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *subdevice)
|
||||
{
|
||||
struct comedi_cmd *async_cmd = &subdevice->async->cmd;
|
||||
|
||||
@ -859,7 +859,7 @@ static int pci9111_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pci9111_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static void pci9111_ai_munge(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
void *data, unsigned int num_bytes, unsigned int start_chan_index)
|
||||
{
|
||||
unsigned int i, num_samples = num_bytes / sizeof(short);
|
||||
@ -1043,8 +1043,8 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device)
|
||||
|
||||
#undef AI_INSN_DEBUG
|
||||
|
||||
static int pci9111_ai_insn_read(struct comedi_device * dev,
|
||||
struct comedi_subdevice * subdevice, struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci9111_ai_insn_read(struct comedi_device *dev,
|
||||
struct comedi_subdevice *subdevice, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int resolution =
|
||||
((struct pci9111_board *) dev->board_ptr)->ai_resolution;
|
||||
@ -1101,8 +1101,8 @@ static int pci9111_ai_insn_read(struct comedi_device * dev,
|
||||
/* Analog instant output */
|
||||
|
||||
static int
|
||||
pci9111_ao_insn_write(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
pci9111_ao_insn_write(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1116,8 +1116,8 @@ pci9111_ao_insn_write(struct comedi_device * dev,
|
||||
|
||||
/* Analog output readback */
|
||||
|
||||
static int pci9111_ao_insn_read(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci9111_ao_insn_read(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1134,8 +1134,8 @@ static int pci9111_ao_insn_read(struct comedi_device * dev,
|
||||
|
||||
/* Digital inputs */
|
||||
|
||||
static int pci9111_di_insn_bits(struct comedi_device * dev,
|
||||
struct comedi_subdevice * subdevice, struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci9111_di_insn_bits(struct comedi_device *dev,
|
||||
struct comedi_subdevice *subdevice, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int bits;
|
||||
|
||||
@ -1147,8 +1147,8 @@ static int pci9111_di_insn_bits(struct comedi_device * dev,
|
||||
|
||||
/* Digital outputs */
|
||||
|
||||
static int pci9111_do_insn_bits(struct comedi_device * dev,
|
||||
struct comedi_subdevice * subdevice, struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci9111_do_insn_bits(struct comedi_device *dev,
|
||||
struct comedi_subdevice *subdevice, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int bits;
|
||||
|
||||
@ -1176,7 +1176,7 @@ static int pci9111_do_insn_bits(struct comedi_device * dev,
|
||||
|
||||
/* Reset device */
|
||||
|
||||
static int pci9111_reset(struct comedi_device * dev)
|
||||
static int pci9111_reset(struct comedi_device *dev)
|
||||
{
|
||||
/* Set trigger source to software */
|
||||
|
||||
@ -1201,7 +1201,7 @@ static int pci9111_reset(struct comedi_device * dev)
|
||||
/* - Register PCI device */
|
||||
/* - Declare device driver capability */
|
||||
|
||||
static int pci9111_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pci9111_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *subdevice;
|
||||
unsigned long io_base, io_range, lcr_io_base, lcr_io_range;
|
||||
@ -1366,7 +1366,7 @@ static int pci9111_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
|
||||
/* Detach */
|
||||
|
||||
static int pci9111_detach(struct comedi_device * dev)
|
||||
static int pci9111_detach(struct comedi_device *dev)
|
||||
{
|
||||
/* Reset device */
|
||||
|
||||
|
@ -179,8 +179,8 @@ static const struct comedi_lrange range_pci9118hg = { 8, {
|
||||
|
||||
#define PCI9118_BIPOLAR_RANGES 4 /* used for test on mixture of BIP/UNI ranges */
|
||||
|
||||
static int pci9118_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pci9118_detach(struct comedi_device * dev);
|
||||
static int pci9118_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pci9118_detach(struct comedi_device *dev);
|
||||
|
||||
struct boardtype {
|
||||
const char *name; /* board name */
|
||||
@ -309,27 +309,27 @@ struct pci9118_private {
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
static int check_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int check_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int n_chan, unsigned int *chanlist, int frontadd, int backadd);
|
||||
static int setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int setup_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int n_chan, unsigned int *chanlist, int rot, int frontadd, int backadd,
|
||||
int usedma, char eoshandle);
|
||||
static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
|
||||
static void start_pacer(struct comedi_device *dev, int mode, unsigned int divisor1,
|
||||
unsigned int divisor2);
|
||||
static int pci9118_reset(struct comedi_device * dev);
|
||||
static int pci9118_exttrg_add(struct comedi_device * dev, unsigned char source);
|
||||
static int pci9118_exttrg_del(struct comedi_device * dev, unsigned char source);
|
||||
static int pci9118_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void pci9118_calc_divisors(char mode, struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, unsigned int *tim1, unsigned int *tim2,
|
||||
static int pci9118_reset(struct comedi_device *dev);
|
||||
static int pci9118_exttrg_add(struct comedi_device *dev, unsigned char source);
|
||||
static int pci9118_exttrg_del(struct comedi_device *dev, unsigned char source);
|
||||
static int pci9118_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
static void pci9118_calc_divisors(char mode, struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, unsigned int *tim1, unsigned int *tim2,
|
||||
unsigned int flags, int chans, unsigned int *div1, unsigned int *div2,
|
||||
char usessh, unsigned int chnsshfront);
|
||||
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_insn_read_ai(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci9118_insn_read_ai(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
int n, timeout;
|
||||
@ -378,8 +378,8 @@ static int pci9118_insn_read_ai(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_insn_write_ao(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci9118_insn_write_ao(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, chanreg, ch;
|
||||
|
||||
@ -401,8 +401,8 @@ static int pci9118_insn_write_ao(struct comedi_device * dev, struct comedi_subde
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_insn_read_ao(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci9118_insn_read_ao(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, chan;
|
||||
|
||||
@ -416,8 +416,8 @@ static int pci9118_insn_read_ao(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_insn_bits_di(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci9118_insn_bits_di(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[1] = inl(dev->iobase + PCI9118_DI) & 0xf;
|
||||
|
||||
@ -427,8 +427,8 @@ static int pci9118_insn_bits_di(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_insn_bits_do(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci9118_insn_bits_do(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (data[0]) {
|
||||
s->state &= ~data[0];
|
||||
@ -443,7 +443,7 @@ static int pci9118_insn_bits_do(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static void interrupt_pci9118_ai_mode4_switch(struct comedi_device * dev)
|
||||
static void interrupt_pci9118_ai_mode4_switch(struct comedi_device *dev)
|
||||
{
|
||||
devpriv->AdFunctionReg =
|
||||
AdFunction_PDTrg | AdFunction_PETrg | AdFunction_AM;
|
||||
@ -457,8 +457,8 @@ static void interrupt_pci9118_ai_mode4_switch(struct comedi_device * dev)
|
||||
outl(devpriv->AdFunctionReg, dev->iobase + PCI9118_ADFUNC);
|
||||
}
|
||||
|
||||
static unsigned int defragment_dma_buffer(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
|
||||
static unsigned int defragment_dma_buffer(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, short *dma_buffer, unsigned int num_samples)
|
||||
{
|
||||
unsigned int i = 0, j = 0;
|
||||
unsigned int start_pos = devpriv->ai_add_front,
|
||||
@ -481,8 +481,8 @@ static unsigned int defragment_dma_buffer(struct comedi_device * dev,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static unsigned int move_block_from_dma(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, short * dma_buffer, unsigned int num_samples)
|
||||
static unsigned int move_block_from_dma(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, short *dma_buffer, unsigned int num_samples)
|
||||
{
|
||||
unsigned int num_bytes;
|
||||
|
||||
@ -502,8 +502,8 @@ static unsigned int move_block_from_dma(struct comedi_device * dev,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static char pci9118_decode_error_status(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, unsigned char m)
|
||||
static char pci9118_decode_error_status(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, unsigned char m)
|
||||
{
|
||||
if (m & 0x100) {
|
||||
comedi_error(dev, "A/D FIFO Full status (Fatal Error!)");
|
||||
@ -532,7 +532,7 @@ static char pci9118_decode_error_status(struct comedi_device * dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pci9118_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static void pci9118_ai_munge(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
void *data, unsigned int num_bytes, unsigned int start_chan_index)
|
||||
{
|
||||
unsigned int i, num_samples = num_bytes / sizeof(short);
|
||||
@ -552,8 +552,8 @@ static void pci9118_ai_munge(struct comedi_device * dev, struct comedi_subdevice
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static void interrupt_pci9118_ai_onesample(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, unsigned short int_adstat, unsigned int int_amcc,
|
||||
static void interrupt_pci9118_ai_onesample(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, unsigned short int_adstat, unsigned int int_amcc,
|
||||
unsigned short int_daq)
|
||||
{
|
||||
register short sampl;
|
||||
@ -599,7 +599,7 @@ static void interrupt_pci9118_ai_onesample(struct comedi_device * dev,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static void interrupt_pci9118_ai_dma(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static void interrupt_pci9118_ai_dma(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned short int_adstat, unsigned int int_amcc,
|
||||
unsigned short int_daq)
|
||||
{
|
||||
@ -728,7 +728,7 @@ static irqreturn_t interrupt_pci9118(int irq, void *d)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_ai_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int pci9118_ai_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int trignum)
|
||||
{
|
||||
if (trignum != devpriv->ai_inttrig_start)
|
||||
@ -752,8 +752,8 @@ static int pci9118_ai_inttrig(struct comedi_device * dev, struct comedi_subdevic
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int pci9118_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp, divisor1, divisor2;
|
||||
@ -1010,7 +1010,7 @@ static int pci9118_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevic
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int Compute_and_setup_dma(struct comedi_device * dev)
|
||||
static int Compute_and_setup_dma(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int dmalen0, dmalen1, i;
|
||||
|
||||
@ -1164,7 +1164,7 @@ static int Compute_and_setup_dma(struct comedi_device * dev)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_ai_docmd_sampl(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci9118_ai_docmd_sampl(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
DPRINTK("adl_pci9118 EDBG: BGN: pci9118_ai_docmd_sampl(%d,) [%d]\n",
|
||||
dev->minor, devpriv->ai_do);
|
||||
@ -1217,7 +1217,7 @@ static int pci9118_ai_docmd_sampl(struct comedi_device * dev, struct comedi_subd
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_ai_docmd_dma(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci9118_ai_docmd_dma(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
DPRINTK("adl_pci9118 EDBG: BGN: pci9118_ai_docmd_dma(%d,) [%d,%d]\n",
|
||||
dev->minor, devpriv->ai_do, devpriv->usedma);
|
||||
@ -1288,7 +1288,7 @@ static int pci9118_ai_docmd_dma(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int addchans = 0;
|
||||
@ -1487,7 +1487,7 @@ static int pci9118_ai_cmd(struct comedi_device * dev, struct comedi_subdevice *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int check_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int check_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int n_chan, unsigned int *chanlist, int frontadd, int backadd)
|
||||
{
|
||||
unsigned int i, differencial = 0, bipolar = 0;
|
||||
@ -1538,7 +1538,7 @@ static int check_channel_list(struct comedi_device * dev, struct comedi_subdevic
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int setup_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int n_chan, unsigned int *chanlist, int rot, int frontadd, int backadd,
|
||||
int usedma, char useeos)
|
||||
{
|
||||
@ -1652,8 +1652,8 @@ static int setup_channel_list(struct comedi_device * dev, struct comedi_subdevic
|
||||
==============================================================================
|
||||
calculate 8254 divisors if they are used for dual timing
|
||||
*/
|
||||
static void pci9118_calc_divisors(char mode, struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, unsigned int *tim1, unsigned int *tim2,
|
||||
static void pci9118_calc_divisors(char mode, struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, unsigned int *tim1, unsigned int *tim2,
|
||||
unsigned int flags, int chans, unsigned int *div1, unsigned int *div2,
|
||||
char usessh, unsigned int chnsshfront)
|
||||
{
|
||||
@ -1711,7 +1711,7 @@ static void pci9118_calc_divisors(char mode, struct comedi_device * dev,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
|
||||
static void start_pacer(struct comedi_device *dev, int mode, unsigned int divisor1,
|
||||
unsigned int divisor2)
|
||||
{
|
||||
outl(0x74, dev->iobase + PCI9118_CNTCTRL);
|
||||
@ -1730,7 +1730,7 @@ static void start_pacer(struct comedi_device * dev, int mode, unsigned int divis
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_exttrg_add(struct comedi_device * dev, unsigned char source)
|
||||
static int pci9118_exttrg_add(struct comedi_device *dev, unsigned char source)
|
||||
{
|
||||
if (source > 3)
|
||||
return -1; /* incorrect source */
|
||||
@ -1744,7 +1744,7 @@ static int pci9118_exttrg_add(struct comedi_device * dev, unsigned char source)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_exttrg_del(struct comedi_device * dev, unsigned char source)
|
||||
static int pci9118_exttrg_del(struct comedi_device *dev, unsigned char source)
|
||||
{
|
||||
if (source > 3)
|
||||
return -1; /* incorrect source */
|
||||
@ -1761,7 +1761,7 @@ static int pci9118_exttrg_del(struct comedi_device * dev, unsigned char source)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci9118_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
if (devpriv->usedma)
|
||||
outl(inl(devpriv->iobase_a + AMCC_OP_REG_MCSR) & (~EN_A2P_TRANSFERS), devpriv->iobase_a + AMCC_OP_REG_MCSR); /* stop DMA */
|
||||
@ -1796,7 +1796,7 @@ static int pci9118_ai_cancel(struct comedi_device * dev, struct comedi_subdevice
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_reset(struct comedi_device * dev)
|
||||
static int pci9118_reset(struct comedi_device *dev)
|
||||
{
|
||||
devpriv->IntControlReg = 0;
|
||||
devpriv->exttrg_users = 0;
|
||||
@ -1836,7 +1836,7 @@ static int pci9118_reset(struct comedi_device * dev)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pci9118_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret, pages, i;
|
||||
@ -2072,7 +2072,7 @@ static int pci9118_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci9118_detach(struct comedi_device * dev)
|
||||
static int pci9118_detach(struct comedi_device *dev)
|
||||
{
|
||||
if (dev->private) {
|
||||
if (devpriv->valid)
|
||||
|
@ -184,8 +184,8 @@ static const struct comedi_lrange range_pci171x_da = { 2, {
|
||||
}
|
||||
};
|
||||
|
||||
static int pci1710_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pci1710_detach(struct comedi_device * dev);
|
||||
static int pci1710_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pci1710_detach(struct comedi_device *dev);
|
||||
|
||||
struct boardtype {
|
||||
const char *name; /* board name */
|
||||
@ -306,14 +306,14 @@ struct pci1710_private {
|
||||
==============================================================================
|
||||
*/
|
||||
|
||||
static int check_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int check_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int *chanlist, unsigned int n_chan);
|
||||
static void setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static void setup_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int *chanlist, unsigned int n_chan, unsigned int seglen);
|
||||
static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
|
||||
static void start_pacer(struct comedi_device *dev, int mode, unsigned int divisor1,
|
||||
unsigned int divisor2);
|
||||
static int pci1710_reset(struct comedi_device * dev);
|
||||
static int pci171x_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int pci1710_reset(struct comedi_device *dev);
|
||||
static int pci171x_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
|
||||
static const unsigned int muxonechan[] = { 0x0000, 0x0101, 0x0202, 0x0303, 0x0404, 0x0505, 0x0606, 0x0707, /* used for gain list programming */
|
||||
0x0808, 0x0909, 0x0a0a, 0x0b0b, 0x0c0c, 0x0d0d, 0x0e0e, 0x0f0f,
|
||||
@ -324,8 +324,8 @@ static const unsigned int muxonechan[] = { 0x0000, 0x0101, 0x0202, 0x0303, 0x040
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_insn_read_ai(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci171x_insn_read_ai(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, timeout;
|
||||
#ifdef PCI171x_PARANOIDCHECK
|
||||
@ -392,8 +392,8 @@ static int pci171x_insn_read_ai(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_insn_write_ao(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci171x_insn_write_ao(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, chan, range, ofs;
|
||||
|
||||
@ -423,8 +423,8 @@ static int pci171x_insn_write_ao(struct comedi_device * dev, struct comedi_subde
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_insn_read_ao(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci171x_insn_read_ao(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, chan;
|
||||
|
||||
@ -438,8 +438,8 @@ static int pci171x_insn_read_ao(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_insn_bits_di(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci171x_insn_bits_di(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[1] = inw(dev->iobase + PCI171x_DI);
|
||||
|
||||
@ -449,8 +449,8 @@ static int pci171x_insn_bits_di(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_insn_bits_do(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci171x_insn_bits_do(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (data[0]) {
|
||||
s->state &= ~data[0];
|
||||
@ -465,8 +465,8 @@ static int pci171x_insn_bits_do(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_insn_counter_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci171x_insn_counter_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int msb, lsb, ccntrl;
|
||||
int i;
|
||||
@ -487,8 +487,8 @@ static int pci171x_insn_counter_read(struct comedi_device * dev, struct comedi_s
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_insn_counter_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci171x_insn_counter_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
uint msb, lsb, ccntrl, status;
|
||||
|
||||
@ -514,8 +514,8 @@ static int pci171x_insn_counter_write(struct comedi_device * dev, struct comedi_
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_insn_counter_config(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci171x_insn_counter_config(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
#ifdef unused
|
||||
/* This doesn't work like a normal Comedi counter config */
|
||||
@ -550,8 +550,8 @@ static int pci171x_insn_counter_config(struct comedi_device * dev,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1720_insn_write_ao(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci1720_insn_write_ao(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, rangereg, chan;
|
||||
|
||||
@ -661,7 +661,7 @@ static void interrupt_pci1710_every_sample(void *d)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int move_block_from_fifo(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int move_block_from_fifo(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int n, int turn)
|
||||
{
|
||||
int i, j;
|
||||
@ -803,8 +803,8 @@ static irqreturn_t interrupt_service_pci1710(int irq, void *d)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_ai_docmd_and_mode(int mode, struct comedi_device * dev,
|
||||
struct comedi_subdevice * s)
|
||||
static int pci171x_ai_docmd_and_mode(int mode, struct comedi_device *dev,
|
||||
struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned int divisor1, divisor2;
|
||||
unsigned int seglen;
|
||||
@ -886,7 +886,7 @@ static int pci171x_ai_docmd_and_mode(int mode, struct comedi_device * dev,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static void pci171x_cmdtest_out(int e, struct comedi_cmd * cmd)
|
||||
static void pci171x_cmdtest_out(int e, struct comedi_cmd *cmd)
|
||||
{
|
||||
rt_printk("adv_pci1710 e=%d startsrc=%x scansrc=%x convsrc=%x\n", e,
|
||||
cmd->start_src, cmd->scan_begin_src, cmd->convert_src);
|
||||
@ -902,8 +902,8 @@ static void pci171x_cmdtest_out(int e, struct comedi_cmd * cmd)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int pci171x_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp, divisor1, divisor2;
|
||||
@ -1067,7 +1067,7 @@ static int pci171x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevic
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci171x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
@ -1106,7 +1106,7 @@ static int pci171x_ai_cmd(struct comedi_device * dev, struct comedi_subdevice *
|
||||
If it's ok, then program scan/gain logic.
|
||||
This works for all cards.
|
||||
*/
|
||||
static int check_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int check_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int *chanlist, unsigned int n_chan)
|
||||
{
|
||||
unsigned int chansegment[32];
|
||||
@ -1165,7 +1165,7 @@ static int check_channel_list(struct comedi_device * dev, struct comedi_subdevic
|
||||
return seglen;
|
||||
}
|
||||
|
||||
static void setup_channel_list(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static void setup_channel_list(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int *chanlist, unsigned int n_chan, unsigned int seglen)
|
||||
{
|
||||
unsigned int i, range, chanprog;
|
||||
@ -1202,7 +1202,7 @@ static void setup_channel_list(struct comedi_device * dev, struct comedi_subdevi
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static void start_pacer(struct comedi_device * dev, int mode, unsigned int divisor1,
|
||||
static void start_pacer(struct comedi_device *dev, int mode, unsigned int divisor1,
|
||||
unsigned int divisor2)
|
||||
{
|
||||
DPRINTK("adv_pci1710 EDBG: BGN: start_pacer(%d,%u,%u)\n", mode,
|
||||
@ -1222,7 +1222,7 @@ static void start_pacer(struct comedi_device * dev, int mode, unsigned int divis
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci171x_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
DPRINTK("adv_pci1710 EDBG: BGN: pci171x_ai_cancel(...)\n");
|
||||
|
||||
@ -1251,7 +1251,7 @@ static int pci171x_ai_cancel(struct comedi_device * dev, struct comedi_subdevice
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci171x_reset(struct comedi_device * dev)
|
||||
static int pci171x_reset(struct comedi_device *dev)
|
||||
{
|
||||
DPRINTK("adv_pci1710 EDBG: BGN: pci171x_reset(...)\n");
|
||||
outw(0x30, dev->iobase + PCI171x_CNTCTRL);
|
||||
@ -1281,7 +1281,7 @@ static int pci171x_reset(struct comedi_device * dev)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1720_reset(struct comedi_device * dev)
|
||||
static int pci1720_reset(struct comedi_device *dev)
|
||||
{
|
||||
DPRINTK("adv_pci1710 EDBG: BGN: pci1720_reset(...)\n");
|
||||
outb(Syncont_SC0, dev->iobase + PCI1720_SYNCONT); /* set synchronous output mode */
|
||||
@ -1303,7 +1303,7 @@ static int pci1720_reset(struct comedi_device * dev)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1710_reset(struct comedi_device * dev)
|
||||
static int pci1710_reset(struct comedi_device *dev)
|
||||
{
|
||||
DPRINTK("adv_pci1710 EDBG: BGN: pci1710_reset(...)\n");
|
||||
switch (this_board->cardtype) {
|
||||
@ -1318,7 +1318,7 @@ static int pci1710_reset(struct comedi_device * dev)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1710_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pci1710_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret, subdev, n_subdevices;
|
||||
@ -1542,7 +1542,7 @@ static int pci1710_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1710_detach(struct comedi_device * dev)
|
||||
static int pci1710_detach(struct comedi_device *dev)
|
||||
{
|
||||
|
||||
if (dev->private) {
|
||||
|
@ -143,8 +143,8 @@ MODULE_DEVICE_TABLE(pci, pci1723_pci_table);
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int pci1723_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pci1723_detach(struct comedi_device * dev);
|
||||
static int pci1723_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pci1723_detach(struct comedi_device *dev);
|
||||
|
||||
#define n_boardtypes (sizeof(boardtypes)/sizeof(struct pci1723_board))
|
||||
|
||||
@ -175,7 +175,7 @@ struct pci1723_private {
|
||||
/*
|
||||
* the pci1723 card reset;
|
||||
*/
|
||||
static int pci1723_reset(struct comedi_device * dev)
|
||||
static int pci1723_reset(struct comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
DPRINTK("adv_pci1723 EDBG: BGN: pci1723_reset(...)\n");
|
||||
@ -202,8 +202,8 @@ static int pci1723_reset(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pci1723_insn_read_ao(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci1723_insn_read_ao(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, chan;
|
||||
|
||||
@ -218,8 +218,8 @@ static int pci1723_insn_read_ao(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
analog data output;
|
||||
*/
|
||||
static int pci1723_ao_write_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci1723_ao_write_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, chan;
|
||||
chan = CR_CHAN(insn->chanspec);
|
||||
@ -238,8 +238,8 @@ static int pci1723_ao_write_winsn(struct comedi_device * dev, struct comedi_subd
|
||||
/*
|
||||
digital i/o config/query
|
||||
*/
|
||||
static int pci1723_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci1723_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int mask;
|
||||
unsigned int bits;
|
||||
@ -278,8 +278,8 @@ static int pci1723_dio_insn_config(struct comedi_device * dev, struct comedi_sub
|
||||
/*
|
||||
digital i/o bits read/write
|
||||
*/
|
||||
static int pci1723_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci1723_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (data[0]) {
|
||||
s->state &= ~data[0];
|
||||
@ -294,7 +294,7 @@ static int pci1723_dio_insn_bits(struct comedi_device * dev, struct comedi_subde
|
||||
* Attach is called by the Comedi core to configure the driver
|
||||
* for a pci1723 board.
|
||||
*/
|
||||
static int pci1723_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pci1723_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret, subdev, n_subdevices;
|
||||
@ -439,7 +439,7 @@ static int pci1723_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int pci1723_detach(struct comedi_device * dev)
|
||||
static int pci1723_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: pci1723: remove\n", dev->minor);
|
||||
|
||||
|
@ -183,8 +183,8 @@ enum hw_io_access {
|
||||
|
||||
#define OMBCMD_RETRY 0x03 /* 3 times try request before error */
|
||||
|
||||
static int pci_dio_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pci_dio_detach(struct comedi_device * dev);
|
||||
static int pci_dio_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pci_dio_detach(struct comedi_device *dev);
|
||||
|
||||
struct diosubd_data {
|
||||
int chans; /* num of chans */
|
||||
@ -357,8 +357,8 @@ static struct pci_dio_private *pci_priv = NULL; /* list of allocated cards */
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci_dio_insn_bits_di_b(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci_dio_insn_bits_di_b(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
const struct diosubd_data *d = (const struct diosubd_data *)s->private;
|
||||
int i;
|
||||
@ -374,8 +374,8 @@ static int pci_dio_insn_bits_di_b(struct comedi_device * dev, struct comedi_subd
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci_dio_insn_bits_di_w(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci_dio_insn_bits_di_w(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
const struct diosubd_data *d = (const struct diosubd_data *)s->private;
|
||||
int i;
|
||||
@ -390,8 +390,8 @@ static int pci_dio_insn_bits_di_w(struct comedi_device * dev, struct comedi_subd
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci_dio_insn_bits_do_b(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci_dio_insn_bits_do_b(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
const struct diosubd_data *d = (const struct diosubd_data *)s->private;
|
||||
int i;
|
||||
@ -411,8 +411,8 @@ static int pci_dio_insn_bits_do_b(struct comedi_device * dev, struct comedi_subd
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci_dio_insn_bits_do_w(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci_dio_insn_bits_do_w(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
const struct diosubd_data *d = (const struct diosubd_data *)s->private;
|
||||
int i;
|
||||
@ -432,7 +432,7 @@ static int pci_dio_insn_bits_do_w(struct comedi_device * dev, struct comedi_subd
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1760_unchecked_mbxrequest(struct comedi_device * dev,
|
||||
static int pci1760_unchecked_mbxrequest(struct comedi_device *dev,
|
||||
unsigned char *omb, unsigned char *imb, int repeats)
|
||||
{
|
||||
int cnt, tout, ok = 0;
|
||||
@ -460,7 +460,7 @@ static int pci1760_unchecked_mbxrequest(struct comedi_device * dev,
|
||||
return -ETIME;
|
||||
}
|
||||
|
||||
static int pci1760_clear_imb2(struct comedi_device * dev)
|
||||
static int pci1760_clear_imb2(struct comedi_device *dev)
|
||||
{
|
||||
unsigned char omb[4] = { 0x0, 0x0, CMD_ClearIMB2, 0x0 };
|
||||
unsigned char imb[4];
|
||||
@ -470,7 +470,7 @@ static int pci1760_clear_imb2(struct comedi_device * dev)
|
||||
return pci1760_unchecked_mbxrequest(dev, omb, imb, OMBCMD_RETRY);
|
||||
}
|
||||
|
||||
static int pci1760_mbxrequest(struct comedi_device * dev,
|
||||
static int pci1760_mbxrequest(struct comedi_device *dev,
|
||||
unsigned char *omb, unsigned char *imb)
|
||||
{
|
||||
if (omb[2] == CMD_ClearIMB2) {
|
||||
@ -490,8 +490,8 @@ static int pci1760_mbxrequest(struct comedi_device * dev,
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1760_insn_bits_di(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci1760_insn_bits_di(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[1] = inb(dev->iobase + IMB3);
|
||||
|
||||
@ -501,8 +501,8 @@ static int pci1760_insn_bits_di(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1760_insn_bits_do(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci1760_insn_bits_do(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int ret;
|
||||
unsigned char omb[4] = {
|
||||
@ -528,8 +528,8 @@ static int pci1760_insn_bits_do(struct comedi_device * dev, struct comedi_subdev
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1760_insn_cnt_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci1760_insn_cnt_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int ret, n;
|
||||
unsigned char omb[4] = {
|
||||
@ -552,8 +552,8 @@ static int pci1760_insn_cnt_read(struct comedi_device * dev, struct comedi_subde
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1760_insn_cnt_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci1760_insn_cnt_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int ret;
|
||||
unsigned char chan = CR_CHAN(insn->chanspec) & 0x07;
|
||||
@ -590,7 +590,7 @@ static int pci1760_insn_cnt_write(struct comedi_device * dev, struct comedi_subd
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1760_reset(struct comedi_device * dev)
|
||||
static int pci1760_reset(struct comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
unsigned char omb[4] = { 0x00, 0x00, 0x00, 0x00 };
|
||||
@ -667,7 +667,7 @@ static int pci1760_reset(struct comedi_device * dev)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci_dio_reset(struct comedi_device * dev)
|
||||
static int pci_dio_reset(struct comedi_device *dev)
|
||||
{
|
||||
DPRINTK("adv_pci_dio EDBG: BGN: pci171x_reset(...)\n");
|
||||
|
||||
@ -750,7 +750,7 @@ static int pci_dio_reset(struct comedi_device * dev)
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci1760_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pci1760_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int subdev = 0;
|
||||
@ -802,8 +802,8 @@ static int pci1760_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci_dio_add_di(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
const struct diosubd_data * d, int subdev)
|
||||
static int pci_dio_add_di(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
const struct diosubd_data *d, int subdev)
|
||||
{
|
||||
s->type = COMEDI_SUBD_DI;
|
||||
s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON | d->specflags;
|
||||
@ -829,8 +829,8 @@ static int pci_dio_add_di(struct comedi_device * dev, struct comedi_subdevice *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci_dio_add_do(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
const struct diosubd_data * d, int subdev)
|
||||
static int pci_dio_add_do(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
const struct diosubd_data *d, int subdev)
|
||||
{
|
||||
s->type = COMEDI_SUBD_DO;
|
||||
s->subdev_flags = SDF_WRITABLE | SDF_GROUND | SDF_COMMON;
|
||||
@ -857,7 +857,7 @@ static int pci_dio_add_do(struct comedi_device * dev, struct comedi_subdevice *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int CheckAndAllocCard(struct comedi_device * dev, struct comedi_devconfig * it,
|
||||
static int CheckAndAllocCard(struct comedi_device *dev, struct comedi_devconfig *it,
|
||||
struct pci_dev *pcidev)
|
||||
{
|
||||
struct pci_dio_private *pr, *prev;
|
||||
@ -883,7 +883,7 @@ static int CheckAndAllocCard(struct comedi_device * dev, struct comedi_devconfig
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci_dio_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pci_dio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret, subdev, n_subdevices, i, j;
|
||||
@ -1011,7 +1011,7 @@ static int pci_dio_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
/*
|
||||
==============================================================================
|
||||
*/
|
||||
static int pci_dio_detach(struct comedi_device * dev)
|
||||
static int pci_dio_detach(struct comedi_device *dev)
|
||||
{
|
||||
int i, j;
|
||||
struct comedi_subdevice *s;
|
||||
|
@ -88,8 +88,8 @@ struct aio12_8_private {
|
||||
|
||||
#define devpriv ((struct aio12_8_private *) dev->private)
|
||||
|
||||
static int aio_aio12_8_ai_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int aio_aio12_8_ai_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n;
|
||||
unsigned char control =
|
||||
@ -122,8 +122,8 @@ static int aio_aio12_8_ai_read(struct comedi_device * dev, struct comedi_subdevi
|
||||
return n;
|
||||
}
|
||||
|
||||
static int aio_aio12_8_ao_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int aio_aio12_8_ao_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int val = devpriv->ao_readback[CR_CHAN(insn->chanspec)];
|
||||
@ -133,8 +133,8 @@ static int aio_aio12_8_ao_read(struct comedi_device * dev, struct comedi_subdevi
|
||||
return insn->n;
|
||||
}
|
||||
|
||||
static int aio_aio12_8_ao_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int aio_aio12_8_ao_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -161,7 +161,7 @@ static const struct comedi_lrange range_aio_aio12_8 = {
|
||||
}
|
||||
};
|
||||
|
||||
static int aio_aio12_8_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int aio_aio12_8_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int iobase;
|
||||
struct comedi_subdevice *s;
|
||||
@ -205,7 +205,7 @@ static int aio_aio12_8_attach(struct comedi_device * dev, struct comedi_devconfi
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int aio_aio12_8_detach(struct comedi_device * dev)
|
||||
static int aio_aio12_8_detach(struct comedi_device *dev)
|
||||
{
|
||||
subdev_8255_cleanup(dev, &dev->subdevices[2]);
|
||||
if (dev->iobase)
|
||||
|
@ -67,9 +67,9 @@ struct aio_iiro_16_private {
|
||||
|
||||
#define devpriv ((struct aio_iiro_16_private *) dev->private)
|
||||
|
||||
static int aio_iiro_16_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int aio_iiro_16_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
|
||||
static int aio_iiro_16_detach(struct comedi_device * dev);
|
||||
static int aio_iiro_16_detach(struct comedi_device *dev);
|
||||
|
||||
static struct comedi_driver driver_aio_iiro_16 = {
|
||||
driver_name:"aio_iiro_16",
|
||||
@ -81,13 +81,13 @@ static struct comedi_driver driver_aio_iiro_16 = {
|
||||
num_names:sizeof(aio_iiro_16_boards) / sizeof(struct aio_iiro_16_board),
|
||||
};
|
||||
|
||||
static int aio_iiro_16_dio_insn_bits_read(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int aio_iiro_16_dio_insn_bits_read(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int aio_iiro_16_dio_insn_bits_write(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int aio_iiro_16_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int aio_iiro_16_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int iobase;
|
||||
struct comedi_subdevice *s;
|
||||
@ -132,7 +132,7 @@ static int aio_iiro_16_attach(struct comedi_device * dev, struct comedi_devconfi
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int aio_iiro_16_detach(struct comedi_device * dev)
|
||||
static int aio_iiro_16_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: aio_iiro_16: remove\n", dev->minor);
|
||||
|
||||
@ -142,8 +142,8 @@ static int aio_iiro_16_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int aio_iiro_16_dio_insn_bits_write(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -161,8 +161,8 @@ static int aio_iiro_16_dio_insn_bits_write(struct comedi_device * dev,
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int aio_iiro_16_dio_insn_bits_read(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int aio_iiro_16_dio_insn_bits_read(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
|
@ -475,8 +475,8 @@ struct dio200_subdev_intr {
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int dio200_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dio200_detach(struct comedi_device * dev);
|
||||
static int dio200_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dio200_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_amplc_dio200 = {
|
||||
driver_name:DIO200_DRIVER_NAME,
|
||||
module:THIS_MODULE,
|
||||
@ -499,7 +499,7 @@ COMEDI_INITCLEANUP(driver_amplc_dio200);
|
||||
*/
|
||||
#ifdef CONFIG_COMEDI_PCI
|
||||
static int
|
||||
dio200_find_pci(struct comedi_device * dev, int bus, int slot,
|
||||
dio200_find_pci(struct comedi_device *dev, int bus, int slot,
|
||||
struct pci_dev **pci_dev_p)
|
||||
{
|
||||
struct pci_dev *pci_dev = NULL;
|
||||
@ -574,8 +574,8 @@ dio200_request_region(unsigned minor, unsigned long from, unsigned long extent)
|
||||
* 'insn_bits' function for an 'INTERRUPT' subdevice.
|
||||
*/
|
||||
static int
|
||||
dio200_subdev_intr_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
dio200_subdev_intr_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
struct dio200_subdev_intr *subpriv = s->private;
|
||||
|
||||
@ -593,7 +593,7 @@ dio200_subdev_intr_insn_bits(struct comedi_device * dev, struct comedi_subdevice
|
||||
/*
|
||||
* Called to stop acquisition for an 'INTERRUPT' subdevice.
|
||||
*/
|
||||
static void dio200_stop_intr(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void dio200_stop_intr(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct dio200_subdev_intr *subpriv = s->private;
|
||||
|
||||
@ -607,7 +607,7 @@ static void dio200_stop_intr(struct comedi_device * dev, struct comedi_subdevice
|
||||
/*
|
||||
* Called to start acquisition for an 'INTERRUPT' subdevice.
|
||||
*/
|
||||
static int dio200_start_intr(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dio200_start_intr(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned int n;
|
||||
unsigned isn_bits;
|
||||
@ -643,7 +643,7 @@ static int dio200_start_intr(struct comedi_device * dev, struct comedi_subdevice
|
||||
* Internal trigger function to start acquisition for an 'INTERRUPT' subdevice.
|
||||
*/
|
||||
static int
|
||||
dio200_inttrig_start_intr(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
dio200_inttrig_start_intr(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int trignum)
|
||||
{
|
||||
struct dio200_subdev_intr *subpriv;
|
||||
@ -673,7 +673,7 @@ dio200_inttrig_start_intr(struct comedi_device * dev, struct comedi_subdevice *
|
||||
* This is called from the interrupt service routine to handle a read
|
||||
* scan on an 'INTERRUPT' subdevice.
|
||||
*/
|
||||
static int dio200_handle_read_intr(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dio200_handle_read_intr(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct dio200_subdev_intr *subpriv = s->private;
|
||||
unsigned triggered;
|
||||
@ -785,7 +785,7 @@ static int dio200_handle_read_intr(struct comedi_device * dev, struct comedi_sub
|
||||
/*
|
||||
* 'cancel' function for an 'INTERRUPT' subdevice.
|
||||
*/
|
||||
static int dio200_subdev_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dio200_subdev_intr_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct dio200_subdev_intr *subpriv = s->private;
|
||||
unsigned long flags;
|
||||
@ -803,8 +803,8 @@ static int dio200_subdev_intr_cancel(struct comedi_device * dev, struct comedi_s
|
||||
* 'do_cmdtest' function for an 'INTERRUPT' subdevice.
|
||||
*/
|
||||
static int
|
||||
dio200_subdev_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
dio200_subdev_intr_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
@ -909,7 +909,7 @@ dio200_subdev_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice *
|
||||
/*
|
||||
* 'do_cmd' function for an 'INTERRUPT' subdevice.
|
||||
*/
|
||||
static int dio200_subdev_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dio200_subdev_intr_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
struct dio200_subdev_intr *subpriv = s->private;
|
||||
@ -955,7 +955,7 @@ static int dio200_subdev_intr_cmd(struct comedi_device * dev, struct comedi_subd
|
||||
* This function initializes an 'INTERRUPT' subdevice.
|
||||
*/
|
||||
static int
|
||||
dio200_subdev_intr_init(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
dio200_subdev_intr_init(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned long iobase, unsigned valid_isns, int has_int_sce)
|
||||
{
|
||||
struct dio200_subdev_intr *subpriv;
|
||||
@ -1000,7 +1000,7 @@ dio200_subdev_intr_init(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
* This function cleans up an 'INTERRUPT' subdevice.
|
||||
*/
|
||||
static void
|
||||
dio200_subdev_intr_cleanup(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
dio200_subdev_intr_cleanup(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct dio200_subdev_intr *subpriv = s->private;
|
||||
|
||||
@ -1035,8 +1035,8 @@ static irqreturn_t dio200_interrupt(int irq, void *d)
|
||||
* Handle 'insn_read' for an '8254' counter subdevice.
|
||||
*/
|
||||
static int
|
||||
dio200_subdev_8254_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
dio200_subdev_8254_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
struct dio200_subdev_8254 *subpriv = s->private;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -1050,8 +1050,8 @@ dio200_subdev_8254_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
* Handle 'insn_write' for an '8254' counter subdevice.
|
||||
*/
|
||||
static int
|
||||
dio200_subdev_8254_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
dio200_subdev_8254_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
struct dio200_subdev_8254 *subpriv = s->private;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -1065,7 +1065,7 @@ dio200_subdev_8254_write(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
* Set gate source for an '8254' counter subdevice channel.
|
||||
*/
|
||||
static int
|
||||
dio200_set_gate_src(struct dio200_subdev_8254 * subpriv, unsigned int counter_number,
|
||||
dio200_set_gate_src(struct dio200_subdev_8254 *subpriv, unsigned int counter_number,
|
||||
unsigned int gate_src)
|
||||
{
|
||||
unsigned char byte;
|
||||
@ -1088,7 +1088,7 @@ dio200_set_gate_src(struct dio200_subdev_8254 * subpriv, unsigned int counter_nu
|
||||
* Get gate source for an '8254' counter subdevice channel.
|
||||
*/
|
||||
static int
|
||||
dio200_get_gate_src(struct dio200_subdev_8254 * subpriv, unsigned int counter_number)
|
||||
dio200_get_gate_src(struct dio200_subdev_8254 *subpriv, unsigned int counter_number)
|
||||
{
|
||||
if (!subpriv->has_clk_gat_sce)
|
||||
return -1;
|
||||
@ -1102,7 +1102,7 @@ dio200_get_gate_src(struct dio200_subdev_8254 * subpriv, unsigned int counter_nu
|
||||
* Set clock source for an '8254' counter subdevice channel.
|
||||
*/
|
||||
static int
|
||||
dio200_set_clock_src(struct dio200_subdev_8254 * subpriv, unsigned int counter_number,
|
||||
dio200_set_clock_src(struct dio200_subdev_8254 *subpriv, unsigned int counter_number,
|
||||
unsigned int clock_src)
|
||||
{
|
||||
unsigned char byte;
|
||||
@ -1125,8 +1125,8 @@ dio200_set_clock_src(struct dio200_subdev_8254 * subpriv, unsigned int counter_n
|
||||
* Get clock source for an '8254' counter subdevice channel.
|
||||
*/
|
||||
static int
|
||||
dio200_get_clock_src(struct dio200_subdev_8254 * subpriv, unsigned int counter_number,
|
||||
unsigned int * period_ns)
|
||||
dio200_get_clock_src(struct dio200_subdev_8254 *subpriv, unsigned int counter_number,
|
||||
unsigned int *period_ns)
|
||||
{
|
||||
unsigned clock_src;
|
||||
|
||||
@ -1144,8 +1144,8 @@ dio200_get_clock_src(struct dio200_subdev_8254 * subpriv, unsigned int counter_n
|
||||
* Handle 'insn_config' for an '8254' counter subdevice.
|
||||
*/
|
||||
static int
|
||||
dio200_subdev_8254_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
dio200_subdev_8254_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
struct dio200_subdev_8254 *subpriv = s->private;
|
||||
int ret;
|
||||
@ -1196,7 +1196,7 @@ dio200_subdev_8254_config(struct comedi_device * dev, struct comedi_subdevice *
|
||||
* offset is the offset to the 8254 chip.
|
||||
*/
|
||||
static int
|
||||
dio200_subdev_8254_init(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
dio200_subdev_8254_init(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned long iobase, unsigned offset, int has_clk_gat_sce)
|
||||
{
|
||||
struct dio200_subdev_8254 *subpriv;
|
||||
@ -1249,7 +1249,7 @@ dio200_subdev_8254_init(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
* This function cleans up an '8254' counter subdevice.
|
||||
*/
|
||||
static void
|
||||
dio200_subdev_8254_cleanup(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
dio200_subdev_8254_cleanup(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct dio200_subdev_intr *subpriv = s->private;
|
||||
|
||||
@ -1264,7 +1264,7 @@ dio200_subdev_8254_cleanup(struct comedi_device * dev, struct comedi_subdevice *
|
||||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int dio200_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dio200_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase = 0;
|
||||
@ -1431,7 +1431,7 @@ static int dio200_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int dio200_detach(struct comedi_device * dev)
|
||||
static int dio200_detach(struct comedi_device *dev)
|
||||
{
|
||||
const struct dio200_layout_struct *layout;
|
||||
unsigned n;
|
||||
|
@ -167,8 +167,8 @@ struct pc236_private {
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int pc236_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pc236_detach(struct comedi_device * dev);
|
||||
static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pc236_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_amplc_pc236 = {
|
||||
driver_name:PC236_DRIVER_NAME,
|
||||
module:THIS_MODULE,
|
||||
@ -204,7 +204,7 @@ static irqreturn_t pc236_interrupt(int irq, void *d);
|
||||
*/
|
||||
#ifdef CONFIG_COMEDI_PCI
|
||||
static int
|
||||
pc236_find_pci(struct comedi_device * dev, int bus, int slot,
|
||||
pc236_find_pci(struct comedi_device *dev, int bus, int slot,
|
||||
struct pci_dev **pci_dev_p)
|
||||
{
|
||||
struct pci_dev *pci_dev = NULL;
|
||||
@ -266,7 +266,7 @@ pc236_find_pci(struct comedi_device * dev, int bus, int slot,
|
||||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int pc236_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase = 0;
|
||||
@ -407,7 +407,7 @@ static int pc236_attach(struct comedi_device * dev, struct comedi_devconfig * it
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int pc236_detach(struct comedi_device * dev)
|
||||
static int pc236_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor,
|
||||
PC236_DRIVER_NAME);
|
||||
@ -461,7 +461,7 @@ static int pc236_request_region(unsigned minor, unsigned long from,
|
||||
* configured on subdevice 1) and to physically disable the interrupt
|
||||
* (not possible on the PC36AT, except by removing the IRQ jumper!).
|
||||
*/
|
||||
static void pc236_intr_disable(struct comedi_device * dev)
|
||||
static void pc236_intr_disable(struct comedi_device *dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -479,7 +479,7 @@ static void pc236_intr_disable(struct comedi_device * dev)
|
||||
* configured on subdevice 1) and to physically enable the interrupt
|
||||
* (not possible on the PC36AT, except by (re)connecting the IRQ jumper!).
|
||||
*/
|
||||
static void pc236_intr_enable(struct comedi_device * dev)
|
||||
static void pc236_intr_enable(struct comedi_device *dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -499,7 +499,7 @@ static void pc236_intr_enable(struct comedi_device * dev)
|
||||
* interrupt.
|
||||
* Returns 0 if the interrupt should be ignored.
|
||||
*/
|
||||
static int pc236_intr_check(struct comedi_device * dev)
|
||||
static int pc236_intr_check(struct comedi_device *dev)
|
||||
{
|
||||
int retval = 0;
|
||||
unsigned long flags;
|
||||
@ -530,8 +530,8 @@ static int pc236_intr_check(struct comedi_device * dev)
|
||||
* Input from subdevice 1.
|
||||
* Copied from the comedi_parport driver.
|
||||
*/
|
||||
static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pc236_intr_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[1] = 0;
|
||||
return 2;
|
||||
@ -541,8 +541,8 @@ static int pc236_intr_insn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
* Subdevice 1 command test.
|
||||
* Copied from the comedi_parport driver.
|
||||
*/
|
||||
static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int pc236_intr_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -619,7 +619,7 @@ static int pc236_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevic
|
||||
/*
|
||||
* Subdevice 1 command.
|
||||
*/
|
||||
static int pc236_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pc236_intr_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
pc236_intr_enable(dev);
|
||||
|
||||
@ -629,7 +629,7 @@ static int pc236_intr_cmd(struct comedi_device * dev, struct comedi_subdevice *
|
||||
/*
|
||||
* Subdevice 1 cancel command.
|
||||
*/
|
||||
static int pc236_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pc236_intr_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
pc236_intr_disable(dev);
|
||||
|
||||
|
@ -132,8 +132,8 @@ struct pc263_private {
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int pc263_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pc263_detach(struct comedi_device * dev);
|
||||
static int pc263_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pc263_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_amplc_pc263 = {
|
||||
driver_name:PC263_DRIVER_NAME,
|
||||
module:THIS_MODULE,
|
||||
@ -146,10 +146,10 @@ static struct comedi_driver driver_amplc_pc263 = {
|
||||
|
||||
static int pc263_request_region(unsigned minor, unsigned long from,
|
||||
unsigned long extent);
|
||||
static int pc263_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int pc263_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int pc263_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int pc263_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
/*
|
||||
* This function looks for a PCI device matching the requested board name,
|
||||
@ -157,7 +157,7 @@ static int pc263_dio_insn_config(struct comedi_device * dev, struct comedi_subde
|
||||
*/
|
||||
#ifdef CONFIG_COMEDI_PCI
|
||||
static int
|
||||
pc263_find_pci(struct comedi_device * dev, int bus, int slot,
|
||||
pc263_find_pci(struct comedi_device *dev, int bus, int slot,
|
||||
struct pci_dev **pci_dev_p)
|
||||
{
|
||||
struct pci_dev *pci_dev = NULL;
|
||||
@ -219,7 +219,7 @@ pc263_find_pci(struct comedi_device * dev, int bus, int slot,
|
||||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int pc263_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pc263_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase = 0;
|
||||
@ -337,7 +337,7 @@ static int pc263_attach(struct comedi_device * dev, struct comedi_devconfig * it
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int pc263_detach(struct comedi_device * dev)
|
||||
static int pc263_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor,
|
||||
PC263_DRIVER_NAME);
|
||||
@ -387,8 +387,8 @@ static int pc263_request_region(unsigned minor, unsigned long from,
|
||||
* useful to applications if you implement the insn_bits interface.
|
||||
* This allows packed reading/writing of the DIO channels. The
|
||||
* comedi core can convert between insn_bits and insn_read/write */
|
||||
static int pc263_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pc263_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -412,8 +412,8 @@ static int pc263_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevi
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int pc263_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pc263_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 1)
|
||||
return -EINVAL;
|
||||
|
@ -428,8 +428,8 @@ struct pci224_private {
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int pci224_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pci224_detach(struct comedi_device * dev);
|
||||
static int pci224_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pci224_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_amplc_pci224 = {
|
||||
driver_name:DRIVER_NAME,
|
||||
module:THIS_MODULE,
|
||||
@ -446,7 +446,7 @@ COMEDI_PCI_INITCLEANUP(driver_amplc_pci224, pci224_pci_table);
|
||||
* Called from the 'insn_write' function to perform a single write.
|
||||
*/
|
||||
static void
|
||||
pci224_ao_set_data(struct comedi_device * dev, int chan, int range, unsigned int data)
|
||||
pci224_ao_set_data(struct comedi_device *dev, int chan, int range, unsigned int data)
|
||||
{
|
||||
unsigned short mangled;
|
||||
|
||||
@ -479,8 +479,8 @@ pci224_ao_set_data(struct comedi_device * dev, int chan, int range, unsigned int
|
||||
* 'insn_write' function for AO subdevice.
|
||||
*/
|
||||
static int
|
||||
pci224_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
pci224_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan, range;
|
||||
@ -506,8 +506,8 @@ pci224_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
* command.
|
||||
*/
|
||||
static int
|
||||
pci224_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
pci224_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan;
|
||||
@ -534,7 +534,7 @@ pci224_cascade_ns_to_timer(int osc_base, unsigned int *d1, unsigned int *d2,
|
||||
/*
|
||||
* Kills a command running on the AO subdevice.
|
||||
*/
|
||||
static void pci224_ao_stop(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci224_ao_stop(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -574,7 +574,7 @@ static void pci224_ao_stop(struct comedi_device * dev, struct comedi_subdevice *
|
||||
/*
|
||||
* Handles start of acquisition for the AO subdevice.
|
||||
*/
|
||||
static void pci224_ao_start(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci224_ao_start(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned long flags;
|
||||
@ -601,7 +601,7 @@ static void pci224_ao_start(struct comedi_device * dev, struct comedi_subdevice
|
||||
/*
|
||||
* Handles interrupts from the DAC FIFO.
|
||||
*/
|
||||
static void pci224_ao_handle_fifo(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci224_ao_handle_fifo(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int num_scans;
|
||||
@ -730,7 +730,7 @@ static void pci224_ao_handle_fifo(struct comedi_device * dev, struct comedi_subd
|
||||
* Internal trigger function to start acquisition on AO subdevice.
|
||||
*/
|
||||
static int
|
||||
pci224_ao_inttrig_start(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
pci224_ao_inttrig_start(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int trignum)
|
||||
{
|
||||
if (trignum != 0)
|
||||
@ -750,7 +750,7 @@ pci224_ao_inttrig_start(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
* 'do_cmdtest' function for AO subdevice.
|
||||
*/
|
||||
static int
|
||||
pci224_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, struct comedi_cmd * cmd)
|
||||
pci224_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
@ -1017,7 +1017,7 @@ pci224_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s, struc
|
||||
/*
|
||||
* 'do_cmd' function for AO subdevice.
|
||||
*/
|
||||
static int pci224_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci224_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int range;
|
||||
@ -1174,7 +1174,7 @@ static int pci224_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
/*
|
||||
* 'cancel' function for AO subdevice.
|
||||
*/
|
||||
static int pci224_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci224_ao_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
pci224_ao_stop(dev, s);
|
||||
return 0;
|
||||
@ -1184,7 +1184,7 @@ static int pci224_ao_cancel(struct comedi_device * dev, struct comedi_subdevice
|
||||
* 'munge' data for AO command.
|
||||
*/
|
||||
static void
|
||||
pci224_ao_munge(struct comedi_device * dev, struct comedi_subdevice * s, void *data,
|
||||
pci224_ao_munge(struct comedi_device *dev, struct comedi_subdevice *s, void *data,
|
||||
unsigned int num_bytes, unsigned int chan_index)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
@ -1266,7 +1266,7 @@ static irqreturn_t pci224_interrupt(int irq, void *d)
|
||||
* bus and slot.
|
||||
*/
|
||||
static int
|
||||
pci224_find_pci(struct comedi_device * dev, int bus, int slot,
|
||||
pci224_find_pci(struct comedi_device *dev, int bus, int slot,
|
||||
struct pci_dev **pci_dev_p)
|
||||
{
|
||||
struct pci_dev *pci_dev = NULL;
|
||||
@ -1325,7 +1325,7 @@ pci224_find_pci(struct comedi_device * dev, int bus, int slot,
|
||||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int pci224_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pci224_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
struct pci_dev *pci_dev;
|
||||
@ -1505,7 +1505,7 @@ static int pci224_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int pci224_detach(struct comedi_device * dev)
|
||||
static int pci224_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk(KERN_DEBUG "comedi%d: %s: detach\n", dev->minor, DRIVER_NAME);
|
||||
|
||||
|
@ -603,8 +603,8 @@ static const unsigned char pci230_ao_bipolar[2] = { 0, 1 };
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int pci230_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pci230_detach(struct comedi_device * dev);
|
||||
static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pci230_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_amplc_pci230 = {
|
||||
driver_name:"amplc_pci230",
|
||||
module:THIS_MODULE,
|
||||
@ -660,7 +660,7 @@ static short pci230_ai_read(struct comedi_device * dev)
|
||||
return data;
|
||||
}
|
||||
|
||||
static inline unsigned short pci230_ao_mangle_datum(struct comedi_device * dev,
|
||||
static inline unsigned short pci230_ao_mangle_datum(struct comedi_device *dev,
|
||||
short datum)
|
||||
{
|
||||
/* If a bipolar range was specified, mangle it (straight binary->twos
|
||||
@ -676,7 +676,7 @@ static inline unsigned short pci230_ao_mangle_datum(struct comedi_device * dev,
|
||||
return (unsigned short)datum;
|
||||
}
|
||||
|
||||
static inline void pci230_ao_write_nofifo(struct comedi_device * dev, short datum,
|
||||
static inline void pci230_ao_write_nofifo(struct comedi_device *dev, short datum,
|
||||
unsigned int chan)
|
||||
{
|
||||
/* Store unmangled datum to be read back later. */
|
||||
@ -687,7 +687,7 @@ static inline void pci230_ao_write_nofifo(struct comedi_device * dev, short datu
|
||||
? PCI230_DACOUT1 : PCI230_DACOUT2));
|
||||
}
|
||||
|
||||
static inline void pci230_ao_write_fifo(struct comedi_device * dev, short datum,
|
||||
static inline void pci230_ao_write_fifo(struct comedi_device *dev, short datum,
|
||||
unsigned int chan)
|
||||
{
|
||||
/* Store unmangled datum to be read back later. */
|
||||
@ -704,7 +704,7 @@ static inline void pci230_ao_write_fifo(struct comedi_device * dev, short datum,
|
||||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int pci230_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pci230_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase1, iobase2;
|
||||
@ -961,7 +961,7 @@ static int pci230_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int pci230_detach(struct comedi_device * dev)
|
||||
static int pci230_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: amplc_pci230: remove\n", dev->minor);
|
||||
|
||||
@ -984,7 +984,7 @@ static int pci230_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int get_resources(struct comedi_device * dev, unsigned int res_mask,
|
||||
static int get_resources(struct comedi_device *dev, unsigned int res_mask,
|
||||
unsigned char owner)
|
||||
{
|
||||
int ok;
|
||||
@ -1020,13 +1020,13 @@ static int get_resources(struct comedi_device * dev, unsigned int res_mask,
|
||||
return ok;
|
||||
}
|
||||
|
||||
static inline int get_one_resource(struct comedi_device * dev, unsigned int resource,
|
||||
static inline int get_one_resource(struct comedi_device *dev, unsigned int resource,
|
||||
unsigned char owner)
|
||||
{
|
||||
return get_resources(dev, (1U << resource), owner);
|
||||
}
|
||||
|
||||
static void put_resources(struct comedi_device * dev, unsigned int res_mask,
|
||||
static void put_resources(struct comedi_device *dev, unsigned int res_mask,
|
||||
unsigned char owner)
|
||||
{
|
||||
unsigned int i;
|
||||
@ -1046,13 +1046,13 @@ static void put_resources(struct comedi_device * dev, unsigned int res_mask,
|
||||
comedi_spin_unlock_irqrestore(&devpriv->res_spinlock, irqflags);
|
||||
}
|
||||
|
||||
static inline void put_one_resource(struct comedi_device * dev, unsigned int resource,
|
||||
static inline void put_one_resource(struct comedi_device *dev, unsigned int resource,
|
||||
unsigned char owner)
|
||||
{
|
||||
put_resources(dev, (1U << resource), owner);
|
||||
}
|
||||
|
||||
static inline void put_all_resources(struct comedi_device * dev, unsigned char owner)
|
||||
static inline void put_all_resources(struct comedi_device *dev, unsigned char owner)
|
||||
{
|
||||
put_resources(dev, (1U << NUM_RESOURCES) - 1, owner);
|
||||
}
|
||||
@ -1060,8 +1060,8 @@ static inline void put_all_resources(struct comedi_device * dev, unsigned char o
|
||||
/*
|
||||
* COMEDI_SUBD_AI instruction;
|
||||
*/
|
||||
static int pci230_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci230_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int n, i;
|
||||
unsigned int chan, range, aref;
|
||||
@ -1165,8 +1165,8 @@ static int pci230_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
/*
|
||||
* COMEDI_SUBD_AO instructions;
|
||||
*/
|
||||
static int pci230_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci230_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan, range;
|
||||
@ -1193,8 +1193,8 @@ static int pci230_ao_winsn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
|
||||
/* AO subdevices should have a read insn as well as a write insn.
|
||||
* Usually this means copying a value stored in devpriv. */
|
||||
static int pci230_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci230_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -1205,8 +1205,8 @@ static int pci230_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return i;
|
||||
}
|
||||
|
||||
static int pci230_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int pci230_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
@ -1418,8 +1418,8 @@ static int pci230_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pci230_ao_inttrig_scan_begin(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, unsigned int trig_num)
|
||||
static int pci230_ao_inttrig_scan_begin(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, unsigned int trig_num)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
|
||||
@ -1450,7 +1450,7 @@ static int pci230_ao_inttrig_scan_begin(struct comedi_device * dev,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void pci230_ao_start(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci230_ao_start(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
@ -1538,7 +1538,7 @@ static void pci230_ao_start(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
}
|
||||
|
||||
static int pci230_ao_inttrig_start(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int pci230_ao_inttrig_start(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int trig_num)
|
||||
{
|
||||
if (trig_num != 0)
|
||||
@ -1550,7 +1550,7 @@ static int pci230_ao_inttrig_start(struct comedi_device * dev, struct comedi_sub
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci230_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned short daccon;
|
||||
unsigned int range;
|
||||
@ -1626,7 +1626,7 @@ static int pci230_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pci230_ai_check_scan_period(struct comedi_cmd * cmd)
|
||||
static int pci230_ai_check_scan_period(struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int min_scan_period, chanlist_len;
|
||||
int err = 0;
|
||||
@ -1650,8 +1650,8 @@ static int pci230_ai_check_scan_period(struct comedi_cmd * cmd)
|
||||
return !err;
|
||||
}
|
||||
|
||||
static int pci230_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int pci230_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
@ -2036,8 +2036,8 @@ static int pci230_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pci230_ai_update_fifo_trigger_level(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s)
|
||||
static void pci230_ai_update_fifo_trigger_level(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int scanlen = cmd->scan_end_arg;
|
||||
@ -2080,7 +2080,7 @@ static void pci230_ai_update_fifo_trigger_level(struct comedi_device * dev,
|
||||
}
|
||||
}
|
||||
|
||||
static int pci230_ai_inttrig_convert(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int pci230_ai_inttrig_convert(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int trig_num)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
@ -2123,8 +2123,8 @@ static int pci230_ai_inttrig_convert(struct comedi_device * dev, struct comedi_s
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int pci230_ai_inttrig_scan_begin(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, unsigned int trig_num)
|
||||
static int pci230_ai_inttrig_scan_begin(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, unsigned int trig_num)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
unsigned char zgat;
|
||||
@ -2145,7 +2145,7 @@ static int pci230_ai_inttrig_scan_begin(struct comedi_device * dev,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void pci230_ai_start(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci230_ai_start(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
unsigned short conv;
|
||||
@ -2282,7 +2282,7 @@ static void pci230_ai_start(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
}
|
||||
|
||||
static int pci230_ai_inttrig_start(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int pci230_ai_inttrig_start(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int trig_num)
|
||||
{
|
||||
if (trig_num != 0)
|
||||
@ -2294,7 +2294,7 @@ static int pci230_ai_inttrig_start(struct comedi_device * dev, struct comedi_sub
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int pci230_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci230_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned int i, chan, range, diff;
|
||||
unsigned int res_mask;
|
||||
@ -2534,7 +2534,7 @@ static void pci230_ns_to_single_timer(unsigned int *ns, unsigned int round)
|
||||
return;
|
||||
}
|
||||
|
||||
static void pci230_ct_setup_ns_mode(struct comedi_device * dev, unsigned int ct,
|
||||
static void pci230_ct_setup_ns_mode(struct comedi_device *dev, unsigned int ct,
|
||||
unsigned int mode, uint64_t ns, unsigned int round)
|
||||
{
|
||||
unsigned int clk_src;
|
||||
@ -2553,7 +2553,7 @@ static void pci230_ct_setup_ns_mode(struct comedi_device * dev, unsigned int ct,
|
||||
i8254_write(devpriv->iobase1 + PCI230_Z2_CT_BASE, 0, ct, count);
|
||||
}
|
||||
|
||||
static void pci230_cancel_ct(struct comedi_device * dev, unsigned int ct)
|
||||
static void pci230_cancel_ct(struct comedi_device *dev, unsigned int ct)
|
||||
{
|
||||
i8254_set_mode(devpriv->iobase1 + PCI230_Z2_CT_BASE, 0, ct,
|
||||
I8254_MODE1);
|
||||
@ -2624,7 +2624,7 @@ static irqreturn_t pci230_interrupt(int irq, void *d)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static void pci230_handle_ao_nofifo(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci230_handle_ao_nofifo(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
short data;
|
||||
int i, ret;
|
||||
@ -2661,7 +2661,7 @@ static void pci230_handle_ao_nofifo(struct comedi_device * dev, struct comedi_su
|
||||
|
||||
/* Loads DAC FIFO (if using it) from buffer. */
|
||||
/* Returns 0 if AO finished due to completion or error, 1 if still going. */
|
||||
static int pci230_handle_ao_fifo(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci230_handle_ao_fifo(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
@ -2764,7 +2764,7 @@ static int pci230_handle_ao_fifo(struct comedi_device * dev, struct comedi_subde
|
||||
return running;
|
||||
}
|
||||
|
||||
static void pci230_handle_ai(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci230_handle_ai(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned int events = 0;
|
||||
unsigned int status_fifo;
|
||||
@ -2863,7 +2863,7 @@ static void pci230_handle_ai(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
}
|
||||
|
||||
static void pci230_ao_stop(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci230_ao_stop(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
unsigned char intsrc;
|
||||
@ -2918,13 +2918,13 @@ static void pci230_ao_stop(struct comedi_device * dev, struct comedi_subdevice *
|
||||
put_all_resources(dev, OWNER_AOCMD);
|
||||
}
|
||||
|
||||
static int pci230_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci230_ao_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
pci230_ao_stop(dev, s);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void pci230_ai_stop(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci230_ai_stop(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long irqflags;
|
||||
struct comedi_cmd *cmd;
|
||||
@ -2972,7 +2972,7 @@ static void pci230_ai_stop(struct comedi_device * dev, struct comedi_subdevice *
|
||||
put_all_resources(dev, OWNER_AICMD);
|
||||
}
|
||||
|
||||
static int pci230_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci230_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
pci230_ai_stop(dev, s);
|
||||
return 0;
|
||||
|
@ -97,8 +97,8 @@ union encvaluetype {
|
||||
|
||||
#define C6XDIGIO_TIME_OUT 20
|
||||
|
||||
static int c6xdigio_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int c6xdigio_detach(struct comedi_device * dev);
|
||||
static int c6xdigio_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int c6xdigio_detach(struct comedi_device *dev);
|
||||
struct comedi_driver driver_c6xdigio = {
|
||||
driver_name:"c6xdigio",
|
||||
module:THIS_MODULE,
|
||||
@ -338,15 +338,15 @@ static void C6X_encResetAll(unsigned long baseAddr)
|
||||
}
|
||||
}
|
||||
|
||||
static int c6xdigio_pwmo_insn_read(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int c6xdigio_pwmo_insn_read(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
printk("c6xdigio_pwmo_insn_read %x\n", insn->n);
|
||||
return insn->n;
|
||||
}
|
||||
|
||||
static int c6xdigio_pwmo_insn_write(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int c6xdigio_pwmo_insn_write(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -379,8 +379,8 @@ static int c6xdigio_pwmo_insn_write(struct comedi_device * dev,
|
||||
/* *//* return insn->n; */
|
||||
/* } */
|
||||
|
||||
static int c6xdigio_ei_insn_read(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int c6xdigio_ei_insn_read(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
/* printk("c6xdigio_ei__insn_read %x\n", insn->n); */
|
||||
int n;
|
||||
@ -393,7 +393,7 @@ static int c6xdigio_ei_insn_read(struct comedi_device * dev,
|
||||
return n;
|
||||
}
|
||||
|
||||
static void board_init(struct comedi_device * dev)
|
||||
static void board_init(struct comedi_device *dev)
|
||||
{
|
||||
|
||||
/* printk("Inside board_init\n"); */
|
||||
@ -426,7 +426,7 @@ static struct pnp_driver c6xdigio_pnp_driver = {
|
||||
.id_table = c6xdigio_pnp_tbl,
|
||||
};
|
||||
|
||||
static int c6xdigio_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int c6xdigio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int result = 0;
|
||||
unsigned long iobase;
|
||||
@ -495,7 +495,7 @@ static int c6xdigio_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int c6xdigio_detach(struct comedi_device * dev)
|
||||
static int c6xdigio_detach(struct comedi_device *dev)
|
||||
{
|
||||
/* board_halt(dev); may not need this */
|
||||
|
||||
|
@ -89,8 +89,8 @@ struct das16cs_private {
|
||||
};
|
||||
#define devpriv ((struct das16cs_private *)dev->private)
|
||||
|
||||
static int das16cs_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int das16cs_detach(struct comedi_device * dev);
|
||||
static int das16cs_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int das16cs_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_das16cs = {
|
||||
driver_name:"cb_das16_cs",
|
||||
module:THIS_MODULE,
|
||||
@ -165,7 +165,7 @@ static const struct das16cs_board *das16cs_probe(struct comedi_device * dev,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static int das16cs_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int das16cs_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct pcmcia_device *link;
|
||||
struct comedi_subdevice *s;
|
||||
@ -265,7 +265,7 @@ static int das16cs_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int das16cs_detach(struct comedi_device * dev)
|
||||
static int das16cs_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: das16cs: remove\n", dev->minor);
|
||||
|
||||
@ -286,8 +286,8 @@ static irqreturn_t das16cs_interrupt(int irq, void *d)
|
||||
* "instructions" read/write data in "one-shot" or "software-triggered"
|
||||
* mode.
|
||||
*/
|
||||
static int das16cs_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16cs_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int to;
|
||||
@ -328,13 +328,13 @@ static int das16cs_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
return i;
|
||||
}
|
||||
|
||||
static int das16cs_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das16cs_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int das16cs_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int das16cs_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -489,8 +489,8 @@ static int das16cs_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevic
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das16cs_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16cs_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -535,8 +535,8 @@ static int das16cs_ao_winsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
|
||||
/* AO subdevices should have a read insn as well as a write insn.
|
||||
* Usually this means copying a value stored in devpriv. */
|
||||
static int das16cs_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16cs_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -552,8 +552,8 @@ static int das16cs_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
* useful to applications if you implement the insn_bits interface.
|
||||
* This allows packed reading/writing of the DIO channels. The
|
||||
* comedi core can convert between insn_bits and insn_read/write */
|
||||
static int das16cs_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16cs_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -572,8 +572,8 @@ static int das16cs_dio_insn_bits(struct comedi_device * dev, struct comedi_subde
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das16cs_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16cs_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
int bits;
|
||||
@ -610,14 +610,14 @@ static int das16cs_dio_insn_config(struct comedi_device * dev, struct comedi_sub
|
||||
return insn->n;
|
||||
}
|
||||
|
||||
static int das16cs_timer_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16cs_timer_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int das16cs_timer_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16cs_timer_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -441,8 +441,8 @@ struct cb_pcidas_private {
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int cb_pcidas_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int cb_pcidas_detach(struct comedi_device * dev);
|
||||
static int cb_pcidas_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int cb_pcidas_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_cb_pcidas = {
|
||||
driver_name:"cb_pcidas",
|
||||
module:THIS_MODULE,
|
||||
@ -509,7 +509,7 @@ static inline unsigned int cal_enable_bits(struct comedi_device * dev)
|
||||
* Attach is called by the Comedi core to configure the driver
|
||||
* for a particular board.
|
||||
*/
|
||||
static int cb_pcidas_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int cb_pcidas_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
struct pci_dev *pcidev;
|
||||
@ -720,7 +720,7 @@ static int cb_pcidas_attach(struct comedi_device * dev, struct comedi_devconfig
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int cb_pcidas_detach(struct comedi_device * dev)
|
||||
static int cb_pcidas_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: cb_pcidas: remove\n", dev->minor);
|
||||
|
||||
@ -754,8 +754,8 @@ static int cb_pcidas_detach(struct comedi_device * dev)
|
||||
* "instructions" read/write data in "one-shot" or "software-triggered"
|
||||
* mode.
|
||||
*/
|
||||
static int cb_pcidas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int cb_pcidas_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, i;
|
||||
unsigned int bits;
|
||||
@ -806,7 +806,7 @@ static int cb_pcidas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevic
|
||||
return n;
|
||||
}
|
||||
|
||||
static int ai_config_calibration_source(struct comedi_device * dev, unsigned int * data)
|
||||
static int ai_config_calibration_source(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
static const int num_calibration_sources = 8;
|
||||
unsigned int source = data[1];
|
||||
@ -821,8 +821,8 @@ static int ai_config_calibration_source(struct comedi_device * dev, unsigned int
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ai_config_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int id = data[0];
|
||||
|
||||
@ -838,8 +838,8 @@ static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
}
|
||||
|
||||
/* analog output insn for pcidas-1000 and 1200 series */
|
||||
static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int cb_pcidas_ao_nofifo_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int channel;
|
||||
unsigned long flags;
|
||||
@ -863,8 +863,8 @@ static int cb_pcidas_ao_nofifo_winsn(struct comedi_device * dev, struct comedi_s
|
||||
}
|
||||
|
||||
/* analog output insn for pcidas-1602 series */
|
||||
static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int cb_pcidas_ao_fifo_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int channel;
|
||||
unsigned long flags;
|
||||
@ -894,16 +894,16 @@ static int cb_pcidas_ao_fifo_winsn(struct comedi_device * dev, struct comedi_sub
|
||||
|
||||
/* analog output readback insn */
|
||||
/* XXX loses track of analog output value back after an analog ouput command is executed */
|
||||
static int cb_pcidas_ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int cb_pcidas_ao_readback_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = devpriv->ao_value[CR_CHAN(insn->chanspec)];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int eeprom_read_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
uint8_t nvram_data;
|
||||
int retval;
|
||||
@ -917,16 +917,16 @@ static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int caldac_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int caldac_write_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
const unsigned int channel = CR_CHAN(insn->chanspec);
|
||||
|
||||
return caldac_8800_write(dev, channel, data[0]);
|
||||
}
|
||||
|
||||
static int caldac_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int caldac_read_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = devpriv->caldac_value[CR_CHAN(insn->chanspec)];
|
||||
|
||||
@ -934,7 +934,7 @@ static int caldac_read_insn(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
|
||||
/* 1602/16 pregain offset */
|
||||
static int dac08_write(struct comedi_device * dev, unsigned int value)
|
||||
static int dac08_write(struct comedi_device *dev, unsigned int value)
|
||||
{
|
||||
if (devpriv->dac08_value == value)
|
||||
return 1;
|
||||
@ -954,21 +954,21 @@ static int dac08_write(struct comedi_device * dev, unsigned int value)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dac08_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dac08_write_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
return dac08_write(dev, data[0]);
|
||||
}
|
||||
|
||||
static int dac08_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dac08_read_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = devpriv->dac08_value;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int cb_pcidas_trimpot_write(struct comedi_device * dev,
|
||||
static int cb_pcidas_trimpot_write(struct comedi_device *dev,
|
||||
unsigned int channel, unsigned int value)
|
||||
{
|
||||
if (devpriv->trimpot_value[channel] == value)
|
||||
@ -991,16 +991,16 @@ static int cb_pcidas_trimpot_write(struct comedi_device * dev,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int trimpot_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int trimpot_write_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int channel = CR_CHAN(insn->chanspec);
|
||||
|
||||
return cb_pcidas_trimpot_write(dev, channel, data[0]);
|
||||
}
|
||||
|
||||
static int trimpot_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int trimpot_read_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int channel = CR_CHAN(insn->chanspec);
|
||||
|
||||
@ -1009,8 +1009,8 @@ static int trimpot_read_insn(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int cb_pcidas_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -1164,7 +1164,7 @@ static int cb_pcidas_ai_cmdtest(struct comedi_device * dev, struct comedi_subdev
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int cb_pcidas_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
@ -1251,8 +1251,8 @@ static int cb_pcidas_ai_cmd(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int cb_pcidas_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -1364,7 +1364,7 @@ static int cb_pcidas_ao_cmdtest(struct comedi_device * dev, struct comedi_subdev
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int cb_pcidas_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int cb_pcidas_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
@ -1589,7 +1589,7 @@ static irqreturn_t cb_pcidas_interrupt(int irq, void *d)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status)
|
||||
static void handle_ao_interrupt(struct comedi_device *dev, unsigned int status)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->write_subdev;
|
||||
struct comedi_async *async = s->async;
|
||||
@ -1646,7 +1646,7 @@ static void handle_ao_interrupt(struct comedi_device * dev, unsigned int status)
|
||||
}
|
||||
|
||||
/* cancel analog input command */
|
||||
static int cb_pcidas_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int cb_pcidas_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -1683,7 +1683,7 @@ static int cb_pcidas_ao_cancel(struct comedi_device *dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void cb_pcidas_load_counters(struct comedi_device * dev, unsigned int *ns,
|
||||
static void cb_pcidas_load_counters(struct comedi_device *dev, unsigned int *ns,
|
||||
int rounding_flags)
|
||||
{
|
||||
i8253_cascade_ns_to_timer_2div(TIMER_BASE, &(devpriv->divisor1),
|
||||
@ -1696,7 +1696,7 @@ static void cb_pcidas_load_counters(struct comedi_device * dev, unsigned int *ns
|
||||
devpriv->divisor2, 2);
|
||||
}
|
||||
|
||||
static void write_calibration_bitstream(struct comedi_device * dev,
|
||||
static void write_calibration_bitstream(struct comedi_device *dev,
|
||||
unsigned int register_bits, unsigned int bitstream,
|
||||
unsigned int bitstream_length)
|
||||
{
|
||||
@ -1713,7 +1713,7 @@ static void write_calibration_bitstream(struct comedi_device * dev,
|
||||
}
|
||||
}
|
||||
|
||||
static int caldac_8800_write(struct comedi_device * dev, unsigned int address,
|
||||
static int caldac_8800_write(struct comedi_device *dev, unsigned int address,
|
||||
uint8_t value)
|
||||
{
|
||||
static const int num_caldac_channels = 8;
|
||||
@ -1743,7 +1743,7 @@ static int caldac_8800_write(struct comedi_device * dev, unsigned int address,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int trimpot_7376_write(struct comedi_device * dev, uint8_t value)
|
||||
static int trimpot_7376_write(struct comedi_device *dev, uint8_t value)
|
||||
{
|
||||
static const int bitstream_length = 7;
|
||||
unsigned int bitstream = value & 0x7f;
|
||||
@ -1766,7 +1766,7 @@ static int trimpot_7376_write(struct comedi_device * dev, uint8_t value)
|
||||
/* For 1602/16 only
|
||||
* ch 0 : adc gain
|
||||
* ch 1 : adc postgain offset */
|
||||
static int trimpot_8402_write(struct comedi_device * dev, unsigned int channel,
|
||||
static int trimpot_8402_write(struct comedi_device *dev, unsigned int channel,
|
||||
uint8_t value)
|
||||
{
|
||||
static const int bitstream_length = 10;
|
||||
@ -1802,7 +1802,7 @@ static int wait_for_nvram_ready(unsigned long s5933_base_addr)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int nvram_read(struct comedi_device * dev, unsigned int address, uint8_t * data)
|
||||
static int nvram_read(struct comedi_device *dev, unsigned int address, uint8_t *data)
|
||||
{
|
||||
unsigned long iobase = devpriv->s5933_config;
|
||||
|
||||
|
@ -585,7 +585,7 @@ static const struct hw_fifo_info ai_fifo_60xx = {
|
||||
#define MAX_AI_DMA_RING_COUNT (0x80000 / DMA_BUFFER_SIZE)
|
||||
#define MIN_AI_DMA_RING_COUNT (0x10000 / DMA_BUFFER_SIZE)
|
||||
#define AO_DMA_RING_COUNT (0x10000 / DMA_BUFFER_SIZE)
|
||||
static inline unsigned int ai_dma_ring_count(struct pcidas64_board * board)
|
||||
static inline unsigned int ai_dma_ring_count(struct pcidas64_board *board)
|
||||
{
|
||||
if (board->layout == LAYOUT_4020)
|
||||
return MAX_AI_DMA_RING_COUNT;
|
||||
@ -1050,7 +1050,7 @@ static inline struct pcidas64_board *board(const struct comedi_device * dev)
|
||||
return (struct pcidas64_board *) dev->board_ptr;
|
||||
}
|
||||
|
||||
static inline unsigned short se_diff_bit_6xxx(struct comedi_device * dev,
|
||||
static inline unsigned short se_diff_bit_6xxx(struct comedi_device *dev,
|
||||
int use_differential)
|
||||
{
|
||||
if ((board(dev)->layout == LAYOUT_64XX && !use_differential) ||
|
||||
@ -1128,8 +1128,8 @@ static inline struct pcidas64_private *priv(struct comedi_device * dev)
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int detach(struct comedi_device * dev);
|
||||
static int attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_cb_pcidas = {
|
||||
driver_name:"cb_pcidas64",
|
||||
module:THIS_MODULE,
|
||||
@ -1247,7 +1247,7 @@ static unsigned int ai_range_bits_6xxx(const struct comedi_device * dev,
|
||||
return bits;
|
||||
}
|
||||
|
||||
static unsigned int hw_revision(const struct comedi_device * dev,
|
||||
static unsigned int hw_revision(const struct comedi_device *dev,
|
||||
uint16_t hw_status_bits)
|
||||
{
|
||||
if (board(dev)->layout == LAYOUT_4020)
|
||||
@ -1256,7 +1256,7 @@ static unsigned int hw_revision(const struct comedi_device * dev,
|
||||
return (hw_status_bits >> 12) & 0xf;
|
||||
}
|
||||
|
||||
static void set_dac_range_bits(struct comedi_device * dev, volatile uint16_t * bits,
|
||||
static void set_dac_range_bits(struct comedi_device *dev, volatile uint16_t *bits,
|
||||
unsigned int channel, unsigned int range)
|
||||
{
|
||||
unsigned int code = board(dev)->ao_range_code[range];
|
||||
@ -1270,13 +1270,13 @@ static void set_dac_range_bits(struct comedi_device * dev, volatile uint16_t * b
|
||||
*bits |= code << (2 * channel);
|
||||
};
|
||||
|
||||
static inline int ao_cmd_is_supported(const struct pcidas64_board * board)
|
||||
static inline int ao_cmd_is_supported(const struct pcidas64_board *board)
|
||||
{
|
||||
return board->ao_nchan && board->layout != LAYOUT_4020;
|
||||
}
|
||||
|
||||
/* initialize plx9080 chip */
|
||||
static void init_plx9080(struct comedi_device * dev)
|
||||
static void init_plx9080(struct comedi_device *dev)
|
||||
{
|
||||
uint32_t bits;
|
||||
void *plx_iobase = priv(dev)->plx9080_iobase;
|
||||
@ -1366,7 +1366,7 @@ static void init_plx9080(struct comedi_device * dev)
|
||||
|
||||
/* Allocate and initialize the subdevice structures.
|
||||
*/
|
||||
static int setup_subdevices(struct comedi_device * dev)
|
||||
static int setup_subdevices(struct comedi_device *dev)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
void *dio_8255_iobase;
|
||||
@ -1529,14 +1529,14 @@ static int setup_subdevices(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void disable_plx_interrupts(struct comedi_device * dev)
|
||||
static void disable_plx_interrupts(struct comedi_device *dev)
|
||||
{
|
||||
priv(dev)->plx_intcsr_bits = 0;
|
||||
writel(priv(dev)->plx_intcsr_bits,
|
||||
priv(dev)->plx9080_iobase + PLX_INTRCS_REG);
|
||||
}
|
||||
|
||||
static void init_stc_registers(struct comedi_device * dev)
|
||||
static void init_stc_registers(struct comedi_device *dev)
|
||||
{
|
||||
uint16_t bits;
|
||||
unsigned long flags;
|
||||
@ -1578,7 +1578,7 @@ static void init_stc_registers(struct comedi_device * dev)
|
||||
disable_ai_pacing(dev);
|
||||
};
|
||||
|
||||
int alloc_and_init_dma_members(struct comedi_device * dev)
|
||||
int alloc_and_init_dma_members(struct comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1664,7 +1664,7 @@ int alloc_and_init_dma_members(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void warn_external_queue(struct comedi_device * dev)
|
||||
static inline void warn_external_queue(struct comedi_device *dev)
|
||||
{
|
||||
comedi_error(dev,
|
||||
"AO command and AI external channel queue cannot be used simultaneously.");
|
||||
@ -1824,7 +1824,7 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int detach(struct comedi_device * dev)
|
||||
static int detach(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
@ -1884,8 +1884,8 @@ static int detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int bits = 0, n, i;
|
||||
unsigned int channel, range, aref;
|
||||
@ -2021,7 +2021,7 @@ static int ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return n;
|
||||
}
|
||||
|
||||
static int ai_config_calibration_source(struct comedi_device * dev, unsigned int * data)
|
||||
static int ai_config_calibration_source(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
unsigned int source = data[1];
|
||||
int num_calibration_sources;
|
||||
@ -2041,7 +2041,7 @@ static int ai_config_calibration_source(struct comedi_device * dev, unsigned int
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ai_config_block_size(struct comedi_device * dev, unsigned int * data)
|
||||
static int ai_config_block_size(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
int fifo_size;
|
||||
const struct hw_fifo_info *const fifo = board(dev)->ai_fifo;
|
||||
@ -2068,7 +2068,7 @@ static int ai_config_block_size(struct comedi_device * dev, unsigned int * data)
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ai_config_master_clock_4020(struct comedi_device * dev, unsigned int * data)
|
||||
static int ai_config_master_clock_4020(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
unsigned int divisor = data[4];
|
||||
int retval = 0;
|
||||
@ -2094,7 +2094,7 @@ static int ai_config_master_clock_4020(struct comedi_device * dev, unsigned int
|
||||
}
|
||||
|
||||
/* XXX could add support for 60xx series */
|
||||
static int ai_config_master_clock(struct comedi_device * dev, unsigned int * data)
|
||||
static int ai_config_master_clock(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
|
||||
switch (board(dev)->layout) {
|
||||
@ -2109,8 +2109,8 @@ static int ai_config_master_clock(struct comedi_device * dev, unsigned int * dat
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ai_config_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int id = data[0];
|
||||
|
||||
@ -2131,8 +2131,8 @@ static int ai_config_insn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -2316,7 +2316,7 @@ static int ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int use_hw_sample_counter(struct comedi_cmd * cmd)
|
||||
static int use_hw_sample_counter(struct comedi_cmd *cmd)
|
||||
{
|
||||
/* disable for now until I work out a race */
|
||||
return 0;
|
||||
@ -2327,7 +2327,7 @@ static int use_hw_sample_counter(struct comedi_cmd * cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void setup_sample_counters(struct comedi_device * dev, struct comedi_cmd * cmd)
|
||||
static void setup_sample_counters(struct comedi_device *dev, struct comedi_cmd *cmd)
|
||||
{
|
||||
if (cmd->stop_src == TRIG_COUNT) {
|
||||
/* set software count */
|
||||
@ -2344,7 +2344,7 @@ static void setup_sample_counters(struct comedi_device * dev, struct comedi_cmd
|
||||
}
|
||||
}
|
||||
|
||||
static inline unsigned int dma_transfer_size(struct comedi_device * dev)
|
||||
static inline unsigned int dma_transfer_size(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int num_samples;
|
||||
|
||||
@ -2357,7 +2357,7 @@ static inline unsigned int dma_transfer_size(struct comedi_device * dev)
|
||||
return num_samples;
|
||||
}
|
||||
|
||||
static void disable_ai_pacing(struct comedi_device * dev)
|
||||
static void disable_ai_pacing(struct comedi_device *dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -2374,7 +2374,7 @@ static void disable_ai_pacing(struct comedi_device * dev)
|
||||
priv(dev)->main_iobase + ADC_CONTROL0_REG);
|
||||
}
|
||||
|
||||
static void disable_ai_interrupts(struct comedi_device * dev)
|
||||
static void disable_ai_interrupts(struct comedi_device *dev)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -2390,7 +2390,7 @@ static void disable_ai_interrupts(struct comedi_device * dev)
|
||||
DEBUG_PRINT("intr enable bits 0x%x\n", priv(dev)->intr_enable_bits);
|
||||
}
|
||||
|
||||
static void enable_ai_interrupts(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
static void enable_ai_interrupts(struct comedi_device *dev, const struct comedi_cmd *cmd)
|
||||
{
|
||||
uint32_t bits;
|
||||
unsigned long flags;
|
||||
@ -2411,14 +2411,14 @@ static void enable_ai_interrupts(struct comedi_device * dev, const struct comedi
|
||||
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
|
||||
}
|
||||
|
||||
static uint32_t ai_convert_counter_6xxx(const struct comedi_device * dev,
|
||||
const struct comedi_cmd * cmd)
|
||||
static uint32_t ai_convert_counter_6xxx(const struct comedi_device *dev,
|
||||
const struct comedi_cmd *cmd)
|
||||
{
|
||||
/* supposed to load counter with desired divisor minus 3 */
|
||||
return cmd->convert_arg / TIMER_BASE - 3;
|
||||
}
|
||||
|
||||
static uint32_t ai_scan_counter_6xxx(struct comedi_device * dev, struct comedi_cmd * cmd)
|
||||
static uint32_t ai_scan_counter_6xxx(struct comedi_device *dev, struct comedi_cmd *cmd)
|
||||
{
|
||||
uint32_t count;
|
||||
/* figure out how long we need to delay at end of scan */
|
||||
@ -2438,7 +2438,7 @@ static uint32_t ai_scan_counter_6xxx(struct comedi_device * dev, struct comedi_c
|
||||
return count - 3;
|
||||
}
|
||||
|
||||
static uint32_t ai_convert_counter_4020(struct comedi_device * dev, struct comedi_cmd * cmd)
|
||||
static uint32_t ai_convert_counter_4020(struct comedi_device *dev, struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int divisor;
|
||||
|
||||
@ -2459,8 +2459,8 @@ static uint32_t ai_convert_counter_4020(struct comedi_device * dev, struct comed
|
||||
return divisor - 2;
|
||||
}
|
||||
|
||||
static void select_master_clock_4020(struct comedi_device * dev,
|
||||
const struct comedi_cmd * cmd)
|
||||
static void select_master_clock_4020(struct comedi_device *dev,
|
||||
const struct comedi_cmd *cmd)
|
||||
{
|
||||
/* select internal/external master clock */
|
||||
priv(dev)->hw_config_bits &= ~MASTER_CLOCK_4020_MASK;
|
||||
@ -2478,7 +2478,7 @@ static void select_master_clock_4020(struct comedi_device * dev,
|
||||
priv(dev)->main_iobase + HW_CONFIG_REG);
|
||||
}
|
||||
|
||||
static void select_master_clock(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
static void select_master_clock(struct comedi_device *dev, const struct comedi_cmd *cmd)
|
||||
{
|
||||
switch (board(dev)->layout) {
|
||||
case LAYOUT_4020:
|
||||
@ -2489,7 +2489,7 @@ static void select_master_clock(struct comedi_device * dev, const struct comedi_
|
||||
}
|
||||
}
|
||||
|
||||
static inline void dma_start_sync(struct comedi_device * dev, unsigned int channel)
|
||||
static inline void dma_start_sync(struct comedi_device *dev, unsigned int channel)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -2506,7 +2506,7 @@ static inline void dma_start_sync(struct comedi_device * dev, unsigned int chann
|
||||
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
|
||||
}
|
||||
|
||||
static void set_ai_pacing(struct comedi_device * dev, struct comedi_cmd * cmd)
|
||||
static void set_ai_pacing(struct comedi_device *dev, struct comedi_cmd *cmd)
|
||||
{
|
||||
uint32_t convert_counter = 0, scan_counter = 0;
|
||||
|
||||
@ -2537,7 +2537,7 @@ static void set_ai_pacing(struct comedi_device * dev, struct comedi_cmd * cmd)
|
||||
DEBUG_PRINT("scan counter 0x%x\n", scan_counter);
|
||||
}
|
||||
|
||||
static int use_internal_queue_6xxx(const struct comedi_cmd * cmd)
|
||||
static int use_internal_queue_6xxx(const struct comedi_cmd *cmd)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i + 1 < cmd->chanlist_len; i++) {
|
||||
@ -2553,7 +2553,7 @@ static int use_internal_queue_6xxx(const struct comedi_cmd * cmd)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int setup_channel_queue(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
static int setup_channel_queue(struct comedi_device *dev, const struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned short bits;
|
||||
int i;
|
||||
@ -2655,7 +2655,7 @@ static int setup_channel_queue(struct comedi_device * dev, const struct comedi_c
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void load_first_dma_descriptor(struct comedi_device * dev,
|
||||
static inline void load_first_dma_descriptor(struct comedi_device *dev,
|
||||
unsigned int dma_channel, unsigned int descriptor_bits)
|
||||
{
|
||||
/* The transfer size, pci address, and local address registers
|
||||
@ -2682,7 +2682,7 @@ static inline void load_first_dma_descriptor(struct comedi_device * dev,
|
||||
}
|
||||
}
|
||||
|
||||
static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
@ -2800,7 +2800,7 @@ static int ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
}
|
||||
|
||||
/* read num_samples from 16 bit wide ai fifo */
|
||||
static void pio_drain_ai_fifo_16(struct comedi_device * dev)
|
||||
static void pio_drain_ai_fifo_16(struct comedi_device *dev)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
struct comedi_async *async = s->async;
|
||||
@ -2867,7 +2867,7 @@ static void pio_drain_ai_fifo_16(struct comedi_device * dev)
|
||||
* dma transfers (it only supports the use of pio for draining the last remaining
|
||||
* points from the fifo when a data aquisition operation has completed).
|
||||
*/
|
||||
static void pio_drain_ai_fifo_32(struct comedi_device * dev)
|
||||
static void pio_drain_ai_fifo_32(struct comedi_device *dev)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
struct comedi_async *async = s->async;
|
||||
@ -2901,7 +2901,7 @@ static void pio_drain_ai_fifo_32(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
/* empty fifo */
|
||||
static void pio_drain_ai_fifo(struct comedi_device * dev)
|
||||
static void pio_drain_ai_fifo(struct comedi_device *dev)
|
||||
{
|
||||
if (board(dev)->layout == LAYOUT_4020) {
|
||||
pio_drain_ai_fifo_32(dev);
|
||||
@ -2909,7 +2909,7 @@ static void pio_drain_ai_fifo(struct comedi_device * dev)
|
||||
pio_drain_ai_fifo_16(dev);
|
||||
}
|
||||
|
||||
static void drain_dma_buffers(struct comedi_device * dev, unsigned int channel)
|
||||
static void drain_dma_buffers(struct comedi_device *dev, unsigned int channel)
|
||||
{
|
||||
struct comedi_async *async = dev->read_subdev->async;
|
||||
uint32_t next_transfer_addr;
|
||||
@ -2955,7 +2955,7 @@ static void drain_dma_buffers(struct comedi_device * dev, unsigned int channel)
|
||||
* unused buffer) */
|
||||
}
|
||||
|
||||
void handle_ai_interrupt(struct comedi_device * dev, unsigned short status,
|
||||
void handle_ai_interrupt(struct comedi_device *dev, unsigned short status,
|
||||
unsigned int plx_status)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
@ -3009,7 +3009,7 @@ void handle_ai_interrupt(struct comedi_device * dev, unsigned short status,
|
||||
cfc_handle_events(dev, s);
|
||||
}
|
||||
|
||||
static inline unsigned int prev_ao_dma_index(struct comedi_device * dev)
|
||||
static inline unsigned int prev_ao_dma_index(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int buffer_index;
|
||||
|
||||
@ -3020,7 +3020,7 @@ static inline unsigned int prev_ao_dma_index(struct comedi_device * dev)
|
||||
return buffer_index;
|
||||
}
|
||||
|
||||
static int last_ao_dma_load_completed(struct comedi_device * dev)
|
||||
static int last_ao_dma_load_completed(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int buffer_index;
|
||||
unsigned int transfer_address;
|
||||
@ -3039,7 +3039,7 @@ static int last_ao_dma_load_completed(struct comedi_device * dev)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ao_stopped_by_error(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
static int ao_stopped_by_error(struct comedi_device *dev, const struct comedi_cmd *cmd)
|
||||
{
|
||||
if (cmd->stop_src == TRIG_NONE)
|
||||
return 1;
|
||||
@ -3052,7 +3052,7 @@ static int ao_stopped_by_error(struct comedi_device * dev, const struct comedi_c
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int ao_dma_needs_restart(struct comedi_device * dev,
|
||||
static inline int ao_dma_needs_restart(struct comedi_device *dev,
|
||||
unsigned short dma_status)
|
||||
{
|
||||
if ((dma_status & PLX_DMA_DONE_BIT) == 0 ||
|
||||
@ -3064,7 +3064,7 @@ static inline int ao_dma_needs_restart(struct comedi_device * dev,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void restart_ao_dma(struct comedi_device * dev)
|
||||
static void restart_ao_dma(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int dma_desc_bits;
|
||||
|
||||
@ -3077,7 +3077,7 @@ static void restart_ao_dma(struct comedi_device * dev)
|
||||
dma_start_sync(dev, 0);
|
||||
}
|
||||
|
||||
static void handle_ao_interrupt(struct comedi_device * dev, unsigned short status,
|
||||
static void handle_ao_interrupt(struct comedi_device *dev, unsigned short status,
|
||||
unsigned int plx_status)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->write_subdev;
|
||||
@ -3165,7 +3165,7 @@ static irqreturn_t handle_interrupt(int irq, void *d)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
void abort_dma(struct comedi_device * dev, unsigned int channel)
|
||||
void abort_dma(struct comedi_device *dev, unsigned int channel)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -3177,7 +3177,7 @@ void abort_dma(struct comedi_device * dev, unsigned int channel)
|
||||
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
|
||||
}
|
||||
|
||||
static int ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -3197,8 +3197,8 @@ static int ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
int range = CR_RANGE(insn->chanspec);
|
||||
@ -3227,15 +3227,15 @@ static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ao_readback_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ao_readback_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = priv(dev)->ao_value[CR_CHAN(insn->chanspec)];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void set_dac_control0_reg(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
static void set_dac_control0_reg(struct comedi_device *dev, const struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int bits = DAC_ENABLE_BIT | WAVEFORM_GATE_LEVEL_BIT |
|
||||
WAVEFORM_GATE_ENABLE_BIT | WAVEFORM_GATE_SELECT_BIT;
|
||||
@ -3255,7 +3255,7 @@ static void set_dac_control0_reg(struct comedi_device * dev, const struct comedi
|
||||
writew(bits, priv(dev)->main_iobase + DAC_CONTROL0_REG);
|
||||
}
|
||||
|
||||
static void set_dac_control1_reg(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
static void set_dac_control1_reg(struct comedi_device *dev, const struct comedi_cmd *cmd)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -3272,7 +3272,7 @@ static void set_dac_control1_reg(struct comedi_device * dev, const struct comedi
|
||||
priv(dev)->main_iobase + DAC_CONTROL1_REG);
|
||||
}
|
||||
|
||||
static void set_dac_select_reg(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
static void set_dac_select_reg(struct comedi_device *dev, const struct comedi_cmd *cmd)
|
||||
{
|
||||
uint16_t bits;
|
||||
unsigned int first_channel, last_channel;
|
||||
@ -3287,7 +3287,7 @@ static void set_dac_select_reg(struct comedi_device * dev, const struct comedi_c
|
||||
writew(bits, priv(dev)->main_iobase + DAC_SELECT_REG);
|
||||
}
|
||||
|
||||
static void set_dac_interval_regs(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
static void set_dac_interval_regs(struct comedi_device *dev, const struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int divisor;
|
||||
|
||||
@ -3305,8 +3305,8 @@ static void set_dac_interval_regs(struct comedi_device * dev, const struct comed
|
||||
priv(dev)->main_iobase + DAC_SAMPLE_INTERVAL_UPPER_REG);
|
||||
}
|
||||
|
||||
static unsigned int load_ao_dma_buffer(struct comedi_device * dev,
|
||||
const struct comedi_cmd * cmd)
|
||||
static unsigned int load_ao_dma_buffer(struct comedi_device *dev,
|
||||
const struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int num_bytes, buffer_index, prev_buffer_index;
|
||||
unsigned int next_bits;
|
||||
@ -3349,7 +3349,7 @@ static unsigned int load_ao_dma_buffer(struct comedi_device * dev,
|
||||
return num_bytes;
|
||||
}
|
||||
|
||||
static void load_ao_dma(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
static void load_ao_dma(struct comedi_device *dev, const struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int num_bytes;
|
||||
unsigned int next_transfer_addr;
|
||||
@ -3371,7 +3371,7 @@ static void load_ao_dma(struct comedi_device * dev, const struct comedi_cmd * cm
|
||||
} while (num_bytes >= DMA_BUFFER_SIZE);
|
||||
}
|
||||
|
||||
static int prep_ao_dma(struct comedi_device * dev, const struct comedi_cmd * cmd)
|
||||
static int prep_ao_dma(struct comedi_device *dev, const struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int num_bytes;
|
||||
int i;
|
||||
@ -3405,7 +3405,7 @@ static int prep_ao_dma(struct comedi_device * dev, const struct comedi_cmd * cmd
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline int external_ai_queue_in_use(struct comedi_device * dev)
|
||||
static inline int external_ai_queue_in_use(struct comedi_device *dev)
|
||||
{
|
||||
if (dev->read_subdev->busy)
|
||||
return 0;
|
||||
@ -3416,7 +3416,7 @@ static inline int external_ai_queue_in_use(struct comedi_device * dev)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
|
||||
@ -3441,7 +3441,7 @@ static int ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int ao_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int trig_num)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
@ -3464,8 +3464,8 @@ static int ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -3580,7 +3580,7 @@ static int ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int ao_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
writew(0x0, priv(dev)->main_iobase + DAC_CONTROL0_REG);
|
||||
abort_dma(dev, 0);
|
||||
@ -3608,8 +3608,8 @@ static int dio_callback_4020(int dir, int port, int data, unsigned long iobase)
|
||||
}
|
||||
}
|
||||
|
||||
static int di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int bits;
|
||||
|
||||
@ -3621,8 +3621,8 @@ static int di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int do_wbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] &= 0xf;
|
||||
/* zero bits we are going to change */
|
||||
@ -3637,8 +3637,8 @@ static int do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int dio_60xx_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dio_60xx_config_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int mask;
|
||||
|
||||
@ -3664,8 +3664,8 @@ static int dio_60xx_config_insn(struct comedi_device * dev, struct comedi_subdev
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dio_60xx_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dio_60xx_wbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (data[0]) {
|
||||
s->state &= ~data[0];
|
||||
@ -3679,7 +3679,7 @@ static int dio_60xx_wbits(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 2;
|
||||
}
|
||||
|
||||
static void caldac_write(struct comedi_device * dev, unsigned int channel,
|
||||
static void caldac_write(struct comedi_device *dev, unsigned int channel,
|
||||
unsigned int value)
|
||||
{
|
||||
priv(dev)->caldac_state[channel] = value;
|
||||
@ -3697,8 +3697,8 @@ static void caldac_write(struct comedi_device * dev, unsigned int channel,
|
||||
}
|
||||
}
|
||||
|
||||
static int calib_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int calib_write_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int channel = CR_CHAN(insn->chanspec);
|
||||
|
||||
@ -3712,8 +3712,8 @@ static int calib_write_insn(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int calib_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int calib_read_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int channel = CR_CHAN(insn->chanspec);
|
||||
|
||||
@ -3722,7 +3722,7 @@ static int calib_read_insn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void ad8402_write(struct comedi_device * dev, unsigned int channel,
|
||||
static void ad8402_write(struct comedi_device *dev, unsigned int channel,
|
||||
unsigned int value)
|
||||
{
|
||||
static const int bitstream_length = 10;
|
||||
@ -3753,8 +3753,8 @@ static void ad8402_write(struct comedi_device * dev, unsigned int channel,
|
||||
}
|
||||
|
||||
/* for pci-das6402/16, channel 0 is analog input gain and channel 1 is offset */
|
||||
static int ad8402_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ad8402_write_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int channel = CR_CHAN(insn->chanspec);
|
||||
|
||||
@ -3770,8 +3770,8 @@ static int ad8402_write_insn(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ad8402_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ad8402_read_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int channel = CR_CHAN(insn->chanspec);
|
||||
|
||||
@ -3780,7 +3780,7 @@ static int ad8402_read_insn(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 1;
|
||||
}
|
||||
|
||||
static uint16_t read_eeprom(struct comedi_device * dev, uint8_t address)
|
||||
static uint16_t read_eeprom(struct comedi_device *dev, uint8_t address)
|
||||
{
|
||||
static const int bitstream_length = 11;
|
||||
static const int read_command = 0x6;
|
||||
@ -3842,8 +3842,8 @@ static uint16_t read_eeprom(struct comedi_device * dev, uint8_t address)
|
||||
return value;
|
||||
}
|
||||
|
||||
static int eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int eeprom_read_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = read_eeprom(dev, CR_CHAN(insn->chanspec));
|
||||
|
||||
@ -3928,7 +3928,7 @@ static unsigned int get_ao_divisor(unsigned int ns, unsigned int flags)
|
||||
}
|
||||
|
||||
/* adjusts the size of hardware fifo (which determines block size for dma xfers) */
|
||||
static int set_ai_fifo_size(struct comedi_device * dev, unsigned int num_samples)
|
||||
static int set_ai_fifo_size(struct comedi_device *dev, unsigned int num_samples)
|
||||
{
|
||||
unsigned int num_fifo_entries;
|
||||
int retval;
|
||||
@ -3949,14 +3949,14 @@ static int set_ai_fifo_size(struct comedi_device * dev, unsigned int num_samples
|
||||
}
|
||||
|
||||
/* query length of fifo */
|
||||
static unsigned int ai_fifo_size(struct comedi_device * dev)
|
||||
static unsigned int ai_fifo_size(struct comedi_device *dev)
|
||||
{
|
||||
return priv(dev)->ai_fifo_segment_length *
|
||||
board(dev)->ai_fifo->num_segments *
|
||||
board(dev)->ai_fifo->sample_packing_ratio;
|
||||
}
|
||||
|
||||
static int set_ai_fifo_segment_length(struct comedi_device * dev,
|
||||
static int set_ai_fifo_segment_length(struct comedi_device *dev,
|
||||
unsigned int num_entries)
|
||||
{
|
||||
static const int increment_size = 0x100;
|
||||
@ -4007,7 +4007,7 @@ static int set_ai_fifo_segment_length(struct comedi_device * dev,
|
||||
* address 7 == dac channel 1 fine offset
|
||||
*/
|
||||
|
||||
static int caldac_8800_write(struct comedi_device * dev, unsigned int address,
|
||||
static int caldac_8800_write(struct comedi_device *dev, unsigned int address,
|
||||
uint8_t value)
|
||||
{
|
||||
static const int num_caldac_channels = 8;
|
||||
@ -4039,7 +4039,7 @@ static int caldac_8800_write(struct comedi_device * dev, unsigned int address,
|
||||
}
|
||||
|
||||
/* 4020 caldacs */
|
||||
static int caldac_i2c_write(struct comedi_device * dev, unsigned int caldac_channel,
|
||||
static int caldac_i2c_write(struct comedi_device *dev, unsigned int caldac_channel,
|
||||
unsigned int value)
|
||||
{
|
||||
uint8_t serial_bytes[3];
|
||||
@ -4104,7 +4104,7 @@ static const int i2c_high_comedi_udelay = 1000;
|
||||
static const int i2c_low_comedi_udelay = 10;
|
||||
|
||||
/* set i2c data line high or low */
|
||||
static void i2c_set_sda(struct comedi_device * dev, int state)
|
||||
static void i2c_set_sda(struct comedi_device *dev, int state)
|
||||
{
|
||||
static const int data_bit = CTL_EE_W;
|
||||
void *plx_control_addr = priv(dev)->plx9080_iobase + PLX_CONTROL_REG;
|
||||
@ -4123,7 +4123,7 @@ static void i2c_set_sda(struct comedi_device * dev, int state)
|
||||
}
|
||||
|
||||
/* set i2c clock line high or low */
|
||||
static void i2c_set_scl(struct comedi_device * dev, int state)
|
||||
static void i2c_set_scl(struct comedi_device *dev, int state)
|
||||
{
|
||||
static const int clock_bit = CTL_USERO;
|
||||
void *plx_control_addr = priv(dev)->plx9080_iobase + PLX_CONTROL_REG;
|
||||
@ -4141,7 +4141,7 @@ static void i2c_set_scl(struct comedi_device * dev, int state)
|
||||
}
|
||||
}
|
||||
|
||||
static void i2c_write_byte(struct comedi_device * dev, uint8_t byte)
|
||||
static void i2c_write_byte(struct comedi_device *dev, uint8_t byte)
|
||||
{
|
||||
uint8_t bit;
|
||||
unsigned int num_bits = 8;
|
||||
@ -4159,7 +4159,7 @@ static void i2c_write_byte(struct comedi_device * dev, uint8_t byte)
|
||||
}
|
||||
|
||||
/* we can't really read the lines, so fake it */
|
||||
static int i2c_read_ack(struct comedi_device * dev)
|
||||
static int i2c_read_ack(struct comedi_device *dev)
|
||||
{
|
||||
i2c_set_scl(dev, 0);
|
||||
i2c_set_sda(dev, 1);
|
||||
@ -4169,7 +4169,7 @@ static int i2c_read_ack(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
/* send start bit */
|
||||
static void i2c_start(struct comedi_device * dev)
|
||||
static void i2c_start(struct comedi_device *dev)
|
||||
{
|
||||
i2c_set_scl(dev, 1);
|
||||
i2c_set_sda(dev, 1);
|
||||
@ -4177,7 +4177,7 @@ static void i2c_start(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
/* send stop bit */
|
||||
static void i2c_stop(struct comedi_device * dev)
|
||||
static void i2c_stop(struct comedi_device *dev)
|
||||
{
|
||||
i2c_set_scl(dev, 0);
|
||||
i2c_set_sda(dev, 0);
|
||||
@ -4185,8 +4185,8 @@ static void i2c_stop(struct comedi_device * dev)
|
||||
i2c_set_sda(dev, 1);
|
||||
}
|
||||
|
||||
static void i2c_write(struct comedi_device * dev, unsigned int address,
|
||||
const uint8_t * data, unsigned int length)
|
||||
static void i2c_write(struct comedi_device *dev, unsigned int address,
|
||||
const uint8_t *data, unsigned int length)
|
||||
{
|
||||
unsigned int i;
|
||||
uint8_t bitstream;
|
||||
|
@ -239,22 +239,22 @@ struct cb_pcidda_private {
|
||||
*/
|
||||
#define devpriv ((struct cb_pcidda_private *)dev->private)
|
||||
|
||||
static int cb_pcidda_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int cb_pcidda_detach(struct comedi_device * dev);
|
||||
static int cb_pcidda_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int cb_pcidda_detach(struct comedi_device *dev);
|
||||
/* static int cb_pcidda_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data); */
|
||||
static int cb_pcidda_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int cb_pcidda_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
/* static int cb_pcidda_ai_cmd(struct comedi_device *dev, struct *comedi_subdevice *s);*/
|
||||
/* static int cb_pcidda_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s, struct comedi_cmd *cmd); */
|
||||
/* static int cb_pcidda_ns_to_timer(unsigned int *ns,int *round); */
|
||||
|
||||
static unsigned int cb_pcidda_serial_in(struct comedi_device * dev);
|
||||
static void cb_pcidda_serial_out(struct comedi_device * dev, unsigned int value,
|
||||
static unsigned int cb_pcidda_serial_in(struct comedi_device *dev);
|
||||
static void cb_pcidda_serial_out(struct comedi_device *dev, unsigned int value,
|
||||
unsigned int num_bits);
|
||||
static unsigned int cb_pcidda_read_eeprom(struct comedi_device * dev,
|
||||
static unsigned int cb_pcidda_read_eeprom(struct comedi_device *dev,
|
||||
unsigned int address);
|
||||
static void cb_pcidda_calibrate(struct comedi_device * dev, unsigned int channel,
|
||||
static void cb_pcidda_calibrate(struct comedi_device *dev, unsigned int channel,
|
||||
unsigned int range);
|
||||
|
||||
/*
|
||||
@ -274,7 +274,7 @@ static struct comedi_driver driver_cb_pcidda = {
|
||||
* Attach is called by the Comedi core to configure the driver
|
||||
* for a particular board.
|
||||
*/
|
||||
static int cb_pcidda_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int cb_pcidda_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
struct pci_dev *pcidev;
|
||||
@ -395,7 +395,7 @@ static int cb_pcidda_attach(struct comedi_device * dev, struct comedi_devconfig
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int cb_pcidda_detach(struct comedi_device * dev)
|
||||
static int cb_pcidda_detach(struct comedi_device *dev)
|
||||
{
|
||||
/*
|
||||
* Deallocate the I/O ports.
|
||||
@ -423,7 +423,7 @@ static int cb_pcidda_detach(struct comedi_device * dev)
|
||||
* I will program this later... ;-)
|
||||
*/
|
||||
#if 0
|
||||
static int cb_pcidda_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int cb_pcidda_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
printk("cb_pcidda_ai_cmd\n");
|
||||
printk("subdev: %d\n", cmd->subdev);
|
||||
@ -442,8 +442,8 @@ static int cb_pcidda_ai_cmd(struct comedi_device * dev, struct comedi_subdevice
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
static int cb_pcidda_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int cb_pcidda_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -608,8 +608,8 @@ static int cb_pcidda_ns_to_timer(unsigned int *ns, int round)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int cb_pcidda_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int cb_pcidda_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int command;
|
||||
unsigned int channel, range;
|
||||
@ -658,7 +658,7 @@ static int cb_pcidda_ao_winsn(struct comedi_device * dev, struct comedi_subdevic
|
||||
}
|
||||
|
||||
/* lowlevel read from eeprom */
|
||||
static unsigned int cb_pcidda_serial_in(struct comedi_device * dev)
|
||||
static unsigned int cb_pcidda_serial_in(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int value = 0;
|
||||
int i;
|
||||
@ -675,7 +675,7 @@ static unsigned int cb_pcidda_serial_in(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
/* lowlevel write to eeprom/dac */
|
||||
static void cb_pcidda_serial_out(struct comedi_device * dev, unsigned int value,
|
||||
static void cb_pcidda_serial_out(struct comedi_device *dev, unsigned int value,
|
||||
unsigned int num_bits)
|
||||
{
|
||||
int i;
|
||||
@ -691,7 +691,7 @@ static void cb_pcidda_serial_out(struct comedi_device * dev, unsigned int value,
|
||||
}
|
||||
|
||||
/* reads a 16 bit value from board's eeprom */
|
||||
static unsigned int cb_pcidda_read_eeprom(struct comedi_device * dev,
|
||||
static unsigned int cb_pcidda_read_eeprom(struct comedi_device *dev,
|
||||
unsigned int address)
|
||||
{
|
||||
unsigned int i;
|
||||
@ -725,7 +725,7 @@ static unsigned int cb_pcidda_read_eeprom(struct comedi_device * dev,
|
||||
}
|
||||
|
||||
/* writes to 8 bit calibration dacs */
|
||||
static void cb_pcidda_write_caldac(struct comedi_device * dev, unsigned int caldac,
|
||||
static void cb_pcidda_write_caldac(struct comedi_device *dev, unsigned int caldac,
|
||||
unsigned int channel, unsigned int value)
|
||||
{
|
||||
unsigned int cal2_bits;
|
||||
@ -812,7 +812,7 @@ static unsigned int eeprom_fine_byte(unsigned int word)
|
||||
}
|
||||
|
||||
/* set caldacs to eeprom values for given channel and range */
|
||||
static void cb_pcidda_calibrate(struct comedi_device * dev, unsigned int channel,
|
||||
static void cb_pcidda_calibrate(struct comedi_device *dev, unsigned int channel,
|
||||
unsigned int range)
|
||||
{
|
||||
unsigned int coarse_offset, fine_offset, coarse_gain, fine_gain;
|
||||
|
@ -127,8 +127,8 @@ struct pcidio_private {
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int pcidio_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pcidio_detach(struct comedi_device * dev);
|
||||
static int pcidio_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pcidio_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_cb_pcidio = {
|
||||
driver_name:"cb_pcidio",
|
||||
module:THIS_MODULE,
|
||||
@ -173,7 +173,7 @@ static struct comedi_driver driver_cb_pcidio = {
|
||||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int pcidio_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pcidio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct pci_dev *pcidev = NULL;
|
||||
int index;
|
||||
@ -274,7 +274,7 @@ static int pcidio_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int pcidio_detach(struct comedi_device * dev)
|
||||
static int pcidio_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: cb_pcidio: remove\n", dev->minor);
|
||||
if (devpriv) {
|
||||
|
@ -175,8 +175,8 @@ struct cb_pcimdas_private {
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int cb_pcimdas_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int cb_pcimdas_detach(struct comedi_device * dev);
|
||||
static int cb_pcimdas_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int cb_pcimdas_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_cb_pcimdas = {
|
||||
driver_name:"cb_pcimdas",
|
||||
module:THIS_MODULE,
|
||||
@ -184,12 +184,12 @@ static struct comedi_driver driver_cb_pcimdas = {
|
||||
detach:cb_pcimdas_detach,
|
||||
};
|
||||
|
||||
static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int cb_pcimdas_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int cb_pcimdas_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int cb_pcimdas_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int cb_pcimdas_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
/*
|
||||
* Attach is called by the Comedi core to configure the driver
|
||||
@ -197,7 +197,7 @@ static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, struct comedi_subdevi
|
||||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int cb_pcimdas_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int cb_pcimdas_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
struct pci_dev *pcidev;
|
||||
@ -342,7 +342,7 @@ static int cb_pcimdas_attach(struct comedi_device * dev, struct comedi_devconfig
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int cb_pcimdas_detach(struct comedi_device * dev)
|
||||
static int cb_pcimdas_detach(struct comedi_device *dev)
|
||||
{
|
||||
#ifdef CBPCIMDAS_DEBUG
|
||||
if (devpriv) {
|
||||
@ -372,8 +372,8 @@ static int cb_pcimdas_detach(struct comedi_device * dev)
|
||||
* "instructions" read/write data in "one-shot" or "software-triggered"
|
||||
* mode.
|
||||
*/
|
||||
static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int cb_pcimdas_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, i;
|
||||
unsigned int d;
|
||||
@ -437,8 +437,8 @@ static int cb_pcimdas_ai_rinsn(struct comedi_device * dev, struct comedi_subdevi
|
||||
return n;
|
||||
}
|
||||
|
||||
static int cb_pcimdas_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int cb_pcimdas_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -465,8 +465,8 @@ static int cb_pcimdas_ao_winsn(struct comedi_device * dev, struct comedi_subdevi
|
||||
|
||||
/* AO subdevices should have a read insn as well as a write insn.
|
||||
* Usually this means copying a value stored in devpriv. */
|
||||
static int cb_pcimdas_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int cb_pcimdas_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
@ -181,8 +181,8 @@ struct board_private_struct {
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int detach(struct comedi_device * dev);
|
||||
static int attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int detach(struct comedi_device *dev);
|
||||
static struct comedi_driver cb_pcimdda_driver = {
|
||||
driver_name:"cb_pcimdda",
|
||||
module:THIS_MODULE,
|
||||
@ -197,10 +197,10 @@ MODULE_DESCRIPTION("Comedi low-level driver for the Computerboards PCIM-DDA "
|
||||
MODULE_LICENSE("GPL");
|
||||
COMEDI_PCI_INITCLEANUP_NOMODULE(cb_pcimdda_driver, pci_table);
|
||||
|
||||
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
HELPER FUNCTION DECLARATIONS
|
||||
@ -226,7 +226,7 @@ static inline unsigned int figure_out_maxdata(int bits)
|
||||
*
|
||||
* Otherwise, returns a -errno on error
|
||||
*/
|
||||
static int probe(struct comedi_device * dev, const struct comedi_devconfig * it);
|
||||
static int probe(struct comedi_device *dev, const struct comedi_devconfig *it);
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
FUNCTION DEFINITIONS
|
||||
@ -238,7 +238,7 @@ static int probe(struct comedi_device * dev, const struct comedi_devconfig * it)
|
||||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int err;
|
||||
@ -326,7 +326,7 @@ static int attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int detach(struct comedi_device * dev)
|
||||
static int detach(struct comedi_device *dev)
|
||||
{
|
||||
if (devpriv) {
|
||||
|
||||
@ -352,8 +352,8 @@ static int detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -391,8 +391,8 @@ static int ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
all AO channels update simultaneously. This is useful for some control
|
||||
applications, I would imagine.
|
||||
*/
|
||||
static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -425,7 +425,7 @@ static int ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
*
|
||||
* Otherwise, returns a -errno on error
|
||||
*/
|
||||
static int probe(struct comedi_device * dev, const struct comedi_devconfig * it)
|
||||
static int probe(struct comedi_device *dev, const struct comedi_devconfig *it)
|
||||
{
|
||||
struct pci_dev *pcidev;
|
||||
int index;
|
||||
|
@ -145,11 +145,11 @@ static inline RTIME nano2count(long long ns)
|
||||
* task period because analog input tends to be slow. */
|
||||
#define SPEED_LIMIT 100000 /* in nanoseconds */
|
||||
|
||||
static int timer_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int timer_detach(struct comedi_device * dev);
|
||||
static int timer_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int timer_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int timer_detach(struct comedi_device *dev);
|
||||
static int timer_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int trig_num);
|
||||
static int timer_start_cmd(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int timer_start_cmd(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
|
||||
static struct comedi_driver driver_timer = {
|
||||
module:THIS_MODULE,
|
||||
@ -168,7 +168,7 @@ struct timer_private {
|
||||
RT_TASK *scan_task; /* rt task that controls conversion timing in a scan */
|
||||
/* io_function can point to either an input or output function
|
||||
* depending on what kind of subdevice we are emulating for */
|
||||
int (*io_function) (struct comedi_device * dev, struct comedi_cmd * cmd,
|
||||
int (*io_function) (struct comedi_device *dev, struct comedi_cmd *cmd,
|
||||
unsigned int index);
|
||||
/*
|
||||
* RTIME has units of 1 = 838 nanoseconds time at which first scan
|
||||
@ -187,7 +187,7 @@ struct timer_private {
|
||||
};
|
||||
#define devpriv ((struct timer_private *)dev->private)
|
||||
|
||||
static int timer_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int timer_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
devpriv->stop = 1;
|
||||
|
||||
@ -195,7 +195,7 @@ static int timer_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
}
|
||||
|
||||
/* checks for scan timing error */
|
||||
inline static int check_scan_timing(struct comedi_device * dev,
|
||||
inline static int check_scan_timing(struct comedi_device *dev,
|
||||
unsigned long long scan)
|
||||
{
|
||||
RTIME now, timing_error;
|
||||
@ -212,7 +212,7 @@ inline static int check_scan_timing(struct comedi_device * dev,
|
||||
}
|
||||
|
||||
/* checks for conversion timing error */
|
||||
inline static int check_conversion_timing(struct comedi_device * dev,
|
||||
inline static int check_conversion_timing(struct comedi_device *dev,
|
||||
RTIME scan_start, unsigned int conversion)
|
||||
{
|
||||
RTIME now, timing_error;
|
||||
@ -231,7 +231,7 @@ inline static int check_conversion_timing(struct comedi_device * dev,
|
||||
}
|
||||
|
||||
/* devpriv->io_function for an input subdevice */
|
||||
static int timer_data_read(struct comedi_device * dev, struct comedi_cmd * cmd,
|
||||
static int timer_data_read(struct comedi_device *dev, struct comedi_cmd *cmd,
|
||||
unsigned int index)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
@ -256,7 +256,7 @@ static int timer_data_read(struct comedi_device * dev, struct comedi_cmd * cmd,
|
||||
}
|
||||
|
||||
/* devpriv->io_function for an output subdevice */
|
||||
static int timer_data_write(struct comedi_device * dev, struct comedi_cmd * cmd,
|
||||
static int timer_data_write(struct comedi_device *dev, struct comedi_cmd *cmd,
|
||||
unsigned int index)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->write_subdev;
|
||||
@ -291,7 +291,7 @@ static int timer_data_write(struct comedi_device * dev, struct comedi_cmd * cmd,
|
||||
}
|
||||
|
||||
/* devpriv->io_function for DIO subdevices */
|
||||
static int timer_dio_read(struct comedi_device * dev, struct comedi_cmd * cmd,
|
||||
static int timer_dio_read(struct comedi_device *dev, struct comedi_cmd *cmd,
|
||||
unsigned int index)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
@ -421,8 +421,8 @@ static void timer_task_func(comedi_rt_task_context_t d)
|
||||
}
|
||||
}
|
||||
|
||||
static int timer_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int timer_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
struct comedi_insn xinsn = *insn;
|
||||
|
||||
@ -432,7 +432,7 @@ static int timer_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return comedi_do_insn(devpriv->device, &xinsn);
|
||||
}
|
||||
|
||||
static int cmdtest_helper(struct comedi_cmd * cmd,
|
||||
static int cmdtest_helper(struct comedi_cmd *cmd,
|
||||
unsigned int start_src,
|
||||
unsigned int scan_begin_src,
|
||||
unsigned int convert_src,
|
||||
@ -469,8 +469,8 @@ static int cmdtest_helper(struct comedi_cmd * cmd,
|
||||
return err;
|
||||
}
|
||||
|
||||
static int timer_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int timer_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int start_src = 0;
|
||||
@ -541,7 +541,7 @@ static int timer_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int timer_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int timer_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
int ret;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
@ -592,7 +592,7 @@ static int timer_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int timer_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int timer_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int trig_num)
|
||||
{
|
||||
if (trig_num != 0)
|
||||
@ -603,7 +603,7 @@ static int timer_inttrig(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
return timer_start_cmd(dev, s);
|
||||
}
|
||||
|
||||
static int timer_start_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int timer_start_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
@ -632,7 +632,7 @@ static int timer_start_cmd(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int timer_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int timer_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int ret;
|
||||
struct comedi_subdevice *s, *emul_s;
|
||||
@ -731,7 +731,7 @@ static int timer_attach(struct comedi_device * dev, struct comedi_devconfig * it
|
||||
}
|
||||
|
||||
/* free allocated resources */
|
||||
static int timer_detach(struct comedi_device * dev)
|
||||
static int timer_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: timer: remove\n", dev->minor);
|
||||
|
||||
|
@ -75,8 +75,8 @@ struct contec_private {
|
||||
|
||||
#define devpriv ((struct contec_private *)dev->private)
|
||||
|
||||
static int contec_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int contec_detach(struct comedi_device * dev);
|
||||
static int contec_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int contec_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_contec = {
|
||||
driver_name:"contec_pci_dio",
|
||||
module:THIS_MODULE,
|
||||
@ -85,19 +85,19 @@ static struct comedi_driver driver_contec = {
|
||||
};
|
||||
|
||||
/* Classic digital IO */
|
||||
static int contec_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int contec_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int contec_di_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int contec_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
#if 0
|
||||
static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd);
|
||||
static int contec_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd);
|
||||
|
||||
static int contec_ns_to_timer(unsigned int *ns, int round);
|
||||
#endif
|
||||
|
||||
static int contec_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int contec_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct pci_dev *pcidev;
|
||||
struct comedi_subdevice *s;
|
||||
@ -164,7 +164,7 @@ static int contec_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int contec_detach(struct comedi_device * dev)
|
||||
static int contec_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: contec: remove\n", dev->minor);
|
||||
|
||||
@ -179,8 +179,8 @@ static int contec_detach(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
#if 0
|
||||
static int contec_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int contec_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
printk("contec_cmdtest called\n");
|
||||
return 0;
|
||||
@ -192,8 +192,8 @@ static int contec_ns_to_timer(unsigned int *ns, int round)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int contec_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int contec_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
printk("contec_do_insn_bits called\n");
|
||||
@ -212,8 +212,8 @@ static int contec_do_insn_bits(struct comedi_device * dev, struct comedi_subdevi
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int contec_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int contec_di_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
rt_printk("contec_di_insn_bits called\n");
|
||||
|
@ -296,8 +296,8 @@ struct daqboard2000_hw {
|
||||
#define DAQBOARD2000_PosRefDacSelect 0x0100
|
||||
#define DAQBOARD2000_NegRefDacSelect 0x0000
|
||||
|
||||
static int daqboard2000_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int daqboard2000_detach(struct comedi_device * dev);
|
||||
static int daqboard2000_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int daqboard2000_detach(struct comedi_device *dev);
|
||||
|
||||
static struct comedi_driver driver_daqboard2000 = {
|
||||
driver_name:"daqboard2000",
|
||||
@ -338,7 +338,7 @@ struct daqboard2000_private {
|
||||
|
||||
#define devpriv ((struct daqboard2000_private *)dev->private)
|
||||
|
||||
static void writeAcqScanListEntry(struct comedi_device * dev, u16 entry)
|
||||
static void writeAcqScanListEntry(struct comedi_device *dev, u16 entry)
|
||||
{
|
||||
struct daqboard2000_hw *fpga = devpriv->daq;
|
||||
|
||||
@ -348,7 +348,7 @@ static void writeAcqScanListEntry(struct comedi_device * dev, u16 entry)
|
||||
fpga->acqScanListFIFO = (entry >> 8) & 0x00ff;
|
||||
}
|
||||
|
||||
static void setup_sampling(struct comedi_device * dev, int chan, int gain)
|
||||
static void setup_sampling(struct comedi_device *dev, int chan, int gain)
|
||||
{
|
||||
u16 word0, word1, word2, word3;
|
||||
|
||||
@ -393,8 +393,8 @@ static void setup_sampling(struct comedi_device * dev, int chan, int gain)
|
||||
writeAcqScanListEntry(dev, word3);
|
||||
}
|
||||
|
||||
static int daqboard2000_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int daqboard2000_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
struct daqboard2000_hw *fpga = devpriv->daq;
|
||||
@ -450,8 +450,8 @@ static int daqboard2000_ai_insn_read(struct comedi_device * dev, struct comedi_s
|
||||
return i;
|
||||
}
|
||||
|
||||
static int daqboard2000_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int daqboard2000_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -463,8 +463,8 @@ static int daqboard2000_ao_insn_read(struct comedi_device * dev, struct comedi_s
|
||||
return i;
|
||||
}
|
||||
|
||||
static int daqboard2000_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int daqboard2000_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -494,7 +494,7 @@ static int daqboard2000_ao_insn_write(struct comedi_device * dev, struct comedi_
|
||||
return i;
|
||||
}
|
||||
|
||||
static void daqboard2000_resetLocalBus(struct comedi_device * dev)
|
||||
static void daqboard2000_resetLocalBus(struct comedi_device *dev)
|
||||
{
|
||||
printk("daqboard2000_resetLocalBus\n");
|
||||
writel(DAQBOARD2000_SECRLocalBusHi, devpriv->plx + 0x6c);
|
||||
@ -503,7 +503,7 @@ static void daqboard2000_resetLocalBus(struct comedi_device * dev)
|
||||
comedi_udelay(10000);
|
||||
}
|
||||
|
||||
static void daqboard2000_reloadPLX(struct comedi_device * dev)
|
||||
static void daqboard2000_reloadPLX(struct comedi_device *dev)
|
||||
{
|
||||
printk("daqboard2000_reloadPLX\n");
|
||||
writel(DAQBOARD2000_SECRReloadLo, devpriv->plx + 0x6c);
|
||||
@ -514,7 +514,7 @@ static void daqboard2000_reloadPLX(struct comedi_device * dev)
|
||||
comedi_udelay(10000);
|
||||
}
|
||||
|
||||
static void daqboard2000_pulseProgPin(struct comedi_device * dev)
|
||||
static void daqboard2000_pulseProgPin(struct comedi_device *dev)
|
||||
{
|
||||
printk("daqboard2000_pulseProgPin 1\n");
|
||||
writel(DAQBOARD2000_SECRProgPinHi, devpriv->plx + 0x6c);
|
||||
@ -523,7 +523,7 @@ static void daqboard2000_pulseProgPin(struct comedi_device * dev)
|
||||
comedi_udelay(10000); /* Not in the original code, but I like symmetry... */
|
||||
}
|
||||
|
||||
static int daqboard2000_pollCPLD(struct comedi_device * dev, int mask)
|
||||
static int daqboard2000_pollCPLD(struct comedi_device *dev, int mask)
|
||||
{
|
||||
int result = 0;
|
||||
int i;
|
||||
@ -542,7 +542,7 @@ static int daqboard2000_pollCPLD(struct comedi_device * dev, int mask)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int daqboard2000_writeCPLD(struct comedi_device * dev, int data)
|
||||
static int daqboard2000_writeCPLD(struct comedi_device *dev, int data)
|
||||
{
|
||||
int result = 0;
|
||||
|
||||
@ -555,7 +555,7 @@ static int daqboard2000_writeCPLD(struct comedi_device * dev, int data)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int initialize_daqboard2000(struct comedi_device * dev,
|
||||
static int initialize_daqboard2000(struct comedi_device *dev,
|
||||
unsigned char *cpld_array, int len)
|
||||
{
|
||||
int result = -EIO;
|
||||
@ -613,12 +613,12 @@ static int initialize_daqboard2000(struct comedi_device * dev,
|
||||
return result;
|
||||
}
|
||||
|
||||
static void daqboard2000_adcStopDmaTransfer(struct comedi_device * dev)
|
||||
static void daqboard2000_adcStopDmaTransfer(struct comedi_device *dev)
|
||||
{
|
||||
/* printk("Implement: daqboard2000_adcStopDmaTransfer\n");*/
|
||||
}
|
||||
|
||||
static void daqboard2000_adcDisarm(struct comedi_device * dev)
|
||||
static void daqboard2000_adcDisarm(struct comedi_device *dev)
|
||||
{
|
||||
struct daqboard2000_hw *fpga = devpriv->daq;
|
||||
|
||||
@ -640,7 +640,7 @@ static void daqboard2000_adcDisarm(struct comedi_device * dev)
|
||||
daqboard2000_adcStopDmaTransfer(dev);
|
||||
}
|
||||
|
||||
static void daqboard2000_activateReferenceDacs(struct comedi_device * dev)
|
||||
static void daqboard2000_activateReferenceDacs(struct comedi_device *dev)
|
||||
{
|
||||
struct daqboard2000_hw *fpga = devpriv->daq;
|
||||
int timeout;
|
||||
@ -666,22 +666,22 @@ static void daqboard2000_activateReferenceDacs(struct comedi_device * dev)
|
||||
/* printk("DAQBOARD2000_NegRefDacSelect %d\n", timeout);*/
|
||||
}
|
||||
|
||||
static void daqboard2000_initializeCtrs(struct comedi_device * dev)
|
||||
static void daqboard2000_initializeCtrs(struct comedi_device *dev)
|
||||
{
|
||||
/* printk("Implement: daqboard2000_initializeCtrs\n");*/
|
||||
}
|
||||
|
||||
static void daqboard2000_initializeTmrs(struct comedi_device * dev)
|
||||
static void daqboard2000_initializeTmrs(struct comedi_device *dev)
|
||||
{
|
||||
/* printk("Implement: daqboard2000_initializeTmrs\n");*/
|
||||
}
|
||||
|
||||
static void daqboard2000_dacDisarm(struct comedi_device * dev)
|
||||
static void daqboard2000_dacDisarm(struct comedi_device *dev)
|
||||
{
|
||||
/* printk("Implement: daqboard2000_dacDisarm\n");*/
|
||||
}
|
||||
|
||||
static void daqboard2000_initializeAdc(struct comedi_device * dev)
|
||||
static void daqboard2000_initializeAdc(struct comedi_device *dev)
|
||||
{
|
||||
daqboard2000_adcDisarm(dev);
|
||||
daqboard2000_activateReferenceDacs(dev);
|
||||
@ -689,7 +689,7 @@ static void daqboard2000_initializeAdc(struct comedi_device * dev)
|
||||
daqboard2000_initializeTmrs(dev);
|
||||
}
|
||||
|
||||
static void daqboard2000_initializeDac(struct comedi_device * dev)
|
||||
static void daqboard2000_initializeDac(struct comedi_device *dev)
|
||||
{
|
||||
daqboard2000_dacDisarm(dev);
|
||||
}
|
||||
@ -717,7 +717,7 @@ static int daqboard2000_8255_cb(int dir, int port, int data,
|
||||
return result;
|
||||
}
|
||||
|
||||
static int daqboard2000_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int daqboard2000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int result = 0;
|
||||
struct comedi_subdevice *s;
|
||||
@ -849,7 +849,7 @@ static int daqboard2000_attach(struct comedi_device * dev, struct comedi_devconf
|
||||
return result;
|
||||
}
|
||||
|
||||
static int daqboard2000_detach(struct comedi_device * dev)
|
||||
static int daqboard2000_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: daqboard2000: remove\n", dev->minor);
|
||||
|
||||
|
@ -154,20 +154,20 @@ driver.
|
||||
|
||||
/* gainlist same as _pgx_ below */
|
||||
|
||||
static int das08_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int das08_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int das08_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int das08jr_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int das08jr_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int das08jr_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int das08ao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int das08_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int das08_di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int das08_do_wbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int das08jr_di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int das08jr_do_wbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int das08jr_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int das08ao_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static void i8254_set_mode_low(unsigned int base, int channel,
|
||||
unsigned int mode);
|
||||
|
||||
@ -512,8 +512,8 @@ MODULE_DEVICE_TABLE(pci, das08_pci_table);
|
||||
|
||||
#define TIMEOUT 100000
|
||||
|
||||
static int das08_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das08_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i, n;
|
||||
int chan;
|
||||
@ -579,8 +579,8 @@ static int das08_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return n;
|
||||
}
|
||||
|
||||
static int das08_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das08_di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = 0;
|
||||
data[1] = DAS08_IP(inb(dev->iobase + DAS08_STATUS));
|
||||
@ -588,8 +588,8 @@ static int das08_di_rbits(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das08_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das08_do_wbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int wbits;
|
||||
|
||||
@ -611,8 +611,8 @@ static int das08_do_wbits(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das08jr_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das08jr_di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = 0;
|
||||
data[1] = inb(dev->iobase + DAS08JR_DIO);
|
||||
@ -620,8 +620,8 @@ static int das08jr_di_rbits(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das08jr_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das08jr_do_wbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
/* null bits we are going to set */
|
||||
devpriv->do_bits &= ~data[0];
|
||||
@ -634,8 +634,8 @@ static int das08jr_do_wbits(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das08jr_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das08jr_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n;
|
||||
int lsb, msb;
|
||||
@ -668,8 +668,8 @@ static int das08jr_ao_winsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
* a different method to force an update.
|
||||
*
|
||||
*/
|
||||
static int das08ao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das08ao_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n;
|
||||
int lsb, msb;
|
||||
@ -782,8 +782,8 @@ static unsigned int i8254_read_status(struct i8254_struct *st, int channel)
|
||||
return i8254_read_status_low(st->iobase, chan);
|
||||
}
|
||||
|
||||
static int das08_counter_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das08_counter_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = insn->chanspec;
|
||||
|
||||
@ -794,8 +794,8 @@ static int das08_counter_read(struct comedi_device * dev, struct comedi_subdevic
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int das08_counter_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das08_counter_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = insn->chanspec;
|
||||
|
||||
@ -805,8 +805,8 @@ static int das08_counter_write(struct comedi_device * dev, struct comedi_subdevi
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int das08_counter_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das08_counter_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = insn->chanspec;
|
||||
|
||||
@ -827,7 +827,7 @@ static int das08_counter_config(struct comedi_device * dev, struct comedi_subdev
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das08_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int das08_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
|
||||
static struct comedi_driver driver_das08 = {
|
||||
driver_name: DRV_NAME,
|
||||
@ -840,7 +840,7 @@ static struct comedi_driver driver_das08 = {
|
||||
offset:sizeof(struct das08_board_struct),
|
||||
};
|
||||
|
||||
int das08_common_attach(struct comedi_device * dev, unsigned long iobase)
|
||||
int das08_common_attach(struct comedi_device *dev, unsigned long iobase)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret;
|
||||
@ -952,7 +952,7 @@ int das08_common_attach(struct comedi_device * dev, unsigned long iobase)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das08_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int das08_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int ret;
|
||||
unsigned long iobase;
|
||||
@ -1028,7 +1028,7 @@ static int das08_attach(struct comedi_device * dev, struct comedi_devconfig * it
|
||||
return das08_common_attach(dev, iobase);
|
||||
}
|
||||
|
||||
int das08_common_detach(struct comedi_device * dev)
|
||||
int das08_common_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk(KERN_INFO "comedi%d: das08: remove\n", dev->minor);
|
||||
|
||||
|
@ -72,7 +72,7 @@ struct das08_private_struct {
|
||||
#define NUM_DAS08_CS_BOARDS 2
|
||||
extern struct das08_board_struct das08_cs_boards[NUM_DAS08_CS_BOARDS];
|
||||
|
||||
int das08_common_attach(struct comedi_device * dev, unsigned long iobase);
|
||||
int das08_common_detach(struct comedi_device * dev);
|
||||
int das08_common_attach(struct comedi_device *dev, unsigned long iobase);
|
||||
int das08_common_detach(struct comedi_device *dev);
|
||||
|
||||
#endif /* _DAS08_H */
|
||||
|
@ -56,7 +56,7 @@ static struct pcmcia_device *cur_dev = NULL;
|
||||
|
||||
#define thisboard ((const struct das08_board_struct *)dev->board_ptr)
|
||||
|
||||
static int das08_cs_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int das08_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
|
||||
static struct comedi_driver driver_das08_cs = {
|
||||
driver_name:"das08_cs",
|
||||
@ -69,7 +69,7 @@ static struct comedi_driver driver_das08_cs = {
|
||||
offset:sizeof(struct das08_board_struct),
|
||||
};
|
||||
|
||||
static int das08_cs_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int das08_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int ret;
|
||||
unsigned long iobase;
|
||||
|
@ -698,8 +698,8 @@ static const struct das16_board das16_boards[] = {
|
||||
|
||||
#define n_das16_boards ((sizeof(das16_boards))/(sizeof(struct das16_board)))
|
||||
|
||||
static int das16_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int das16_detach(struct comedi_device * dev);
|
||||
static int das16_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int das16_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_das16 = {
|
||||
driver_name:"das16",
|
||||
module:THIS_MODULE,
|
||||
@ -742,8 +742,8 @@ struct das16_private_struct {
|
||||
#define devpriv ((struct das16_private_struct *)(dev->private))
|
||||
#define thisboard ((struct das16_board *)(dev->board_ptr))
|
||||
|
||||
static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int das16_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0, tmp;
|
||||
int gain, start_chan, i;
|
||||
@ -893,7 +893,7 @@ static int das16_cmd_test(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das16_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das16_cmd_exec(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
@ -996,7 +996,7 @@ static int das16_cmd_exec(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das16_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das16_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -1023,7 +1023,7 @@ static int das16_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void das16_reset(struct comedi_device * dev)
|
||||
static void das16_reset(struct comedi_device *dev)
|
||||
{
|
||||
outb(0, dev->iobase + DAS16_STATUS);
|
||||
outb(0, dev->iobase + DAS16_CONTROL);
|
||||
@ -1031,8 +1031,8 @@ static void das16_reset(struct comedi_device * dev)
|
||||
outb(0, dev->iobase + DAS16_CNTR_CONTROL);
|
||||
}
|
||||
|
||||
static int das16_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i, n;
|
||||
int range;
|
||||
@ -1079,8 +1079,8 @@ static int das16_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return n;
|
||||
}
|
||||
|
||||
static int das16_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16_di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int bits;
|
||||
|
||||
@ -1091,8 +1091,8 @@ static int das16_di_rbits(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das16_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16_do_wbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int wbits;
|
||||
|
||||
@ -1111,8 +1111,8 @@ static int das16_do_wbits(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das16_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int lsb, msb;
|
||||
@ -1169,7 +1169,7 @@ static void das16_timer_interrupt(unsigned long arg)
|
||||
an even transfer count after disabling dma
|
||||
channel.
|
||||
*/
|
||||
static int disable_dma_on_even(struct comedi_device * dev)
|
||||
static int disable_dma_on_even(struct comedi_device *dev)
|
||||
{
|
||||
int residue;
|
||||
int i;
|
||||
@ -1197,7 +1197,7 @@ static int disable_dma_on_even(struct comedi_device * dev)
|
||||
return residue;
|
||||
}
|
||||
|
||||
static void das16_interrupt(struct comedi_device * dev)
|
||||
static void das16_interrupt(struct comedi_device *dev)
|
||||
{
|
||||
unsigned long dma_flags, spin_flags;
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
@ -1273,7 +1273,7 @@ static void das16_interrupt(struct comedi_device * dev)
|
||||
cfc_handle_events(dev, s);
|
||||
}
|
||||
|
||||
static unsigned int das16_set_pacer(struct comedi_device * dev, unsigned int ns,
|
||||
static unsigned int das16_set_pacer(struct comedi_device *dev, unsigned int ns,
|
||||
int rounding_flags)
|
||||
{
|
||||
i8253_cascade_ns_to_timer_2div(devpriv->clockbase, &(devpriv->divisor1),
|
||||
@ -1286,7 +1286,7 @@ static unsigned int das16_set_pacer(struct comedi_device * dev, unsigned int ns,
|
||||
return ns;
|
||||
}
|
||||
|
||||
static void reg_dump(struct comedi_device * dev)
|
||||
static void reg_dump(struct comedi_device *dev)
|
||||
{
|
||||
DEBUG_PRINT("********DAS1600 REGISTER DUMP********\n");
|
||||
DEBUG_PRINT("DAS16_MUX: %x\n", inb(dev->iobase + DAS16_MUX));
|
||||
@ -1304,7 +1304,7 @@ static void reg_dump(struct comedi_device * dev)
|
||||
inb(dev->iobase + DAS1600_STATUS_B));
|
||||
}
|
||||
|
||||
static int das16_probe(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int das16_probe(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int status;
|
||||
int diobits;
|
||||
@ -1338,7 +1338,7 @@ static int das16_probe(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das1600_mode_detect(struct comedi_device * dev)
|
||||
static int das1600_mode_detect(struct comedi_device *dev)
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
@ -1366,7 +1366,7 @@ static int das1600_mode_detect(struct comedi_device * dev)
|
||||
* 3 Clock speed (in MHz)
|
||||
*/
|
||||
|
||||
static int das16_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int das16_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret;
|
||||
@ -1630,7 +1630,7 @@ static int das16_attach(struct comedi_device * dev, struct comedi_devconfig * it
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das16_detach(struct comedi_device * dev)
|
||||
static int das16_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: das16: remove\n", dev->minor);
|
||||
|
||||
@ -1674,7 +1674,7 @@ static int das16_detach(struct comedi_device * dev)
|
||||
COMEDI_INITCLEANUP(driver_das16);
|
||||
|
||||
/* utility function that suggests a dma transfer size in bytes */
|
||||
static unsigned int das16_suggest_transfer_size(struct comedi_device * dev,
|
||||
static unsigned int das16_suggest_transfer_size(struct comedi_device *dev,
|
||||
struct comedi_cmd cmd)
|
||||
{
|
||||
unsigned int size;
|
||||
@ -1715,7 +1715,7 @@ static unsigned int das16_suggest_transfer_size(struct comedi_device * dev,
|
||||
return size;
|
||||
}
|
||||
|
||||
static void das16_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static void das16_ai_munge(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
void *array, unsigned int num_bytes, unsigned int start_chan_index)
|
||||
{
|
||||
unsigned int i, num_samples = num_bytes / sizeof(short);
|
||||
|
@ -166,8 +166,8 @@ static const struct das16m1_board das16m1_boards[] = {
|
||||
|
||||
#define das16m1_num_boards ((sizeof(das16m1_boards)) / (sizeof(das16m1_boards[0])))
|
||||
|
||||
static int das16m1_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int das16m1_detach(struct comedi_device * dev);
|
||||
static int das16m1_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int das16m1_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_das16m1 = {
|
||||
driver_name:"das16m1",
|
||||
module:THIS_MODULE,
|
||||
@ -200,8 +200,8 @@ static inline short munge_sample(short data)
|
||||
return (data >> 4) & 0xfff;
|
||||
}
|
||||
|
||||
static int das16m1_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int das16m1_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int err = 0, tmp, i;
|
||||
|
||||
@ -322,7 +322,7 @@ static int das16m1_cmd_test(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das16m1_cmd_exec(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
@ -385,7 +385,7 @@ static int das16m1_cmd_exec(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das16m1_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das16m1_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
devpriv->control_state &= ~INTE & ~PACER_MASK;
|
||||
outb(devpriv->control_state, dev->iobase + DAS16M1_INTR_CONTROL);
|
||||
@ -393,8 +393,8 @@ static int das16m1_cancel(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das16m1_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16m1_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i, n;
|
||||
int byte;
|
||||
@ -430,8 +430,8 @@ static int das16m1_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
return n;
|
||||
}
|
||||
|
||||
static int das16m1_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16m1_di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int bits;
|
||||
|
||||
@ -442,8 +442,8 @@ static int das16m1_di_rbits(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das16m1_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das16m1_do_wbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int wbits;
|
||||
|
||||
@ -462,7 +462,7 @@ static int das16m1_do_wbits(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das16m1_poll(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das16m1_poll(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned int status;
|
||||
@ -505,7 +505,7 @@ static irqreturn_t das16m1_interrupt(int irq, void *d)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static void munge_sample_array(short * array, unsigned int num_elements)
|
||||
static void munge_sample_array(short *array, unsigned int num_elements)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
@ -514,7 +514,7 @@ static void munge_sample_array(short * array, unsigned int num_elements)
|
||||
}
|
||||
}
|
||||
|
||||
static void das16m1_handler(struct comedi_device * dev, unsigned int status)
|
||||
static void das16m1_handler(struct comedi_device *dev, unsigned int status)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
struct comedi_async *async;
|
||||
@ -578,7 +578,7 @@ static void das16m1_handler(struct comedi_device * dev, unsigned int status)
|
||||
/* This function takes a time in nanoseconds and sets the *
|
||||
* 2 pacer clocks to the closest frequency possible. It also *
|
||||
* returns the actual sampling period. */
|
||||
static unsigned int das16m1_set_pacer(struct comedi_device * dev, unsigned int ns,
|
||||
static unsigned int das16m1_set_pacer(struct comedi_device *dev, unsigned int ns,
|
||||
int rounding_flags)
|
||||
{
|
||||
i8253_cascade_ns_to_timer_2div(DAS16M1_XTAL, &(devpriv->divisor1),
|
||||
@ -635,7 +635,7 @@ static int das16m1_irq_bits(unsigned int irq)
|
||||
* 1 IRQ
|
||||
*/
|
||||
|
||||
static int das16m1_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int das16m1_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret;
|
||||
@ -744,7 +744,7 @@ static int das16m1_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das16m1_detach(struct comedi_device * dev)
|
||||
static int das16m1_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: das16m1: remove\n", dev->minor);
|
||||
|
||||
|
@ -520,7 +520,7 @@ static struct comedi_driver driver_das1800 = {
|
||||
*/
|
||||
COMEDI_INITCLEANUP(driver_das1800);
|
||||
|
||||
static int das1800_init_dma(struct comedi_device * dev, unsigned int dma0,
|
||||
static int das1800_init_dma(struct comedi_device *dev, unsigned int dma0,
|
||||
unsigned int dma1)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -590,7 +590,7 @@ static int das1800_init_dma(struct comedi_device * dev, unsigned int dma0,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das1800_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int das1800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase = it->options[0];
|
||||
@ -765,7 +765,7 @@ static int das1800_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 0;
|
||||
};
|
||||
|
||||
static int das1800_detach(struct comedi_device * dev)
|
||||
static int das1800_detach(struct comedi_device *dev)
|
||||
{
|
||||
/* only free stuff if it has been allocated by _attach */
|
||||
if (dev->iobase)
|
||||
@ -793,7 +793,7 @@ static int das1800_detach(struct comedi_device * dev)
|
||||
|
||||
/* probes and checks das-1800 series board type
|
||||
*/
|
||||
static int das1800_probe(struct comedi_device * dev)
|
||||
static int das1800_probe(struct comedi_device *dev)
|
||||
{
|
||||
int id;
|
||||
int board;
|
||||
@ -867,7 +867,7 @@ static int das1800_probe(struct comedi_device * dev)
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int das1800_ai_poll(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das1800_ai_poll(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -909,7 +909,7 @@ static irqreturn_t das1800_interrupt(int irq, void *d)
|
||||
}
|
||||
|
||||
/* the guts of the interrupt handler, that is shared with das1800_ai_poll */
|
||||
static void das1800_ai_handler(struct comedi_device * dev)
|
||||
static void das1800_ai_handler(struct comedi_device *dev)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->subdevices + 0; /* analog input subdevice */
|
||||
struct comedi_async *async = s->async;
|
||||
@ -962,7 +962,7 @@ static void das1800_ai_handler(struct comedi_device * dev)
|
||||
return;
|
||||
}
|
||||
|
||||
static void das1800_handle_dma(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static void das1800_handle_dma(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int status)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -997,14 +997,14 @@ static void das1800_handle_dma(struct comedi_device * dev, struct comedi_subdevi
|
||||
return;
|
||||
}
|
||||
|
||||
static inline uint16_t munge_bipolar_sample(const struct comedi_device * dev,
|
||||
static inline uint16_t munge_bipolar_sample(const struct comedi_device *dev,
|
||||
uint16_t sample)
|
||||
{
|
||||
sample += 1 << (thisboard->resolution - 1);
|
||||
return sample;
|
||||
}
|
||||
|
||||
static void munge_data(struct comedi_device * dev, uint16_t * array,
|
||||
static void munge_data(struct comedi_device *dev, uint16_t *array,
|
||||
unsigned int num_elements)
|
||||
{
|
||||
unsigned int i;
|
||||
@ -1023,8 +1023,8 @@ static void munge_data(struct comedi_device * dev, uint16_t * array,
|
||||
|
||||
/* Utility function used by das1800_flush_dma() and das1800_handle_dma().
|
||||
* Assumes dma lock is held */
|
||||
static void das1800_flush_dma_channel(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
unsigned int channel, uint16_t * buffer)
|
||||
static void das1800_flush_dma_channel(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int channel, uint16_t *buffer)
|
||||
{
|
||||
unsigned int num_bytes, num_samples;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
@ -1053,7 +1053,7 @@ static void das1800_flush_dma_channel(struct comedi_device * dev, struct comedi_
|
||||
|
||||
/* flushes remaining data from board when external trigger has stopped aquisition
|
||||
* and we are using dma transfers */
|
||||
static void das1800_flush_dma(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void das1800_flush_dma(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long flags;
|
||||
const int dual_dma = devpriv->irq_dma_bits & DMA_DUAL;
|
||||
@ -1083,8 +1083,8 @@ static void das1800_flush_dma(struct comedi_device * dev, struct comedi_subdevic
|
||||
return;
|
||||
}
|
||||
|
||||
static void das1800_handle_fifo_half_full(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s)
|
||||
static void das1800_handle_fifo_half_full(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s)
|
||||
{
|
||||
int numPoints = 0; /* number of points to read */
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
@ -1102,8 +1102,8 @@ static void das1800_handle_fifo_half_full(struct comedi_device * dev,
|
||||
return;
|
||||
}
|
||||
|
||||
static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s)
|
||||
static void das1800_handle_fifo_not_empty(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s)
|
||||
{
|
||||
short dpnt;
|
||||
int unipolar;
|
||||
@ -1126,7 +1126,7 @@ static void das1800_handle_fifo_not_empty(struct comedi_device * dev,
|
||||
return;
|
||||
}
|
||||
|
||||
static int das1800_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das1800_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
outb(0x0, dev->iobase + DAS1800_STATUS); /* disable conversions */
|
||||
outb(0x0, dev->iobase + DAS1800_CONTROL_B); /* disable interrupts and dma */
|
||||
@ -1139,8 +1139,8 @@ static int das1800_cancel(struct comedi_device * dev, struct comedi_subdevice *
|
||||
}
|
||||
|
||||
/* test analog input cmd */
|
||||
static int das1800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int das1800_ai_do_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -1385,7 +1385,7 @@ static int control_c_bits(struct comedi_cmd cmd)
|
||||
}
|
||||
|
||||
/* sets up counters */
|
||||
static int setup_counters(struct comedi_device * dev, struct comedi_cmd cmd)
|
||||
static int setup_counters(struct comedi_device *dev, struct comedi_cmd cmd)
|
||||
{
|
||||
/* setup cascaded counters for conversion/scan frequency */
|
||||
switch (cmd.scan_begin_src) {
|
||||
@ -1424,7 +1424,7 @@ static int setup_counters(struct comedi_device * dev, struct comedi_cmd cmd)
|
||||
}
|
||||
|
||||
/* sets up dma */
|
||||
static void setup_dma(struct comedi_device * dev, struct comedi_cmd cmd)
|
||||
static void setup_dma(struct comedi_device *dev, struct comedi_cmd cmd)
|
||||
{
|
||||
unsigned long lock_flags;
|
||||
const int dual_dma = devpriv->irq_dma_bits & DMA_DUAL;
|
||||
@ -1462,7 +1462,7 @@ static void setup_dma(struct comedi_device * dev, struct comedi_cmd cmd)
|
||||
}
|
||||
|
||||
/* programs channel/gain list into card */
|
||||
static void program_chanlist(struct comedi_device * dev, struct comedi_cmd cmd)
|
||||
static void program_chanlist(struct comedi_device *dev, struct comedi_cmd cmd)
|
||||
{
|
||||
int i, n, chan_range;
|
||||
unsigned long irq_flags;
|
||||
@ -1489,7 +1489,7 @@ static void program_chanlist(struct comedi_device * dev, struct comedi_cmd cmd)
|
||||
}
|
||||
|
||||
/* analog input do_cmd */
|
||||
static int das1800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das1800_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
int ret;
|
||||
int control_a, control_c;
|
||||
@ -1552,8 +1552,8 @@ static int das1800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
|
||||
/* read analog input */
|
||||
static int das1800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das1800_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i, n;
|
||||
int chan, range, aref, chan_range;
|
||||
@ -1612,8 +1612,8 @@ static int das1800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
|
||||
/* writes to an analog output channel */
|
||||
static int das1800_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das1800_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
/* int range = CR_RANGE(insn->chanspec); */
|
||||
@ -1641,8 +1641,8 @@ static int das1800_ao_winsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
|
||||
/* reads from digital input channels */
|
||||
static int das1800_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das1800_di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
data[1] = inb(dev->iobase + DAS1800_DIGITAL) & 0xf;
|
||||
@ -1652,8 +1652,8 @@ static int das1800_di_rbits(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
|
||||
/* writes to digital output channels */
|
||||
static int das1800_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das1800_do_wbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int wbits;
|
||||
|
||||
@ -1672,7 +1672,7 @@ static int das1800_do_wbits(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
|
||||
/* loads counters with divisor1, divisor2 from private structure */
|
||||
static int das1800_set_frequency(struct comedi_device * dev)
|
||||
static int das1800_set_frequency(struct comedi_device *dev)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
@ -1720,7 +1720,7 @@ static unsigned int burst_convert_arg(unsigned int convert_arg, int round_mode)
|
||||
}
|
||||
|
||||
/* utility function that suggests a dma transfer size based on the conversion period 'ns' */
|
||||
static unsigned int suggest_transfer_size(struct comedi_cmd * cmd)
|
||||
static unsigned int suggest_transfer_size(struct comedi_cmd *cmd)
|
||||
{
|
||||
unsigned int size = DMA_BUF_SIZE;
|
||||
static const int sample_size = 2; /* size in bytes of one sample from board */
|
||||
|
@ -98,8 +98,8 @@ This driver has suffered bitrot.
|
||||
#define C2 0x80
|
||||
#define RWLH 0x30
|
||||
|
||||
static int das6402_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int das6402_detach(struct comedi_device * dev);
|
||||
static int das6402_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int das6402_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_das6402 = {
|
||||
driver_name:"das6402",
|
||||
module:THIS_MODULE,
|
||||
@ -116,9 +116,9 @@ struct das6402_private {
|
||||
};
|
||||
#define devpriv ((struct das6402_private *)dev->private)
|
||||
|
||||
static void das6402_ai_fifo_dregs(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void das6402_ai_fifo_dregs(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
|
||||
static void das6402_setcounter(struct comedi_device * dev)
|
||||
static void das6402_setcounter(struct comedi_device *dev)
|
||||
{
|
||||
BYTE p;
|
||||
unsigned short ctrlwrd;
|
||||
@ -186,7 +186,7 @@ static irqreturn_t intr_handler(int irq, void *d)
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void das6402_ai_fifo_read(struct comedi_device * dev, short * data, int n)
|
||||
static void das6402_ai_fifo_read(struct comedi_device *dev, short *data, int n)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -195,7 +195,7 @@ static void das6402_ai_fifo_read(struct comedi_device * dev, short * data, int n
|
||||
}
|
||||
#endif
|
||||
|
||||
static void das6402_ai_fifo_dregs(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void das6402_ai_fifo_dregs(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
while (1) {
|
||||
if (!(inb(dev->iobase + 8) & 0x01))
|
||||
@ -204,7 +204,7 @@ static void das6402_ai_fifo_dregs(struct comedi_device * dev, struct comedi_subd
|
||||
}
|
||||
}
|
||||
|
||||
static int das6402_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das6402_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
/*
|
||||
* This function should reset the board from whatever condition it
|
||||
@ -226,8 +226,8 @@ static int das6402_ai_cancel(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
|
||||
#ifdef unused
|
||||
static int das6402_ai_mode2(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
comedi_trig * it)
|
||||
static int das6402_ai_mode2(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
comedi_trig *it)
|
||||
{
|
||||
devpriv->das6402_ignoreirq = 1;
|
||||
|
||||
@ -249,7 +249,7 @@ static int das6402_ai_mode2(struct comedi_device * dev, struct comedi_subdevice
|
||||
}
|
||||
#endif
|
||||
|
||||
static int board_init(struct comedi_device * dev)
|
||||
static int board_init(struct comedi_device *dev)
|
||||
{
|
||||
BYTE b;
|
||||
|
||||
@ -289,7 +289,7 @@ static int board_init(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das6402_detach(struct comedi_device * dev)
|
||||
static int das6402_detach(struct comedi_device *dev)
|
||||
{
|
||||
if (dev->irq)
|
||||
comedi_free_irq(dev->irq, dev);
|
||||
@ -299,7 +299,7 @@ static int das6402_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das6402_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int das6402_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
unsigned int irq;
|
||||
unsigned long iobase;
|
||||
|
@ -242,9 +242,9 @@ struct das800_private {
|
||||
|
||||
#define devpriv ((struct das800_private *)dev->private)
|
||||
|
||||
static int das800_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int das800_detach(struct comedi_device * dev);
|
||||
static int das800_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int das800_detach(struct comedi_device *dev);
|
||||
static int das800_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
|
||||
static struct comedi_driver driver_das800 = {
|
||||
driver_name:"das800",
|
||||
@ -441,7 +441,7 @@ static irqreturn_t das800_interrupt(int irq, void *d)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int das800_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase = it->options[0];
|
||||
@ -539,7 +539,7 @@ static int das800_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return 0;
|
||||
};
|
||||
|
||||
static int das800_detach(struct comedi_device * dev)
|
||||
static int das800_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: das800: remove\n", dev->minor);
|
||||
|
||||
@ -551,7 +551,7 @@ static int das800_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
};
|
||||
|
||||
static int das800_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das800_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
devpriv->forever = 0;
|
||||
devpriv->count = 0;
|
||||
@ -560,7 +560,7 @@ static int das800_cancel(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
}
|
||||
|
||||
/* enable_das800 makes the card start taking hardware triggered conversions */
|
||||
static void enable_das800(struct comedi_device * dev)
|
||||
static void enable_das800(struct comedi_device *dev)
|
||||
{
|
||||
unsigned long irq_flags;
|
||||
comedi_spin_lock_irqsave(&dev->spinlock, irq_flags);
|
||||
@ -575,7 +575,7 @@ static void enable_das800(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
/* disable_das800 stops hardware triggered conversions */
|
||||
static void disable_das800(struct comedi_device * dev)
|
||||
static void disable_das800(struct comedi_device *dev)
|
||||
{
|
||||
unsigned long irq_flags;
|
||||
comedi_spin_lock_irqsave(&dev->spinlock, irq_flags);
|
||||
@ -584,8 +584,8 @@ static void disable_das800(struct comedi_device * dev)
|
||||
comedi_spin_unlock_irqrestore(&dev->spinlock, irq_flags);
|
||||
}
|
||||
|
||||
static int das800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int das800_ai_do_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -709,7 +709,7 @@ static int das800_ai_do_cmdtest(struct comedi_device * dev, struct comedi_subdev
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int das800_ai_do_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
int startChan, endChan, scan, gain;
|
||||
int conv_bits;
|
||||
@ -788,8 +788,8 @@ static int das800_ai_do_cmd(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int das800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das800_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i, n;
|
||||
int chan;
|
||||
@ -842,8 +842,8 @@ static int das800_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return n;
|
||||
}
|
||||
|
||||
static int das800_di_rbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das800_di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int bits;
|
||||
|
||||
@ -855,8 +855,8 @@ static int das800_di_rbits(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int das800_do_wbits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int das800_do_wbits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int wbits;
|
||||
unsigned long irq_flags;
|
||||
@ -879,7 +879,7 @@ static int das800_do_wbits(struct comedi_device * dev, struct comedi_subdevice *
|
||||
}
|
||||
|
||||
/* loads counters with divisor1, divisor2 from private structure */
|
||||
static int das800_set_frequency(struct comedi_device * dev)
|
||||
static int das800_set_frequency(struct comedi_device *dev)
|
||||
{
|
||||
int err = 0;
|
||||
|
||||
|
@ -258,8 +258,8 @@ struct dmm32at_private {
|
||||
* the board, and also about the kernel module that contains
|
||||
* the device code.
|
||||
*/
|
||||
static int dmm32at_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dmm32at_detach(struct comedi_device * dev);
|
||||
static int dmm32at_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dmm32at_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_dmm32at = {
|
||||
driver_name:"dmm32at",
|
||||
module:THIS_MODULE,
|
||||
@ -313,7 +313,7 @@ void dmm32at_setaitimer(struct comedi_device * dev, unsigned int nansec);
|
||||
* in the driver structure, dev->board_ptr contains that
|
||||
* address.
|
||||
*/
|
||||
static int dmm32at_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dmm32at_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int ret;
|
||||
struct comedi_subdevice *s;
|
||||
@ -481,7 +481,7 @@ static int dmm32at_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
* allocated by _attach(). dev->private and dev->subdevices are
|
||||
* deallocated automatically by the core.
|
||||
*/
|
||||
static int dmm32at_detach(struct comedi_device * dev)
|
||||
static int dmm32at_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: dmm32at: remove\n", dev->minor);
|
||||
if (dev->irq)
|
||||
@ -497,8 +497,8 @@ static int dmm32at_detach(struct comedi_device * dev)
|
||||
* mode.
|
||||
*/
|
||||
|
||||
static int dmm32at_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dmm32at_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, i;
|
||||
unsigned int d;
|
||||
@ -568,8 +568,8 @@ static int dmm32at_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
return n;
|
||||
}
|
||||
|
||||
static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int dmm32at_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -752,7 +752,7 @@ static int dmm32at_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevic
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dmm32at_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dmm32at_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int i, range;
|
||||
@ -822,7 +822,7 @@ static int dmm32at_ai_cmd(struct comedi_device * dev, struct comedi_subdevice *
|
||||
|
||||
}
|
||||
|
||||
static int dmm32at_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dmm32at_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
devpriv->ai_scans_left = 1;
|
||||
return 0;
|
||||
@ -893,8 +893,8 @@ static int dmm32at_ns_to_timer(unsigned int *ns, int round)
|
||||
return *ns;
|
||||
}
|
||||
|
||||
static int dmm32at_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dmm32at_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -936,8 +936,8 @@ static int dmm32at_ao_winsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
|
||||
/* AO subdevices should have a read insn as well as a write insn.
|
||||
* Usually this means copying a value stored in devpriv. */
|
||||
static int dmm32at_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dmm32at_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -953,8 +953,8 @@ static int dmm32at_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
* useful to applications if you implement the insn_bits interface.
|
||||
* This allows packed reading/writing of the DIO channels. The
|
||||
* comedi core can convert between insn_bits and insn_read/write */
|
||||
static int dmm32at_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dmm32at_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char diobits;
|
||||
|
||||
@ -1006,8 +1006,8 @@ static int dmm32at_dio_insn_bits(struct comedi_device * dev, struct comedi_subde
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int dmm32at_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dmm32at_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char chanbit;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -1043,7 +1043,7 @@ static int dmm32at_dio_insn_config(struct comedi_device * dev, struct comedi_sub
|
||||
return 1;
|
||||
}
|
||||
|
||||
void dmm32at_setaitimer(struct comedi_device * dev, unsigned int nansec)
|
||||
void dmm32at_setaitimer(struct comedi_device *dev, unsigned int nansec)
|
||||
{
|
||||
unsigned char lo1, lo2, hi2;
|
||||
unsigned short both2;
|
||||
|
@ -88,8 +88,8 @@ Configuration options:
|
||||
#define DT2801_STATUS 1
|
||||
#define DT2801_CMD 1
|
||||
|
||||
static int dt2801_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dt2801_detach(struct comedi_device * dev);
|
||||
static int dt2801_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dt2801_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_dt2801 = {
|
||||
driver_name:"dt2801",
|
||||
module:THIS_MODULE,
|
||||
@ -228,16 +228,16 @@ struct dt2801_private {
|
||||
|
||||
#define devpriv ((struct dt2801_private *)dev->private)
|
||||
|
||||
static int dt2801_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int dt2801_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int dt2801_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int dt2801_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int dt2801_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int dt2801_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int dt2801_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int dt2801_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int dt2801_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int dt2801_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
/* These are the low-level routines:
|
||||
writecommand: write a command to the board
|
||||
@ -248,7 +248,7 @@ static int dt2801_dio_insn_config(struct comedi_device * dev, struct comedi_subd
|
||||
/* Only checks DataOutReady-flag, not the Ready-flag as it is done
|
||||
in the examples of the manual. I don't see why this should be
|
||||
necessary. */
|
||||
static int dt2801_readdata(struct comedi_device * dev, int *data)
|
||||
static int dt2801_readdata(struct comedi_device *dev, int *data)
|
||||
{
|
||||
int stat = 0;
|
||||
int timeout = DT2801_TIMEOUT;
|
||||
@ -267,7 +267,7 @@ static int dt2801_readdata(struct comedi_device * dev, int *data)
|
||||
return -ETIME;
|
||||
}
|
||||
|
||||
static int dt2801_readdata2(struct comedi_device * dev, int *data)
|
||||
static int dt2801_readdata2(struct comedi_device *dev, int *data)
|
||||
{
|
||||
int lb, hb;
|
||||
int ret;
|
||||
@ -283,7 +283,7 @@ static int dt2801_readdata2(struct comedi_device * dev, int *data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt2801_writedata(struct comedi_device * dev, unsigned int data)
|
||||
static int dt2801_writedata(struct comedi_device *dev, unsigned int data)
|
||||
{
|
||||
int stat = 0;
|
||||
int timeout = DT2801_TIMEOUT;
|
||||
@ -309,7 +309,7 @@ static int dt2801_writedata(struct comedi_device * dev, unsigned int data)
|
||||
return -ETIME;
|
||||
}
|
||||
|
||||
static int dt2801_writedata2(struct comedi_device * dev, unsigned int data)
|
||||
static int dt2801_writedata2(struct comedi_device *dev, unsigned int data)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@ -323,7 +323,7 @@ static int dt2801_writedata2(struct comedi_device * dev, unsigned int data)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt2801_wait_for_ready(struct comedi_device * dev)
|
||||
static int dt2801_wait_for_ready(struct comedi_device *dev)
|
||||
{
|
||||
int timeout = DT2801_TIMEOUT;
|
||||
int stat;
|
||||
@ -346,7 +346,7 @@ static int dt2801_wait_for_ready(struct comedi_device * dev)
|
||||
return -ETIME;
|
||||
}
|
||||
|
||||
static int dt2801_writecmd(struct comedi_device * dev, int command)
|
||||
static int dt2801_writecmd(struct comedi_device *dev, int command)
|
||||
{
|
||||
int stat;
|
||||
|
||||
@ -364,7 +364,7 @@ static int dt2801_writecmd(struct comedi_device * dev, int command)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt2801_reset(struct comedi_device * dev)
|
||||
static int dt2801_reset(struct comedi_device *dev)
|
||||
{
|
||||
int board_code = 0;
|
||||
unsigned int stat;
|
||||
@ -422,7 +422,7 @@ static int dt2801_reset(struct comedi_device * dev)
|
||||
return board_code;
|
||||
}
|
||||
|
||||
static int probe_number_of_ai_chans(struct comedi_device * dev)
|
||||
static int probe_number_of_ai_chans(struct comedi_device *dev)
|
||||
{
|
||||
int n_chans;
|
||||
int stat;
|
||||
@ -483,7 +483,7 @@ static const struct comedi_lrange *ai_range_lkup(int type, int opt)
|
||||
[4] - dac0 range 0=[-10,10], 1=[-5,5], 2=[-2.5,2.5] 3=[0,10], 4=[0,5]
|
||||
[5] - dac1 range 0=[-10,10], 1=[-5,5], 2=[-2.5,2.5] 3=[0,10], 4=[0,5]
|
||||
*/
|
||||
static int dt2801_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dt2801_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase;
|
||||
@ -584,7 +584,7 @@ static int dt2801_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int dt2801_detach(struct comedi_device * dev)
|
||||
static int dt2801_detach(struct comedi_device *dev)
|
||||
{
|
||||
if (dev->iobase)
|
||||
release_region(dev->iobase, DT2801_IOSIZE);
|
||||
@ -592,7 +592,7 @@ static int dt2801_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt2801_error(struct comedi_device * dev, int stat)
|
||||
static int dt2801_error(struct comedi_device *dev, int stat)
|
||||
{
|
||||
if (stat < 0) {
|
||||
if (stat == -ETIME) {
|
||||
@ -610,8 +610,8 @@ static int dt2801_error(struct comedi_device * dev, int stat)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int dt2801_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2801_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int d;
|
||||
int stat;
|
||||
@ -632,16 +632,16 @@ static int dt2801_ai_insn_read(struct comedi_device * dev, struct comedi_subdevi
|
||||
return i;
|
||||
}
|
||||
|
||||
static int dt2801_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2801_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = devpriv->ao_readback[CR_CHAN(insn->chanspec)];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dt2801_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2801_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
dt2801_writecmd(dev, DT_C_WRITE_DAIM);
|
||||
dt2801_writedata(dev, CR_CHAN(insn->chanspec));
|
||||
@ -652,8 +652,8 @@ static int dt2801_ao_insn_write(struct comedi_device * dev, struct comedi_subdev
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dt2801_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2801_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int which = 0;
|
||||
|
||||
@ -676,8 +676,8 @@ static int dt2801_dio_insn_bits(struct comedi_device * dev, struct comedi_subdev
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int dt2801_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2801_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int which = 0;
|
||||
|
||||
|
@ -214,8 +214,8 @@ static const struct dt2811_board boardtypes[] = {
|
||||
|
||||
#define this_board ((const struct dt2811_board *)dev->board_ptr)
|
||||
|
||||
static int dt2811_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dt2811_detach(struct comedi_device * dev);
|
||||
static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dt2811_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_dt2811 = {
|
||||
driver_name:"dt2811",
|
||||
module:THIS_MODULE,
|
||||
@ -228,16 +228,16 @@ static struct comedi_driver driver_dt2811 = {
|
||||
|
||||
COMEDI_INITCLEANUP(driver_dt2811);
|
||||
|
||||
static int dt2811_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int dt2811_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int dt2811_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int dt2811_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int dt2811_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int dt2811_ai_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int dt2811_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int dt2811_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int dt2811_di_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int dt2811_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
enum { card_2811_pgh, card_2811_pgl };
|
||||
|
||||
@ -311,7 +311,7 @@ static irqreturn_t dt2811_interrupt(int irq, void *d)
|
||||
2 == unipolar 5V (0V -- +5V)
|
||||
*/
|
||||
|
||||
static int dt2811_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
/* int i, irq; */
|
||||
/* unsigned long irqs; */
|
||||
@ -480,7 +480,7 @@ static int dt2811_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt2811_detach(struct comedi_device * dev)
|
||||
static int dt2811_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: dt2811: remove\n", dev->minor);
|
||||
|
||||
@ -494,8 +494,8 @@ static int dt2811_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt2811_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2811_ai_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
int timeout = DT2811_TIMEOUT;
|
||||
@ -521,7 +521,7 @@ static int dt2811_ai_insn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
#if 0
|
||||
/* Wow. This is code from the Comedi stone age. But it hasn't been
|
||||
* replaced, so I'll let it stay. */
|
||||
int dt2811_adtrig(kdev_t minor, comedi_adtrig * adtrig)
|
||||
int dt2811_adtrig(kdev_t minor, comedi_adtrig *adtrig)
|
||||
{
|
||||
struct comedi_device *dev = comedi_devices + minor;
|
||||
|
||||
@ -545,8 +545,8 @@ int dt2811_adtrig(kdev_t minor, comedi_adtrig * adtrig)
|
||||
}
|
||||
#endif
|
||||
|
||||
static int dt2811_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2811_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan;
|
||||
@ -563,8 +563,8 @@ static int dt2811_ao_insn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return i;
|
||||
}
|
||||
|
||||
static int dt2811_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2811_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan;
|
||||
@ -578,8 +578,8 @@ static int dt2811_ao_insn_read(struct comedi_device * dev, struct comedi_subdevi
|
||||
return i;
|
||||
}
|
||||
|
||||
static int dt2811_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2811_di_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -589,8 +589,8 @@ static int dt2811_di_insn_bits(struct comedi_device * dev, struct comedi_subdevi
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int dt2811_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2811_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
|
@ -59,8 +59,8 @@ addition, the clock does not seem to be very accurate.
|
||||
#define DT2814_ENB 0x10
|
||||
#define DT2814_CHANMASK 0x0f
|
||||
|
||||
static int dt2814_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dt2814_detach(struct comedi_device * dev);
|
||||
static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dt2814_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_dt2814 = {
|
||||
driver_name:"dt2814",
|
||||
module:THIS_MODULE,
|
||||
@ -83,8 +83,8 @@ struct dt2814_private {
|
||||
#define DT2814_TIMEOUT 10
|
||||
#define DT2814_MAX_SPEED 100000 /* Arbitrary 10 khz limit */
|
||||
|
||||
static int dt2814_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2814_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, i, hi, lo;
|
||||
int chan;
|
||||
@ -134,8 +134,8 @@ static int dt2814_ns_to_timer(unsigned int *ns, unsigned int flags)
|
||||
return i;
|
||||
}
|
||||
|
||||
static int dt2814_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int dt2814_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -226,7 +226,7 @@ static int dt2814_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt2814_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dt2814_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int chan;
|
||||
@ -245,7 +245,7 @@ static int dt2814_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
|
||||
}
|
||||
|
||||
static int dt2814_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int i, irq;
|
||||
int ret;
|
||||
@ -329,7 +329,7 @@ static int dt2814_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt2814_detach(struct comedi_device * dev)
|
||||
static int dt2814_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: dt2814: remove\n", dev->minor);
|
||||
|
||||
|
@ -75,8 +75,8 @@ static const struct comedi_lrange range_dt2815_ao_20_current = { 1, {
|
||||
#define DT2815_DATA 0
|
||||
#define DT2815_STATUS 1
|
||||
|
||||
static int dt2815_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dt2815_detach(struct comedi_device * dev);
|
||||
static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dt2815_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_dt2815 = {
|
||||
driver_name:"dt2815",
|
||||
module:THIS_MODULE,
|
||||
@ -86,7 +86,7 @@ static struct comedi_driver driver_dt2815 = {
|
||||
|
||||
COMEDI_INITCLEANUP(driver_dt2815);
|
||||
|
||||
static void dt2815_free_resources(struct comedi_device * dev);
|
||||
static void dt2815_free_resources(struct comedi_device *dev);
|
||||
|
||||
struct dt2815_private {
|
||||
|
||||
@ -97,7 +97,7 @@ struct dt2815_private {
|
||||
|
||||
#define devpriv ((struct dt2815_private *)dev->private)
|
||||
|
||||
static int dt2815_wait_for_status(struct comedi_device * dev, int status)
|
||||
static int dt2815_wait_for_status(struct comedi_device *dev, int status)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -108,8 +108,8 @@ static int dt2815_wait_for_status(struct comedi_device * dev, int status)
|
||||
return status;
|
||||
}
|
||||
|
||||
static int dt2815_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2815_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -121,8 +121,8 @@ static int dt2815_ao_insn_read(struct comedi_device * dev, struct comedi_subdevi
|
||||
return i;
|
||||
}
|
||||
|
||||
static int dt2815_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2815_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -179,7 +179,7 @@ static int dt2815_ao_insn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
1 == current
|
||||
*/
|
||||
|
||||
static int dt2815_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int i;
|
||||
@ -248,13 +248,13 @@ static int dt2815_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dt2815_free_resources(struct comedi_device * dev)
|
||||
static void dt2815_free_resources(struct comedi_device *dev)
|
||||
{
|
||||
if (dev->iobase)
|
||||
release_region(dev->iobase, DT2815_SIZE);
|
||||
}
|
||||
|
||||
static int dt2815_detach(struct comedi_device * dev)
|
||||
static int dt2815_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: dt2815: remove\n", dev->minor);
|
||||
|
||||
|
@ -47,8 +47,8 @@ Configuration options:
|
||||
#define DT2817_CR 0
|
||||
#define DT2817_DATA 1
|
||||
|
||||
static int dt2817_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dt2817_detach(struct comedi_device * dev);
|
||||
static int dt2817_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dt2817_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_dt2817 = {
|
||||
driver_name:"dt2817",
|
||||
module:THIS_MODULE,
|
||||
@ -58,8 +58,8 @@ static struct comedi_driver driver_dt2817 = {
|
||||
|
||||
COMEDI_INITCLEANUP(driver_dt2817);
|
||||
|
||||
static int dt2817_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2817_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int mask;
|
||||
int chan;
|
||||
@ -96,8 +96,8 @@ static int dt2817_dio_insn_config(struct comedi_device * dev, struct comedi_subd
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dt2817_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt2817_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int changed;
|
||||
|
||||
@ -131,7 +131,7 @@ static int dt2817_dio_insn_bits(struct comedi_device * dev, struct comedi_subdev
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int dt2817_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dt2817_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int ret;
|
||||
struct comedi_subdevice *s;
|
||||
@ -167,7 +167,7 @@ static int dt2817_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt2817_detach(struct comedi_device * dev)
|
||||
static int dt2817_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: dt2817: remove\n", dev->minor);
|
||||
|
||||
|
@ -394,8 +394,8 @@ struct dt282x_private {
|
||||
if(_i){b} \
|
||||
}while(0)
|
||||
|
||||
static int dt282x_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dt282x_detach(struct comedi_device * dev);
|
||||
static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dt282x_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_dt282x = {
|
||||
driver_name:"dt282x",
|
||||
module:THIS_MODULE,
|
||||
@ -408,17 +408,17 @@ static struct comedi_driver driver_dt282x = {
|
||||
|
||||
COMEDI_INITCLEANUP(driver_dt282x);
|
||||
|
||||
static void free_resources(struct comedi_device * dev);
|
||||
static int prep_ai_dma(struct comedi_device * dev, int chan, int size);
|
||||
static int prep_ao_dma(struct comedi_device * dev, int chan, int size);
|
||||
static int dt282x_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int dt282x_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void free_resources(struct comedi_device *dev);
|
||||
static int prep_ai_dma(struct comedi_device *dev, int chan, int size);
|
||||
static int prep_ao_dma(struct comedi_device *dev, int chan, int size);
|
||||
static int dt282x_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
static int dt282x_ao_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
static int dt282x_ns_to_timer(int *nanosec, int round_mode);
|
||||
static void dt282x_disable_dma(struct comedi_device * dev);
|
||||
static void dt282x_disable_dma(struct comedi_device *dev);
|
||||
|
||||
static int dt282x_grab_dma(struct comedi_device * dev, int dma1, int dma2);
|
||||
static int dt282x_grab_dma(struct comedi_device *dev, int dma1, int dma2);
|
||||
|
||||
static void dt282x_munge(struct comedi_device * dev, short * buf,
|
||||
static void dt282x_munge(struct comedi_device *dev, short *buf,
|
||||
unsigned int nbytes)
|
||||
{
|
||||
unsigned int i;
|
||||
@ -440,7 +440,7 @@ static void dt282x_munge(struct comedi_device * dev, short * buf,
|
||||
}
|
||||
}
|
||||
|
||||
static void dt282x_ao_dma_interrupt(struct comedi_device * dev)
|
||||
static void dt282x_ao_dma_interrupt(struct comedi_device *dev)
|
||||
{
|
||||
void *ptr;
|
||||
int size;
|
||||
@ -472,7 +472,7 @@ static void dt282x_ao_dma_interrupt(struct comedi_device * dev)
|
||||
return;
|
||||
}
|
||||
|
||||
static void dt282x_ai_dma_interrupt(struct comedi_device * dev)
|
||||
static void dt282x_ai_dma_interrupt(struct comedi_device *dev)
|
||||
{
|
||||
void *ptr;
|
||||
int size;
|
||||
@ -524,7 +524,7 @@ static void dt282x_ai_dma_interrupt(struct comedi_device * dev)
|
||||
prep_ai_dma(dev, i, 0);
|
||||
}
|
||||
|
||||
static int prep_ai_dma(struct comedi_device * dev, int dma_index, int n)
|
||||
static int prep_ai_dma(struct comedi_device *dev, int dma_index, int n)
|
||||
{
|
||||
int dma_chan;
|
||||
unsigned long dma_ptr;
|
||||
@ -555,7 +555,7 @@ static int prep_ai_dma(struct comedi_device * dev, int dma_index, int n)
|
||||
return n;
|
||||
}
|
||||
|
||||
static int prep_ao_dma(struct comedi_device * dev, int dma_index, int n)
|
||||
static int prep_ao_dma(struct comedi_device *dev, int dma_index, int n)
|
||||
{
|
||||
int dma_chan;
|
||||
unsigned long dma_ptr;
|
||||
@ -653,7 +653,7 @@ static irqreturn_t dt282x_interrupt(int irq, void *d)
|
||||
return IRQ_RETVAL(handled);
|
||||
}
|
||||
|
||||
static void dt282x_load_changain(struct comedi_device * dev, int n,
|
||||
static void dt282x_load_changain(struct comedi_device *dev, int n,
|
||||
unsigned int *chanlist)
|
||||
{
|
||||
unsigned int i;
|
||||
@ -674,8 +674,8 @@ static void dt282x_load_changain(struct comedi_device * dev, int n,
|
||||
* - preload multiplexer
|
||||
* - trigger conversion and wait for it to finish
|
||||
*/
|
||||
static int dt282x_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt282x_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -706,8 +706,8 @@ static int dt282x_ai_insn_read(struct comedi_device * dev, struct comedi_subdevi
|
||||
return i;
|
||||
}
|
||||
|
||||
static int dt282x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int dt282x_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -818,7 +818,7 @@ static int dt282x_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt282x_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dt282x_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int timer;
|
||||
@ -879,7 +879,7 @@ static int dt282x_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void dt282x_disable_dma(struct comedi_device * dev)
|
||||
static void dt282x_disable_dma(struct comedi_device *dev)
|
||||
{
|
||||
if (devpriv->usedma) {
|
||||
disable_dma(devpriv->dma[0].chan);
|
||||
@ -887,7 +887,7 @@ static void dt282x_disable_dma(struct comedi_device * dev)
|
||||
}
|
||||
}
|
||||
|
||||
static int dt282x_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dt282x_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
dt282x_disable_dma(dev);
|
||||
|
||||
@ -937,16 +937,16 @@ static int dt282x_ns_to_timer(int *nanosec, int round_mode)
|
||||
* offset binary if necessary, loads the data into the DAC
|
||||
* data register, and performs the conversion.
|
||||
*/
|
||||
static int dt282x_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt282x_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = devpriv->ao[CR_CHAN(insn->chanspec)];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dt282x_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt282x_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
short d;
|
||||
unsigned int chan;
|
||||
@ -978,8 +978,8 @@ static int dt282x_ao_insn_write(struct comedi_device * dev, struct comedi_subdev
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dt282x_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int dt282x_ao_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -1069,7 +1069,7 @@ static int dt282x_ao_cmdtest(struct comedi_device * dev, struct comedi_subdevice
|
||||
|
||||
}
|
||||
|
||||
static int dt282x_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int dt282x_ao_inttrig(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned int x)
|
||||
{
|
||||
int size;
|
||||
@ -1099,7 +1099,7 @@ static int dt282x_ao_inttrig(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int dt282x_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dt282x_ao_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
int timer;
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
@ -1132,7 +1132,7 @@ static int dt282x_ao_cmd(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt282x_ao_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dt282x_ao_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
dt282x_disable_dma(dev);
|
||||
|
||||
@ -1145,8 +1145,8 @@ static int dt282x_ao_cancel(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt282x_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt282x_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (data[0]) {
|
||||
s->state &= ~data[0];
|
||||
@ -1159,8 +1159,8 @@ static int dt282x_dio_insn_bits(struct comedi_device * dev, struct comedi_subdev
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int dt282x_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt282x_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int mask;
|
||||
|
||||
@ -1240,7 +1240,7 @@ enum { opt_iobase = 0, opt_irq, opt_dma1, opt_dma2, /* i/o base, irq, dma channe
|
||||
9 ao0 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V, 4=±2.5 V
|
||||
10 ao1 0=±10 V, 1=0-10 V, 2=±5 V, 3=0-5 V, 4=±2.5 V
|
||||
*/
|
||||
static int dt282x_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int i, irq;
|
||||
int ret;
|
||||
@ -1396,7 +1396,7 @@ static int dt282x_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void free_resources(struct comedi_device * dev)
|
||||
static void free_resources(struct comedi_device *dev)
|
||||
{
|
||||
if (dev->irq) {
|
||||
comedi_free_irq(dev->irq, dev);
|
||||
@ -1415,7 +1415,7 @@ static void free_resources(struct comedi_device * dev)
|
||||
}
|
||||
}
|
||||
|
||||
static int dt282x_detach(struct comedi_device * dev)
|
||||
static int dt282x_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: dt282x: remove\n", dev->minor);
|
||||
|
||||
@ -1424,7 +1424,7 @@ static int dt282x_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt282x_grab_dma(struct comedi_device * dev, int dma1, int dma2)
|
||||
static int dt282x_grab_dma(struct comedi_device *dev, int dma1, int dma2)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -275,8 +275,8 @@ struct dt3k_private {
|
||||
|
||||
#define devpriv ((struct dt3k_private *)dev->private)
|
||||
|
||||
static int dt3000_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dt3000_detach(struct comedi_device * dev);
|
||||
static int dt3000_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dt3000_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_dt3000 = {
|
||||
driver_name:"dt3000",
|
||||
module:THIS_MODULE,
|
||||
@ -286,17 +286,17 @@ static struct comedi_driver driver_dt3000 = {
|
||||
|
||||
COMEDI_PCI_INITCLEANUP(driver_dt3000, dt3k_pci_table);
|
||||
|
||||
static void dt3k_ai_empty_fifo(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void dt3k_ai_empty_fifo(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *arg,
|
||||
unsigned int round_mode);
|
||||
static int dt3k_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int dt3k_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
#ifdef DEBUG
|
||||
static void debug_intr_flags(unsigned int flags);
|
||||
#endif
|
||||
|
||||
#define TIMEOUT 100
|
||||
|
||||
static int dt3k_send_cmd(struct comedi_device * dev, unsigned int cmd)
|
||||
static int dt3k_send_cmd(struct comedi_device *dev, unsigned int cmd)
|
||||
{
|
||||
int i;
|
||||
unsigned int status = 0;
|
||||
@ -318,7 +318,7 @@ static int dt3k_send_cmd(struct comedi_device * dev, unsigned int cmd)
|
||||
return -ETIME;
|
||||
}
|
||||
|
||||
static unsigned int dt3k_readsingle(struct comedi_device * dev, unsigned int subsys,
|
||||
static unsigned int dt3k_readsingle(struct comedi_device *dev, unsigned int subsys,
|
||||
unsigned int chan, unsigned int gain)
|
||||
{
|
||||
writew(subsys, devpriv->io_addr + DPR_SubSys);
|
||||
@ -331,7 +331,7 @@ static unsigned int dt3k_readsingle(struct comedi_device * dev, unsigned int sub
|
||||
return readw(devpriv->io_addr + DPR_Params(2));
|
||||
}
|
||||
|
||||
static void dt3k_writesingle(struct comedi_device * dev, unsigned int subsys,
|
||||
static void dt3k_writesingle(struct comedi_device *dev, unsigned int subsys,
|
||||
unsigned int chan, unsigned int data)
|
||||
{
|
||||
writew(subsys, devpriv->io_addr + DPR_SubSys);
|
||||
@ -400,7 +400,7 @@ static void debug_intr_flags(unsigned int flags)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void dt3k_ai_empty_fifo(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void dt3k_ai_empty_fifo(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
int front;
|
||||
int rear;
|
||||
@ -429,8 +429,8 @@ static void dt3k_ai_empty_fifo(struct comedi_device * dev, struct comedi_subdevi
|
||||
writew(rear, devpriv->io_addr + DPR_AD_Buf_Rear);
|
||||
}
|
||||
|
||||
static int dt3k_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int dt3k_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -591,7 +591,7 @@ static int dt3k_ns_to_timer(unsigned int timer_base, unsigned int *nanosec,
|
||||
return (prescale << 16) | (divider);
|
||||
}
|
||||
|
||||
static int dt3k_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dt3k_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
int i;
|
||||
@ -659,7 +659,7 @@ static int dt3k_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt3k_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int dt3k_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
int ret;
|
||||
|
||||
@ -671,8 +671,8 @@ static int dt3k_ai_cancel(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt3k_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt3k_ai_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
unsigned int chan, gain, aref;
|
||||
@ -689,8 +689,8 @@ static int dt3k_ai_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return i;
|
||||
}
|
||||
|
||||
static int dt3k_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt3k_ao_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
unsigned int chan;
|
||||
@ -704,8 +704,8 @@ static int dt3k_ao_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return i;
|
||||
}
|
||||
|
||||
static int dt3k_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt3k_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
unsigned int chan;
|
||||
@ -718,7 +718,7 @@ static int dt3k_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice
|
||||
return i;
|
||||
}
|
||||
|
||||
static void dt3k_dio_config(struct comedi_device * dev, int bits)
|
||||
static void dt3k_dio_config(struct comedi_device *dev, int bits)
|
||||
{
|
||||
/* XXX */
|
||||
writew(SUBS_DOUT, devpriv->io_addr + DPR_SubSys);
|
||||
@ -733,8 +733,8 @@ static void dt3k_dio_config(struct comedi_device * dev, int bits)
|
||||
dt3k_send_cmd(dev, CMD_CONFIG);
|
||||
}
|
||||
|
||||
static int dt3k_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt3k_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int mask;
|
||||
|
||||
@ -764,8 +764,8 @@ static int dt3k_dio_insn_config(struct comedi_device * dev, struct comedi_subdev
|
||||
return insn->n;
|
||||
}
|
||||
|
||||
static int dt3k_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt3k_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -780,8 +780,8 @@ static int dt3k_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevic
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int dt3k_mem_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dt3k_mem_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int addr = CR_CHAN(insn->chanspec);
|
||||
int i;
|
||||
@ -799,9 +799,9 @@ static int dt3k_mem_insn_read(struct comedi_device * dev, struct comedi_subdevic
|
||||
return i;
|
||||
}
|
||||
|
||||
static int dt_pci_probe(struct comedi_device * dev, int bus, int slot);
|
||||
static int dt_pci_probe(struct comedi_device *dev, int bus, int slot);
|
||||
|
||||
static int dt3000_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dt3000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int bus, slot;
|
||||
@ -890,7 +890,7 @@ static int dt3000_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dt3000_detach(struct comedi_device * dev)
|
||||
static int dt3000_detach(struct comedi_device *dev)
|
||||
{
|
||||
if (dev->irq)
|
||||
comedi_free_irq(dev->irq, dev);
|
||||
@ -911,9 +911,9 @@ static int dt3000_detach(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
static struct pci_dev *dt_pci_find_device(struct pci_dev *from, int *board);
|
||||
static int setup_pci(struct comedi_device * dev);
|
||||
static int setup_pci(struct comedi_device *dev);
|
||||
|
||||
static int dt_pci_probe(struct comedi_device * dev, int bus, int slot)
|
||||
static int dt_pci_probe(struct comedi_device *dev, int bus, int slot)
|
||||
{
|
||||
int board;
|
||||
int ret;
|
||||
@ -941,7 +941,7 @@ static int dt_pci_probe(struct comedi_device * dev, int bus, int slot)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int setup_pci(struct comedi_device * dev)
|
||||
static int setup_pci(struct comedi_device *dev)
|
||||
{
|
||||
resource_size_t addr;
|
||||
int ret;
|
||||
|
@ -42,8 +42,8 @@ static const struct comedi_lrange range_fl512 = { 4, {
|
||||
}
|
||||
};
|
||||
|
||||
static int fl512_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int fl512_detach(struct comedi_device * dev);
|
||||
static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int fl512_detach(struct comedi_device *dev);
|
||||
|
||||
static struct comedi_driver driver_fl512 = {
|
||||
driver_name:"fl512",
|
||||
@ -54,18 +54,18 @@ static struct comedi_driver driver_fl512 = {
|
||||
|
||||
COMEDI_INITCLEANUP(driver_fl512);
|
||||
|
||||
static int fl512_ai_insn(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int fl512_ao_insn(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int fl512_ao_insn_readback(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int fl512_ai_insn(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
static int fl512_ao_insn(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
static int fl512_ao_insn_readback(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
/*
|
||||
* fl512_ai_insn : this is the analog input function
|
||||
*/
|
||||
static int fl512_ai_insn(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int fl512_ai_insn(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n;
|
||||
unsigned int lo_byte, hi_byte;
|
||||
@ -89,8 +89,8 @@ static int fl512_ai_insn(struct comedi_device * dev,
|
||||
/*
|
||||
* fl512_ao_insn : used to write to a DA port n times
|
||||
*/
|
||||
static int fl512_ao_insn(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int fl512_ao_insn(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n;
|
||||
int chan = CR_CHAN(insn->chanspec); /* get chan to write */
|
||||
@ -110,8 +110,8 @@ static int fl512_ao_insn(struct comedi_device * dev,
|
||||
* fl512_ao_insn_readback : used to read previous values written to
|
||||
* DA port
|
||||
*/
|
||||
static int fl512_ao_insn_readback(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int fl512_ao_insn_readback(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -126,7 +126,7 @@ static int fl512_ao_insn_readback(struct comedi_device * dev,
|
||||
/*
|
||||
* start attach
|
||||
*/
|
||||
static int fl512_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
unsigned long iobase;
|
||||
struct comedi_subdevice *s; /* pointer to the subdevice:
|
||||
@ -177,7 +177,7 @@ static int fl512_attach(struct comedi_device * dev, struct comedi_devconfig * it
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int fl512_detach(struct comedi_device * dev)
|
||||
static int fl512_detach(struct comedi_device *dev)
|
||||
{
|
||||
if (dev->iobase)
|
||||
release_region(dev->iobase, FL512_SIZE);
|
||||
|
@ -340,8 +340,8 @@ static struct comedi_driver driver_hpdi = {
|
||||
|
||||
COMEDI_PCI_INITCLEANUP(driver_hpdi, hpdi_pci_table);
|
||||
|
||||
static int dio_config_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int dio_config_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
switch (data[0]) {
|
||||
case INSN_CONFIG_DIO_OUTPUT:
|
||||
@ -368,13 +368,13 @@ static int dio_config_insn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static void disable_plx_interrupts(struct comedi_device * dev)
|
||||
static void disable_plx_interrupts(struct comedi_device *dev)
|
||||
{
|
||||
writel(0, priv(dev)->plx9080_iobase + PLX_INTRCS_REG);
|
||||
}
|
||||
|
||||
/* initialize plx9080 chip */
|
||||
static void init_plx9080(struct comedi_device * dev)
|
||||
static void init_plx9080(struct comedi_device *dev)
|
||||
{
|
||||
uint32_t bits;
|
||||
void *plx_iobase = priv(dev)->plx9080_iobase;
|
||||
@ -439,7 +439,7 @@ static void init_plx9080(struct comedi_device * dev)
|
||||
|
||||
/* Allocate and initialize the subdevice structures.
|
||||
*/
|
||||
static int setup_subdevices(struct comedi_device * dev)
|
||||
static int setup_subdevices(struct comedi_device *dev)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
|
||||
@ -465,7 +465,7 @@ static int setup_subdevices(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int init_hpdi(struct comedi_device * dev)
|
||||
static int init_hpdi(struct comedi_device *dev)
|
||||
{
|
||||
uint32_t plx_intcsr_bits;
|
||||
|
||||
@ -494,7 +494,7 @@ static int init_hpdi(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
/* setup dma descriptors so a link completes every 'transfer_size' bytes */
|
||||
static int setup_dma_descriptors(struct comedi_device * dev,
|
||||
static int setup_dma_descriptors(struct comedi_device *dev,
|
||||
unsigned int transfer_size)
|
||||
{
|
||||
unsigned int buffer_index, buffer_offset;
|
||||
@ -556,7 +556,7 @@ static int setup_dma_descriptors(struct comedi_device * dev,
|
||||
return transfer_size;
|
||||
}
|
||||
|
||||
static int hpdi_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int hpdi_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct pci_dev *pcidev;
|
||||
int i;
|
||||
@ -665,7 +665,7 @@ static int hpdi_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
return init_hpdi(dev);
|
||||
}
|
||||
|
||||
static int hpdi_detach(struct comedi_device * dev)
|
||||
static int hpdi_detach(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
@ -706,7 +706,7 @@ static int hpdi_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dio_config_block_size(struct comedi_device * dev, unsigned int * data)
|
||||
static int dio_config_block_size(struct comedi_device *dev, unsigned int *data)
|
||||
{
|
||||
unsigned int requested_block_size;
|
||||
int retval;
|
||||
@ -722,8 +722,8 @@ static int dio_config_block_size(struct comedi_device * dev, unsigned int * data
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int di_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int di_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -822,8 +822,8 @@ static int di_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hpdi_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int hpdi_cmd_test(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
if (priv(dev)->dio_config_output) {
|
||||
return -EINVAL;
|
||||
@ -831,14 +831,14 @@ static int hpdi_cmd_test(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
return di_cmd_test(dev, s, cmd);
|
||||
}
|
||||
|
||||
static inline void hpdi_writel(struct comedi_device * dev, uint32_t bits,
|
||||
static inline void hpdi_writel(struct comedi_device *dev, uint32_t bits,
|
||||
unsigned int offset)
|
||||
{
|
||||
writel(bits | priv(dev)->bits[offset / sizeof(uint32_t)],
|
||||
priv(dev)->hpdi_iobase + offset);
|
||||
}
|
||||
|
||||
static int di_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int di_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
uint32_t bits;
|
||||
unsigned long flags;
|
||||
@ -891,7 +891,7 @@ static int di_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int hpdi_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int hpdi_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
if (priv(dev)->dio_config_output) {
|
||||
return -EINVAL;
|
||||
@ -899,7 +899,7 @@ static int hpdi_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return di_cmd(dev, s);
|
||||
}
|
||||
|
||||
static void drain_dma_buffers(struct comedi_device * dev, unsigned int channel)
|
||||
static void drain_dma_buffers(struct comedi_device *dev, unsigned int channel)
|
||||
{
|
||||
struct comedi_async *async = dev->read_subdev->async;
|
||||
uint32_t next_transfer_addr;
|
||||
@ -1036,7 +1036,7 @@ static irqreturn_t handle_interrupt(int irq, void *d)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
void abort_dma(struct comedi_device * dev, unsigned int channel)
|
||||
void abort_dma(struct comedi_device *dev, unsigned int channel)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -1048,7 +1048,7 @@ void abort_dma(struct comedi_device * dev, unsigned int channel)
|
||||
comedi_spin_unlock_irqrestore(&dev->spinlock, flags);
|
||||
}
|
||||
|
||||
static int hpdi_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int hpdi_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
hpdi_writel(dev, 0, BOARD_CONTROL_REG);
|
||||
|
||||
|
@ -158,8 +158,8 @@ struct pci20xxx_private {
|
||||
#define devpriv ((struct pci20xxx_private *)dev->private)
|
||||
#define CHAN (CR_CHAN(it->chanlist[0]))
|
||||
|
||||
static int pci20xxx_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int pci20xxx_detach(struct comedi_device * dev);
|
||||
static int pci20xxx_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int pci20xxx_detach(struct comedi_device *dev);
|
||||
|
||||
static struct comedi_driver driver_pci20xxx = {
|
||||
driver_name:"ii_pci20kc",
|
||||
@ -168,11 +168,11 @@ static struct comedi_driver driver_pci20xxx = {
|
||||
detach:pci20xxx_detach,
|
||||
};
|
||||
|
||||
static int pci20006_init(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int pci20006_init(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int opt0, int opt1);
|
||||
static int pci20341_init(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int pci20341_init(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int opt0, int opt1);
|
||||
static int pci20xxx_dio_init(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int pci20xxx_dio_init(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
|
||||
/*
|
||||
options[0] Board base address
|
||||
@ -201,7 +201,7 @@ static int pci20xxx_dio_init(struct comedi_device * dev, struct comedi_subdevice
|
||||
1 == unipolar 10V (0V -- +10V)
|
||||
2 == bipolar 5V (-5V -- +5V)
|
||||
*/
|
||||
static int pci20xxx_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int pci20xxx_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
unsigned char i;
|
||||
int ret;
|
||||
@ -263,7 +263,7 @@ static int pci20xxx_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int pci20xxx_detach(struct comedi_device * dev)
|
||||
static int pci20xxx_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: pci20xxx: remove\n", dev->minor);
|
||||
|
||||
@ -272,10 +272,10 @@ static int pci20xxx_detach(struct comedi_device * dev)
|
||||
|
||||
/* pci20006m */
|
||||
|
||||
static int pci20006_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int pci20006_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int pci20006_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int pci20006_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static const struct comedi_lrange *pci20006_range_list[] = {
|
||||
&range_bipolar10,
|
||||
@ -283,7 +283,7 @@ static const struct comedi_lrange *pci20006_range_list[] = {
|
||||
&range_bipolar5,
|
||||
};
|
||||
|
||||
static int pci20006_init(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int pci20006_init(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int opt0, int opt1)
|
||||
{
|
||||
union pci20xxx_subdev_private *sdp = s->private;
|
||||
@ -308,8 +308,8 @@ static int pci20006_init(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pci20006_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci20006_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
union pci20xxx_subdev_private *sdp = s->private;
|
||||
|
||||
@ -318,8 +318,8 @@ static int pci20006_insn_read(struct comedi_device * dev, struct comedi_subdevic
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int pci20006_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci20006_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
union pci20xxx_subdev_private *sdp = s->private;
|
||||
int hi, lo;
|
||||
@ -351,8 +351,8 @@ static int pci20006_insn_write(struct comedi_device * dev, struct comedi_subdevi
|
||||
|
||||
/* PCI20341M */
|
||||
|
||||
static int pci20341_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int pci20341_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static const int pci20341_timebase[] = { 0x00, 0x00, 0x00, 0x04 };
|
||||
static const int pci20341_settling_time[] = { 0x58, 0x58, 0x93, 0x99 };
|
||||
@ -368,7 +368,7 @@ static const struct comedi_lrange *const pci20341_ranges[] = {
|
||||
&range_bipolar0_025,
|
||||
};
|
||||
|
||||
static int pci20341_init(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int pci20341_init(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int opt0, int opt1)
|
||||
{
|
||||
union pci20xxx_subdev_private *sdp = s->private;
|
||||
@ -399,8 +399,8 @@ static int pci20341_init(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pci20341_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci20341_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
union pci20xxx_subdev_private *sdp = s->private;
|
||||
unsigned int i = 0, j = 0;
|
||||
@ -445,14 +445,14 @@ static int pci20341_insn_read(struct comedi_device * dev, struct comedi_subdevic
|
||||
|
||||
/* native DIO */
|
||||
|
||||
static void pci20xxx_dio_config(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int pci20xxx_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int pci20xxx_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static void pci20xxx_dio_config(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
static int pci20xxx_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int pci20xxx_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
/* initialize struct pci20xxx_private */
|
||||
static int pci20xxx_dio_init(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int pci20xxx_dio_init(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
|
||||
s->type = COMEDI_SUBD_DIO;
|
||||
@ -471,8 +471,8 @@ static int pci20xxx_dio_init(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pci20xxx_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci20xxx_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int mask, bits;
|
||||
|
||||
@ -496,8 +496,8 @@ static int pci20xxx_dio_insn_config(struct comedi_device * dev, struct comedi_su
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int pci20xxx_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int pci20xxx_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int mask = data[0];
|
||||
|
||||
@ -526,7 +526,7 @@ static int pci20xxx_dio_insn_bits(struct comedi_device * dev, struct comedi_subd
|
||||
return 2;
|
||||
}
|
||||
|
||||
static void pci20xxx_dio_config(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci20xxx_dio_config(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned char control_01;
|
||||
unsigned char control_23;
|
||||
@ -582,7 +582,7 @@ static void pci20xxx_dio_config(struct comedi_device * dev, struct comedi_subdev
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void pci20xxx_do(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void pci20xxx_do(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
/* XXX if the channel is configured for input, does this
|
||||
do bad things? */
|
||||
@ -595,7 +595,7 @@ static void pci20xxx_do(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
writeb((s->state >> 24) & 0xff, devpriv->ioaddr + PCI20000_DIO_3);
|
||||
}
|
||||
|
||||
static unsigned int pci20xxx_di(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static unsigned int pci20xxx_di(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
/* XXX same note as above */
|
||||
unsigned int bits;
|
||||
|
@ -54,8 +54,8 @@ Devices: [JR3] PCI force sensor board (jr3_pci)
|
||||
#define PCI_DEVICE_ID_JR3_3_CHANNEL 0x3113
|
||||
#define PCI_DEVICE_ID_JR3_4_CHANNEL 0x3114
|
||||
|
||||
static int jr3_pci_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int jr3_pci_detach(struct comedi_device * dev);
|
||||
static int jr3_pci_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int jr3_pci_detach(struct comedi_device *dev);
|
||||
|
||||
static struct comedi_driver driver_jr3_pci = {
|
||||
driver_name:"jr3_pci",
|
||||
@ -259,8 +259,8 @@ static struct six_axis_t get_max_full_scales(volatile struct jr3_channel *channe
|
||||
return result;
|
||||
}
|
||||
|
||||
static int jr3_pci_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int jr3_pci_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int result;
|
||||
struct jr3_pci_subdev_private *p;
|
||||
@ -375,7 +375,7 @@ static int jr3_pci_ai_insn_read(struct comedi_device * dev, struct comedi_subdev
|
||||
return result;
|
||||
}
|
||||
|
||||
static void jr3_pci_open(struct comedi_device * dev)
|
||||
static void jr3_pci_open(struct comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
struct jr3_pci_dev_private *devpriv = dev->private;
|
||||
@ -392,7 +392,7 @@ static void jr3_pci_open(struct comedi_device * dev)
|
||||
}
|
||||
}
|
||||
|
||||
int read_idm_word(const u8 * data, size_t size, int *pos, unsigned int *val)
|
||||
int read_idm_word(const u8 *data, size_t size, int *pos, unsigned int *val)
|
||||
{
|
||||
int result = 0;
|
||||
if (pos != 0 && val != 0) {
|
||||
@ -414,7 +414,7 @@ int read_idm_word(const u8 * data, size_t size, int *pos, unsigned int *val)
|
||||
return result;
|
||||
}
|
||||
|
||||
static int jr3_download_firmware(struct comedi_device * dev, const u8 * data,
|
||||
static int jr3_download_firmware(struct comedi_device *dev, const u8 *data,
|
||||
size_t size)
|
||||
{
|
||||
/*
|
||||
@ -513,7 +513,7 @@ static int jr3_download_firmware(struct comedi_device * dev, const u8 * data,
|
||||
return result;
|
||||
}
|
||||
|
||||
static struct poll_delay_t jr3_pci_poll_subdevice(struct comedi_subdevice * s)
|
||||
static struct poll_delay_t jr3_pci_poll_subdevice(struct comedi_subdevice *s)
|
||||
{
|
||||
struct poll_delay_t result = poll_delay_min_max(1000, 2000);
|
||||
struct jr3_pci_subdev_private *p = s->private;
|
||||
@ -763,7 +763,7 @@ static void jr3_pci_poll_dev(unsigned long data)
|
||||
add_timer(&devpriv->timer);
|
||||
}
|
||||
|
||||
static int jr3_pci_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int jr3_pci_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int result = 0;
|
||||
struct pci_dev *card = NULL;
|
||||
@ -938,7 +938,7 @@ static int jr3_pci_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return result;
|
||||
}
|
||||
|
||||
static int jr3_pci_detach(struct comedi_device * dev)
|
||||
static int jr3_pci_detach(struct comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
struct jr3_pci_dev_private *devpriv = dev->private;
|
||||
|
@ -2,22 +2,22 @@
|
||||
* is 16 bits, but aligned on a 32 bit PCI boundary
|
||||
*/
|
||||
|
||||
static inline u16 get_u16(volatile const u32 * p)
|
||||
static inline u16 get_u16(volatile const u32 *p)
|
||||
{
|
||||
return (u16) readl(p);
|
||||
}
|
||||
|
||||
static inline void set_u16(volatile u32 * p, u16 val)
|
||||
static inline void set_u16(volatile u32 *p, u16 val)
|
||||
{
|
||||
writel(val, p);
|
||||
}
|
||||
|
||||
static inline s16 get_s16(volatile const s32 * p)
|
||||
static inline s16 get_s16(volatile const s32 *p)
|
||||
{
|
||||
return (s16) readl(p);
|
||||
}
|
||||
|
||||
static inline void set_s16(volatile s32 * p, s16 val)
|
||||
static inline void set_s16(volatile s32 *p, s16 val)
|
||||
{
|
||||
writel(val, p);
|
||||
}
|
||||
|
@ -48,8 +48,8 @@ Kolter Electronic PCI Counter Card.
|
||||
|
||||
/*-- function prototypes ----------------------------------------------------*/
|
||||
|
||||
static int cnt_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int cnt_detach(struct comedi_device * dev);
|
||||
static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int cnt_detach(struct comedi_device *dev);
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(cnt_pci_table) = {
|
||||
{PCI_VENDOR_ID_KOLTER, CNT_CARD_DEVICE_ID, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
|
||||
@ -103,8 +103,8 @@ COMEDI_PCI_INITCLEANUP(cnt_driver, cnt_pci_table);
|
||||
|
||||
/* This should be used only for resetting the counters; maybe it is better
|
||||
to make a special command 'reset'. */
|
||||
static int cnt_winsn(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int cnt_winsn(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
||||
@ -123,8 +123,8 @@ static int cnt_winsn(struct comedi_device * dev,
|
||||
|
||||
/*-- counter read -----------------------------------------------------------*/
|
||||
|
||||
static int cnt_rinsn(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int cnt_rinsn(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned char a0, a1, a2, a3, a4;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -148,7 +148,7 @@ static int cnt_rinsn(struct comedi_device * dev,
|
||||
|
||||
/*-- attach -----------------------------------------------------------------*/
|
||||
|
||||
static int cnt_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int cnt_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *subdevice;
|
||||
struct pci_dev *pci_device;
|
||||
@ -241,7 +241,7 @@ static int cnt_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
|
||||
/*-- detach -----------------------------------------------------------------*/
|
||||
|
||||
static int cnt_detach(struct comedi_device * dev)
|
||||
static int cnt_detach(struct comedi_device *dev)
|
||||
{
|
||||
if (devpriv && devpriv->pcidev) {
|
||||
if (dev->iobase) {
|
||||
|
@ -146,8 +146,8 @@ static const struct comedi_lrange range_mpc624_bipolar10 = {
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
static int mpc624_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int mpc624_detach(struct comedi_device * dev);
|
||||
static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int mpc624_detach(struct comedi_device *dev);
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
static struct comedi_driver driver_mpc624 = {
|
||||
driver_name:"mpc624",
|
||||
@ -157,10 +157,10 @@ static struct comedi_driver driver_mpc624 = {
|
||||
};
|
||||
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
static int mpc624_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int mpc624_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
/* ---------------------------------------------------------------------------- */
|
||||
static int mpc624_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase;
|
||||
@ -257,7 +257,7 @@ static int mpc624_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int mpc624_detach(struct comedi_device * dev)
|
||||
static int mpc624_detach(struct comedi_device *dev)
|
||||
{
|
||||
rt_printk("comedi%d: mpc624: remove\n", dev->minor);
|
||||
|
||||
@ -270,8 +270,8 @@ static int mpc624_detach(struct comedi_device * dev)
|
||||
/* Timeout 200ms */
|
||||
#define TIMEOUT 200
|
||||
|
||||
static int mpc624_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int mpc624_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n, i;
|
||||
unsigned long int data_in, data_out;
|
||||
|
@ -46,8 +46,8 @@ struct mpc8260cpm_private {
|
||||
|
||||
#define devpriv ((struct mpc8260cpm_private *)dev->private)
|
||||
|
||||
static int mpc8260cpm_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int mpc8260cpm_detach(struct comedi_device * dev);
|
||||
static int mpc8260cpm_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int mpc8260cpm_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_mpc8260cpm = {
|
||||
driver_name:"mpc8260cpm",
|
||||
module:THIS_MODULE,
|
||||
@ -57,12 +57,12 @@ static struct comedi_driver driver_mpc8260cpm = {
|
||||
|
||||
COMEDI_INITCLEANUP(driver_mpc8260cpm);
|
||||
|
||||
static int mpc8260cpm_dio_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int mpc8260cpm_dio_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int mpc8260cpm_dio_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int mpc8260cpm_dio_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int mpc8260cpm_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int mpc8260cpm_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int i;
|
||||
@ -93,7 +93,7 @@ static int mpc8260cpm_attach(struct comedi_device * dev, struct comedi_devconfig
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int mpc8260cpm_detach(struct comedi_device * dev)
|
||||
static int mpc8260cpm_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: mpc8260cpm: remove\n", dev->minor);
|
||||
|
||||
@ -114,8 +114,8 @@ static unsigned long *cpm_pdat(int port)
|
||||
}
|
||||
}
|
||||
|
||||
static int mpc8260cpm_dio_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int mpc8260cpm_dio_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n;
|
||||
unsigned int d;
|
||||
@ -157,8 +157,8 @@ static int mpc8260cpm_dio_config(struct comedi_device * dev, struct comedi_subde
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int mpc8260cpm_dio_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int mpc8260cpm_dio_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int port;
|
||||
unsigned long *p;
|
||||
|
@ -82,8 +82,8 @@ Devices: [Quanser Consulting] MultiQ-3 (multiq3)
|
||||
|
||||
#define MULTIQ3_TIMEOUT 30
|
||||
|
||||
static int multiq3_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int multiq3_detach(struct comedi_device * dev);
|
||||
static int multiq3_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int multiq3_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_multiq3 = {
|
||||
driver_name:"multiq3",
|
||||
module:THIS_MODULE,
|
||||
@ -98,8 +98,8 @@ struct multiq3_private {
|
||||
};
|
||||
#define devpriv ((struct multiq3_private *)dev->private)
|
||||
|
||||
static int multiq3_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int multiq3_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i, n;
|
||||
int chan;
|
||||
@ -134,8 +134,8 @@ static int multiq3_ai_insn_read(struct comedi_device * dev, struct comedi_subdev
|
||||
return n;
|
||||
}
|
||||
|
||||
static int multiq3_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int multiq3_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -147,8 +147,8 @@ static int multiq3_ao_insn_read(struct comedi_device * dev, struct comedi_subdev
|
||||
return i;
|
||||
}
|
||||
|
||||
static int multiq3_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int multiq3_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -165,8 +165,8 @@ static int multiq3_ao_insn_write(struct comedi_device * dev, struct comedi_subde
|
||||
return i;
|
||||
}
|
||||
|
||||
static int multiq3_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int multiq3_di_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -176,8 +176,8 @@ static int multiq3_di_insn_bits(struct comedi_device * dev, struct comedi_subdev
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int multiq3_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int multiq3_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -191,8 +191,8 @@ static int multiq3_do_insn_bits(struct comedi_device * dev, struct comedi_subdev
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int multiq3_encoder_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int multiq3_encoder_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int n;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -212,7 +212,7 @@ static int multiq3_encoder_insn_read(struct comedi_device * dev, struct comedi_s
|
||||
return n;
|
||||
}
|
||||
|
||||
static void encoder_reset(struct comedi_device * dev)
|
||||
static void encoder_reset(struct comedi_device *dev)
|
||||
{
|
||||
int chan;
|
||||
for (chan = 0; chan < dev->subdevices[4].n_chan; chan++) {
|
||||
@ -235,7 +235,7 @@ static void encoder_reset(struct comedi_device * dev)
|
||||
options[2] - number of encoder chips installed
|
||||
*/
|
||||
|
||||
static int multiq3_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int multiq3_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
int result = 0;
|
||||
unsigned long iobase;
|
||||
@ -318,7 +318,7 @@ static int multiq3_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int multiq3_detach(struct comedi_device * dev)
|
||||
static int multiq3_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: multiq3: remove\n", dev->minor);
|
||||
|
||||
|
@ -75,8 +75,8 @@ Updated: Sat, 25 Jan 2003 13:24:40 -0800
|
||||
#define Rising_Edge_Detection_Enable(x) (0x018+(x))
|
||||
#define Falling_Edge_Detection_Enable(x) (0x020+(x))
|
||||
|
||||
static int ni6527_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int ni6527_detach(struct comedi_device * dev);
|
||||
static int ni6527_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int ni6527_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_ni6527 = {
|
||||
driver_name:"ni6527",
|
||||
module:THIS_MODULE,
|
||||
@ -120,10 +120,10 @@ struct ni6527_private {
|
||||
|
||||
#define devpriv ((struct ni6527_private *)dev->private)
|
||||
|
||||
static int ni6527_find_device(struct comedi_device * dev, int bus, int slot);
|
||||
static int ni6527_find_device(struct comedi_device *dev, int bus, int slot);
|
||||
|
||||
static int ni6527_di_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni6527_di_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
unsigned int interval;
|
||||
@ -170,8 +170,8 @@ static int ni6527_di_insn_config(struct comedi_device * dev, struct comedi_subde
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ni6527_di_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni6527_di_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -183,8 +183,8 @@ static int ni6527_di_insn_bits(struct comedi_device * dev, struct comedi_subdevi
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ni6527_do_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni6527_do_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -233,8 +233,8 @@ static irqreturn_t ni6527_interrupt(int irq, void *d)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int ni6527_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int ni6527_intr_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -309,7 +309,7 @@ static int ni6527_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevi
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni6527_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int ni6527_intr_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
/* struct comedi_cmd *cmd = &s->async->cmd; */
|
||||
|
||||
@ -322,15 +322,15 @@ static int ni6527_intr_cmd(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni6527_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int ni6527_intr_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
writeb(0x00, devpriv->mite->daq_io_addr + Master_Interrupt_Control);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni6527_intr_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni6527_intr_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n < 1)
|
||||
return -EINVAL;
|
||||
@ -339,8 +339,8 @@ static int ni6527_intr_insn_bits(struct comedi_device * dev, struct comedi_subde
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ni6527_intr_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni6527_intr_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n < 1)
|
||||
return -EINVAL;
|
||||
@ -364,7 +364,7 @@ static int ni6527_intr_insn_config(struct comedi_device * dev, struct comedi_sub
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ni6527_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int ni6527_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret;
|
||||
@ -442,7 +442,7 @@ static int ni6527_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni6527_detach(struct comedi_device * dev)
|
||||
static int ni6527_detach(struct comedi_device *dev)
|
||||
{
|
||||
if (devpriv && devpriv->mite && devpriv->mite->daq_io_addr) {
|
||||
writeb(0x00,
|
||||
@ -460,7 +460,7 @@ static int ni6527_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni6527_find_device(struct comedi_device * dev, int bus, int slot)
|
||||
static int ni6527_find_device(struct comedi_device *dev, int bus, int slot)
|
||||
{
|
||||
struct mite_struct *mite;
|
||||
int i;
|
||||
|
@ -102,8 +102,8 @@ static inline unsigned Filter_Enable(unsigned port)
|
||||
#define OverflowIntEnable 0x02
|
||||
#define EdgeIntEnable 0x01
|
||||
|
||||
static int ni_65xx_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int ni_65xx_detach(struct comedi_device * dev);
|
||||
static int ni_65xx_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int ni_65xx_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_ni_65xx = {
|
||||
driver_name:"ni_65xx",
|
||||
module:THIS_MODULE,
|
||||
@ -249,7 +249,7 @@ static inline unsigned ni_65xx_port_by_channel(unsigned channel)
|
||||
{
|
||||
return channel / ni_65xx_channels_per_port;
|
||||
}
|
||||
static inline unsigned ni_65xx_total_num_ports(const struct ni_65xx_board * board)
|
||||
static inline unsigned ni_65xx_total_num_ports(const struct ni_65xx_board *board)
|
||||
{
|
||||
return board->num_dio_ports + board->num_di_ports + board->num_do_ports;
|
||||
}
|
||||
@ -312,10 +312,10 @@ static struct ni_65xx_subdevice_private *ni_65xx_alloc_subdevice_private(void)
|
||||
return subdev_private;
|
||||
}
|
||||
|
||||
static int ni_65xx_find_device(struct comedi_device * dev, int bus, int slot);
|
||||
static int ni_65xx_find_device(struct comedi_device *dev, int bus, int slot);
|
||||
|
||||
static int ni_65xx_config_filter(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_65xx_config_filter(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
const unsigned chan = CR_CHAN(insn->chanspec);
|
||||
const unsigned port =
|
||||
@ -353,8 +353,8 @@ static int ni_65xx_config_filter(struct comedi_device * dev, struct comedi_subde
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ni_65xx_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_65xx_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned port;
|
||||
|
||||
@ -392,8 +392,8 @@ static int ni_65xx_dio_insn_config(struct comedi_device * dev, struct comedi_sub
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int ni_65xx_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_65xx_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned base_bitfield_channel;
|
||||
const unsigned max_ports_per_bitfield = 5;
|
||||
@ -475,8 +475,8 @@ static irqreturn_t ni_65xx_interrupt(int irq, void *d)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int ni_65xx_intr_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int ni_65xx_intr_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -551,7 +551,7 @@ static int ni_65xx_intr_cmdtest(struct comedi_device * dev, struct comedi_subdev
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_65xx_intr_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int ni_65xx_intr_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
/* struct comedi_cmd *cmd = &s->async->cmd; */
|
||||
|
||||
@ -564,7 +564,7 @@ static int ni_65xx_intr_cmd(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_65xx_intr_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int ni_65xx_intr_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
writeb(0x00,
|
||||
private(dev)->mite->daq_io_addr + Master_Interrupt_Control);
|
||||
@ -572,8 +572,8 @@ static int ni_65xx_intr_cancel(struct comedi_device * dev, struct comedi_subdevi
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_65xx_intr_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_65xx_intr_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n < 1)
|
||||
return -EINVAL;
|
||||
@ -582,8 +582,8 @@ static int ni_65xx_intr_insn_bits(struct comedi_device * dev, struct comedi_subd
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ni_65xx_intr_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_65xx_intr_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n < 1)
|
||||
return -EINVAL;
|
||||
@ -619,7 +619,7 @@ static int ni_65xx_intr_insn_config(struct comedi_device * dev, struct comedi_su
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ni_65xx_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int ni_65xx_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned i;
|
||||
@ -752,7 +752,7 @@ static int ni_65xx_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_65xx_detach(struct comedi_device * dev)
|
||||
static int ni_65xx_detach(struct comedi_device *dev)
|
||||
{
|
||||
if (private(dev) && private(dev)->mite
|
||||
&& private(dev)->mite->daq_io_addr) {
|
||||
@ -780,7 +780,7 @@ static int ni_65xx_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_65xx_find_device(struct comedi_device * dev, int bus, int slot)
|
||||
static int ni_65xx_find_device(struct comedi_device *dev, int bus, int slot)
|
||||
{
|
||||
struct mite_struct *mite;
|
||||
int i;
|
||||
|
@ -448,10 +448,10 @@ static inline const struct ni_660x_board *board(struct comedi_device * dev)
|
||||
|
||||
#define n_ni_660x_boards (sizeof(ni_660x_boards)/sizeof(ni_660x_boards[0]))
|
||||
|
||||
static int ni_660x_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int ni_660x_detach(struct comedi_device * dev);
|
||||
static void init_tio_chip(struct comedi_device * dev, int chipset);
|
||||
static void ni_660x_select_pfi_output(struct comedi_device * dev, unsigned pfi_channel,
|
||||
static int ni_660x_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int ni_660x_detach(struct comedi_device *dev);
|
||||
static void init_tio_chip(struct comedi_device *dev, int chipset);
|
||||
static void ni_660x_select_pfi_output(struct comedi_device *dev, unsigned pfi_channel,
|
||||
unsigned output_select);
|
||||
|
||||
static struct comedi_driver driver_ni_660x = {
|
||||
@ -463,25 +463,25 @@ static struct comedi_driver driver_ni_660x = {
|
||||
|
||||
COMEDI_PCI_INITCLEANUP(driver_ni_660x, ni_660x_pci_table);
|
||||
|
||||
static int ni_660x_find_device(struct comedi_device * dev, int bus, int slot);
|
||||
static int ni_660x_set_pfi_routing(struct comedi_device * dev, unsigned chan,
|
||||
static int ni_660x_find_device(struct comedi_device *dev, int bus, int slot);
|
||||
static int ni_660x_set_pfi_routing(struct comedi_device *dev, unsigned chan,
|
||||
unsigned source);
|
||||
|
||||
/* Possible instructions for a GPCT */
|
||||
static int ni_660x_GPCT_rinsn(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int ni_660x_GPCT_insn_config(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int ni_660x_GPCT_winsn(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int ni_660x_GPCT_rinsn(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
static int ni_660x_GPCT_insn_config(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
static int ni_660x_GPCT_winsn(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
/* Possible instructions for Digital IO */
|
||||
static int ni_660x_dio_insn_config(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int ni_660x_dio_insn_bits(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data);
|
||||
static int ni_660x_dio_insn_config(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
static int ni_660x_dio_insn_bits(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static inline unsigned ni_660x_num_counters(struct comedi_device * dev)
|
||||
static inline unsigned ni_660x_num_counters(struct comedi_device *dev)
|
||||
{
|
||||
return board(dev)->n_chips * counters_per_chip;
|
||||
}
|
||||
@ -704,7 +704,7 @@ static enum NI_660x_Register ni_gpct_to_660x_register(enum ni_gpct_register reg)
|
||||
return ni_660x_register;
|
||||
}
|
||||
|
||||
static inline void ni_660x_write_register(struct comedi_device * dev,
|
||||
static inline void ni_660x_write_register(struct comedi_device *dev,
|
||||
unsigned chip_index, unsigned bits, enum NI_660x_Register reg)
|
||||
{
|
||||
void *const write_address =
|
||||
@ -726,7 +726,7 @@ static inline void ni_660x_write_register(struct comedi_device * dev,
|
||||
}
|
||||
}
|
||||
|
||||
static inline unsigned ni_660x_read_register(struct comedi_device * dev,
|
||||
static inline unsigned ni_660x_read_register(struct comedi_device *dev,
|
||||
unsigned chip_index, enum NI_660x_Register reg)
|
||||
{
|
||||
void *const read_address =
|
||||
@ -773,7 +773,7 @@ static inline struct mite_dma_descriptor_ring *mite_ring(struct ni_660x_private
|
||||
return priv->mite_rings[counter->chip_index][counter->counter_index];
|
||||
}
|
||||
|
||||
static inline void ni_660x_set_dma_channel(struct comedi_device * dev,
|
||||
static inline void ni_660x_set_dma_channel(struct comedi_device *dev,
|
||||
unsigned mite_channel, struct ni_gpct *counter)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -791,7 +791,7 @@ static inline void ni_660x_set_dma_channel(struct comedi_device * dev,
|
||||
comedi_spin_unlock_irqrestore(&private(dev)->soft_reg_copy_lock, flags);
|
||||
}
|
||||
|
||||
static inline void ni_660x_unset_dma_channel(struct comedi_device * dev,
|
||||
static inline void ni_660x_unset_dma_channel(struct comedi_device *dev,
|
||||
unsigned mite_channel, struct ni_gpct *counter)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -807,7 +807,7 @@ static inline void ni_660x_unset_dma_channel(struct comedi_device * dev,
|
||||
comedi_spin_unlock_irqrestore(&private(dev)->soft_reg_copy_lock, flags);
|
||||
}
|
||||
|
||||
static int ni_660x_request_mite_channel(struct comedi_device * dev,
|
||||
static int ni_660x_request_mite_channel(struct comedi_device *dev,
|
||||
struct ni_gpct *counter, enum comedi_io_direction direction)
|
||||
{
|
||||
unsigned long flags;
|
||||
@ -832,7 +832,7 @@ static int ni_660x_request_mite_channel(struct comedi_device * dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ni_660x_release_mite_channel(struct comedi_device * dev, struct ni_gpct *counter)
|
||||
void ni_660x_release_mite_channel(struct comedi_device *dev, struct ni_gpct *counter)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -847,7 +847,7 @@ void ni_660x_release_mite_channel(struct comedi_device * dev, struct ni_gpct *co
|
||||
comedi_spin_unlock_irqrestore(&private(dev)->mite_channel_lock, flags);
|
||||
}
|
||||
|
||||
static int ni_660x_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int ni_660x_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
int retval;
|
||||
|
||||
@ -866,15 +866,15 @@ static int ni_660x_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static int ni_660x_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int ni_660x_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
struct ni_gpct *counter = subdev_to_counter(s);
|
||||
|
||||
return ni_tio_cmdtest(counter, cmd);
|
||||
}
|
||||
|
||||
static int ni_660x_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int ni_660x_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct ni_gpct *counter = subdev_to_counter(s);
|
||||
int retval;
|
||||
@ -884,7 +884,7 @@ static int ni_660x_cancel(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return retval;
|
||||
}
|
||||
|
||||
static void set_tio_counterswap(struct comedi_device * dev, int chipset)
|
||||
static void set_tio_counterswap(struct comedi_device *dev, int chipset)
|
||||
{
|
||||
/* See P. 3.5 of the Register-Level Programming manual. The
|
||||
CounterSwap bit has to be set on the second chip, otherwise
|
||||
@ -897,8 +897,8 @@ static void set_tio_counterswap(struct comedi_device * dev, int chipset)
|
||||
ni_660x_write_register(dev, chipset, 0, ClockConfigRegister);
|
||||
}
|
||||
|
||||
static void ni_660x_handle_gpct_interrupt(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s)
|
||||
static void ni_660x_handle_gpct_interrupt(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s)
|
||||
{
|
||||
ni_tio_handle_interrupt(subdev_to_counter(s), s);
|
||||
if (s->async->events) {
|
||||
@ -942,7 +942,7 @@ static int ni_660x_input_poll(struct comedi_device *dev,
|
||||
return comedi_buf_read_n_available(s->async);
|
||||
}
|
||||
|
||||
static int ni_660x_buf_change(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
static int ni_660x_buf_change(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
unsigned long new_size)
|
||||
{
|
||||
int ret;
|
||||
@ -955,7 +955,7 @@ static int ni_660x_buf_change(struct comedi_device * dev, struct comedi_subdevic
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_660x_allocate_private(struct comedi_device * dev)
|
||||
static int ni_660x_allocate_private(struct comedi_device *dev)
|
||||
{
|
||||
int retval;
|
||||
unsigned i;
|
||||
@ -971,7 +971,7 @@ static int ni_660x_allocate_private(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_660x_alloc_mite_rings(struct comedi_device * dev)
|
||||
static int ni_660x_alloc_mite_rings(struct comedi_device *dev)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned j;
|
||||
@ -988,7 +988,7 @@ static int ni_660x_alloc_mite_rings(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void ni_660x_free_mite_rings(struct comedi_device * dev)
|
||||
static void ni_660x_free_mite_rings(struct comedi_device *dev)
|
||||
{
|
||||
unsigned i;
|
||||
unsigned j;
|
||||
@ -1000,7 +1000,7 @@ static void ni_660x_free_mite_rings(struct comedi_device * dev)
|
||||
}
|
||||
}
|
||||
|
||||
static int ni_660x_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int ni_660x_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret;
|
||||
@ -1121,7 +1121,7 @@ static int ni_660x_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_660x_detach(struct comedi_device * dev)
|
||||
static int ni_660x_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: ni_660x: remove\n", dev->minor);
|
||||
|
||||
@ -1141,13 +1141,13 @@ static int ni_660x_detach(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
static int
|
||||
ni_660x_GPCT_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
ni_660x_GPCT_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
return ni_tio_rinsn(subdev_to_counter(s), insn, data);
|
||||
}
|
||||
|
||||
static void init_tio_chip(struct comedi_device * dev, int chipset)
|
||||
static void init_tio_chip(struct comedi_device *dev, int chipset)
|
||||
{
|
||||
unsigned i;
|
||||
|
||||
@ -1168,19 +1168,19 @@ static void init_tio_chip(struct comedi_device * dev, int chipset)
|
||||
}
|
||||
|
||||
static int
|
||||
ni_660x_GPCT_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
ni_660x_GPCT_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
return ni_tio_insn_config(subdev_to_counter(s), insn, data);
|
||||
}
|
||||
|
||||
static int ni_660x_GPCT_winsn(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_660x_GPCT_winsn(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
return ni_tio_winsn(subdev_to_counter(s), insn, data);
|
||||
}
|
||||
|
||||
static int ni_660x_find_device(struct comedi_device * dev, int bus, int slot)
|
||||
static int ni_660x_find_device(struct comedi_device *dev, int bus, int slot)
|
||||
{
|
||||
struct mite_struct *mite;
|
||||
int i;
|
||||
@ -1207,8 +1207,8 @@ static int ni_660x_find_device(struct comedi_device * dev, int bus, int slot)
|
||||
return -EIO;
|
||||
}
|
||||
|
||||
static int ni_660x_dio_insn_bits(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_660x_dio_insn_bits(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned base_bitfield_channel = CR_CHAN(insn->chanspec);
|
||||
|
||||
@ -1227,7 +1227,7 @@ static int ni_660x_dio_insn_bits(struct comedi_device * dev,
|
||||
return 2;
|
||||
}
|
||||
|
||||
static void ni_660x_select_pfi_output(struct comedi_device * dev, unsigned pfi_channel,
|
||||
static void ni_660x_select_pfi_output(struct comedi_device *dev, unsigned pfi_channel,
|
||||
unsigned output_select)
|
||||
{
|
||||
static const unsigned counter_4_7_first_pfi = 8;
|
||||
@ -1262,7 +1262,7 @@ static void ni_660x_select_pfi_output(struct comedi_device * dev, unsigned pfi_c
|
||||
ni_660x_write_register(dev, active_chipset, active_bits, IOConfigReg(pfi_channel));
|
||||
}
|
||||
|
||||
static int ni_660x_set_pfi_routing(struct comedi_device * dev, unsigned chan,
|
||||
static int ni_660x_set_pfi_routing(struct comedi_device *dev, unsigned chan,
|
||||
unsigned source)
|
||||
{
|
||||
if (source > num_pfi_output_selects)
|
||||
@ -1285,13 +1285,13 @@ static int ni_660x_set_pfi_routing(struct comedi_device * dev, unsigned chan,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned ni_660x_get_pfi_routing(struct comedi_device * dev, unsigned chan)
|
||||
static unsigned ni_660x_get_pfi_routing(struct comedi_device *dev, unsigned chan)
|
||||
{
|
||||
BUG_ON(chan >= NUM_PFI_CHANNELS);
|
||||
return private(dev)->pfi_output_selects[chan];
|
||||
}
|
||||
|
||||
static void ni660x_config_filter(struct comedi_device * dev, unsigned pfi_channel,
|
||||
static void ni660x_config_filter(struct comedi_device *dev, unsigned pfi_channel,
|
||||
enum ni_gpct_filter_select filter)
|
||||
{
|
||||
unsigned bits = ni_660x_read_register(dev, 0, IOConfigReg(pfi_channel));
|
||||
@ -1300,8 +1300,8 @@ static void ni660x_config_filter(struct comedi_device * dev, unsigned pfi_channe
|
||||
ni_660x_write_register(dev, 0, bits, IOConfigReg(pfi_channel));
|
||||
}
|
||||
|
||||
static int ni_660x_dio_insn_config(struct comedi_device * dev,
|
||||
struct comedi_subdevice * s, struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_660x_dio_insn_config(struct comedi_device *dev,
|
||||
struct comedi_subdevice *s, struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
||||
|
@ -111,8 +111,8 @@ struct ni_670x_private {
|
||||
#define devpriv ((struct ni_670x_private *)dev->private)
|
||||
#define n_ni_670x_boards (sizeof(ni_670x_boards)/sizeof(ni_670x_boards[0]))
|
||||
|
||||
static int ni_670x_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int ni_670x_detach(struct comedi_device * dev);
|
||||
static int ni_670x_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int ni_670x_detach(struct comedi_device *dev);
|
||||
|
||||
static struct comedi_driver driver_ni_670x = {
|
||||
driver_name:"ni_670x",
|
||||
@ -125,18 +125,18 @@ COMEDI_PCI_INITCLEANUP(driver_ni_670x, ni_670x_pci_table);
|
||||
|
||||
static struct comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} };
|
||||
|
||||
static int ni_670x_find_device(struct comedi_device * dev, int bus, int slot);
|
||||
static int ni_670x_find_device(struct comedi_device *dev, int bus, int slot);
|
||||
|
||||
static int ni_670x_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int ni_670x_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int ni_670x_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int ni_670x_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int ni_670x_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int ni_670x_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int ni_670x_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int ni_670x_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int ni_670x_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int ni_670x_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
int ret;
|
||||
@ -205,7 +205,7 @@ static int ni_670x_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int ni_670x_detach(struct comedi_device * dev)
|
||||
static int ni_670x_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: ni_670x: remove\n", dev->minor);
|
||||
|
||||
@ -221,8 +221,8 @@ static int ni_670x_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_670x_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_670x_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -247,8 +247,8 @@ static int ni_670x_ao_winsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
return i;
|
||||
}
|
||||
|
||||
static int ni_670x_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_670x_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -259,8 +259,8 @@ static int ni_670x_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice
|
||||
return i;
|
||||
}
|
||||
|
||||
static int ni_670x_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_670x_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -281,8 +281,8 @@ static int ni_670x_dio_insn_bits(struct comedi_device * dev, struct comedi_subde
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int ni_670x_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int ni_670x_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
|
||||
@ -308,7 +308,7 @@ static int ni_670x_dio_insn_config(struct comedi_device * dev, struct comedi_sub
|
||||
return insn->n;
|
||||
}
|
||||
|
||||
static int ni_670x_find_device(struct comedi_device * dev, int bus, int slot)
|
||||
static int ni_670x_find_device(struct comedi_device *dev, int bus, int slot)
|
||||
{
|
||||
struct mite_struct *mite;
|
||||
int i;
|
||||
|
@ -169,9 +169,9 @@ struct a2150_private {
|
||||
|
||||
#define devpriv ((struct a2150_private *)dev->private)
|
||||
|
||||
static int a2150_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int a2150_detach(struct comedi_device * dev);
|
||||
static int a2150_cancel(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static int a2150_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int a2150_detach(struct comedi_device *dev);
|
||||
static int a2150_cancel(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
|
||||
static struct comedi_driver driver_a2150 = {
|
||||
driver_name:"ni_at_a2150",
|
||||
@ -199,7 +199,7 @@ COMEDI_INITCLEANUP(driver_a2150);
|
||||
|
||||
#ifdef A2150_DEBUG
|
||||
|
||||
static void ni_dump_regs(struct comedi_device * dev)
|
||||
static void ni_dump_regs(struct comedi_device *dev)
|
||||
{
|
||||
rt_printk("config bits 0x%x\n", devpriv->config_bits);
|
||||
rt_printk("irq dma bits 0x%x\n", devpriv->irq_dma_bits);
|
||||
@ -318,13 +318,13 @@ static irqreturn_t a2150_interrupt(int irq, void *d)
|
||||
}
|
||||
|
||||
/* probes board type, returns offset */
|
||||
static int a2150_probe(struct comedi_device * dev)
|
||||
static int a2150_probe(struct comedi_device *dev)
|
||||
{
|
||||
int status = inw(dev->iobase + STATUS_REG);
|
||||
return ID_BITS(status);
|
||||
}
|
||||
|
||||
static int a2150_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int a2150_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase = it->options[0];
|
||||
@ -449,7 +449,7 @@ static int a2150_attach(struct comedi_device * dev, struct comedi_devconfig * it
|
||||
return 0;
|
||||
};
|
||||
|
||||
static int a2150_detach(struct comedi_device * dev)
|
||||
static int a2150_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: %s: remove\n", dev->minor, driver_a2150.driver_name);
|
||||
|
||||
@ -472,7 +472,7 @@ static int a2150_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
};
|
||||
|
||||
static int a2150_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int a2150_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
/* disable dma on card */
|
||||
devpriv->irq_dma_bits &= ~DMA_INTR_EN_BIT & ~DMA_EN_BIT;
|
||||
@ -487,8 +487,8 @@ static int a2150_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int a2150_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int a2150_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp;
|
||||
@ -617,7 +617,7 @@ static int a2150_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int a2150_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_async *async = s->async;
|
||||
struct comedi_cmd *cmd = &async->cmd;
|
||||
@ -728,8 +728,8 @@ static int a2150_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int a2150_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int a2150_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int i, n;
|
||||
static const int timeout = 100000;
|
||||
@ -802,7 +802,7 @@ static int a2150_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
|
||||
/* sets bits in devpriv->clock_bits to nearest approximation of requested period,
|
||||
* adjusts requested period to actual timing. */
|
||||
static int a2150_get_timing(struct comedi_device * dev, unsigned int *period,
|
||||
static int a2150_get_timing(struct comedi_device *dev, unsigned int *period,
|
||||
int flags)
|
||||
{
|
||||
int lub, glb, temp;
|
||||
@ -876,7 +876,7 @@ static int a2150_get_timing(struct comedi_device * dev, unsigned int *period,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int a2150_set_chanlist(struct comedi_device * dev, unsigned int start_channel,
|
||||
static int a2150_set_chanlist(struct comedi_device *dev, unsigned int start_channel,
|
||||
unsigned int num_channels)
|
||||
{
|
||||
if (start_channel + num_channels > 4)
|
||||
|
@ -181,8 +181,8 @@ struct atao_private {
|
||||
|
||||
#define devpriv ((struct atao_private *)dev->private)
|
||||
|
||||
static int atao_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int atao_detach(struct comedi_device * dev);
|
||||
static int atao_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int atao_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_atao = {
|
||||
driver_name:"ni_at_ao",
|
||||
module:THIS_MODULE,
|
||||
@ -195,22 +195,22 @@ static struct comedi_driver driver_atao = {
|
||||
|
||||
COMEDI_INITCLEANUP(driver_atao);
|
||||
|
||||
static void atao_reset(struct comedi_device * dev);
|
||||
static void atao_reset(struct comedi_device *dev);
|
||||
|
||||
static int atao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int atao_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int atao_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int atao_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int atao_calib_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int atao_calib_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data);
|
||||
static int atao_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int atao_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int atao_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int atao_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int atao_calib_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
static int atao_calib_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data);
|
||||
|
||||
static int atao_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int atao_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase;
|
||||
@ -283,7 +283,7 @@ static int atao_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int atao_detach(struct comedi_device * dev)
|
||||
static int atao_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: atao: remove\n", dev->minor);
|
||||
|
||||
@ -293,7 +293,7 @@ static int atao_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void atao_reset(struct comedi_device * dev)
|
||||
static void atao_reset(struct comedi_device *dev)
|
||||
{
|
||||
/* This is the reset sequence described in the manual */
|
||||
|
||||
@ -323,8 +323,8 @@ static void atao_reset(struct comedi_device * dev)
|
||||
outw(devpriv->cfg1, dev->iobase + ATAO_CFG1);
|
||||
}
|
||||
|
||||
static int atao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atao_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -347,8 +347,8 @@ static int atao_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
return i;
|
||||
}
|
||||
|
||||
static int atao_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atao_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
@ -359,8 +359,8 @@ static int atao_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s
|
||||
return i;
|
||||
}
|
||||
|
||||
static int atao_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atao_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -376,8 +376,8 @@ static int atao_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevic
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int atao_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atao_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int chan = CR_CHAN(insn->chanspec);
|
||||
unsigned int mask, bit;
|
||||
@ -421,8 +421,8 @@ static int atao_dio_insn_config(struct comedi_device * dev, struct comedi_subdev
|
||||
* DACs. It is not explicitly stated in the manual how to access
|
||||
* the caldacs, but we can guess.
|
||||
*/
|
||||
static int atao_calib_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atao_calib_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < insn->n; i++) {
|
||||
@ -431,8 +431,8 @@ static int atao_calib_insn_read(struct comedi_device * dev, struct comedi_subdev
|
||||
return insn->n;
|
||||
}
|
||||
|
||||
static int atao_calib_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atao_calib_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
unsigned int bitstring, bit;
|
||||
unsigned int chan = CR_CHAN(insn->chanspec);
|
||||
|
@ -297,7 +297,7 @@ struct ni_private {
|
||||
* read/written directly in the I/O space of the board. The
|
||||
* AT-MIO devices map the low 8 STC registers to iobase+addr*2. */
|
||||
|
||||
static void ni_atmio_win_out(struct comedi_device * dev, uint16_t data, int addr)
|
||||
static void ni_atmio_win_out(struct comedi_device *dev, uint16_t data, int addr)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -311,7 +311,7 @@ static void ni_atmio_win_out(struct comedi_device * dev, uint16_t data, int addr
|
||||
comedi_spin_unlock_irqrestore(&devpriv->window_lock, flags);
|
||||
}
|
||||
|
||||
static uint16_t ni_atmio_win_in(struct comedi_device * dev, int addr)
|
||||
static uint16_t ni_atmio_win_in(struct comedi_device *dev, int addr)
|
||||
{
|
||||
unsigned long flags;
|
||||
uint16_t ret;
|
||||
@ -339,8 +339,8 @@ static struct pnp_device_id device_ids[] = {
|
||||
|
||||
MODULE_DEVICE_TABLE(pnp, device_ids);
|
||||
|
||||
static int ni_atmio_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int ni_atmio_detach(struct comedi_device * dev);
|
||||
static int ni_atmio_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int ni_atmio_detach(struct comedi_device *dev);
|
||||
static struct comedi_driver driver_atmio = {
|
||||
driver_name:"ni_atmio",
|
||||
module:THIS_MODULE,
|
||||
@ -352,10 +352,10 @@ COMEDI_INITCLEANUP(driver_atmio);
|
||||
|
||||
#include "ni_mio_common.c"
|
||||
|
||||
static int ni_getboardtype(struct comedi_device * dev);
|
||||
static int ni_getboardtype(struct comedi_device *dev);
|
||||
|
||||
/* clean up allocated resources */
|
||||
static int ni_atmio_detach(struct comedi_device * dev)
|
||||
static int ni_atmio_detach(struct comedi_device *dev)
|
||||
{
|
||||
mio_common_detach(dev);
|
||||
|
||||
@ -405,7 +405,7 @@ static int ni_isapnp_find_board(struct pnp_dev **dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_atmio_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int ni_atmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct pnp_dev *isapnp_dev;
|
||||
int ret;
|
||||
@ -493,7 +493,7 @@ static int ni_atmio_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ni_getboardtype(struct comedi_device * dev)
|
||||
static int ni_getboardtype(struct comedi_device *dev)
|
||||
{
|
||||
int device_id = ni_read_eeprom(dev, 511);
|
||||
int i;
|
||||
|
@ -187,7 +187,7 @@ struct atmio16d_private {
|
||||
unsigned int com_reg_2_state; /* current state of command register 2 */
|
||||
};
|
||||
|
||||
static void reset_counters(struct comedi_device * dev)
|
||||
static void reset_counters(struct comedi_device *dev)
|
||||
{
|
||||
/* Counter 2 */
|
||||
outw(0xFFC2, dev->iobase + AM9513A_COM_REG);
|
||||
@ -225,7 +225,7 @@ static void reset_counters(struct comedi_device * dev)
|
||||
outw(0, dev->iobase + AD_CLEAR_REG);
|
||||
}
|
||||
|
||||
static void reset_atmio16d(struct comedi_device * dev)
|
||||
static void reset_atmio16d(struct comedi_device *dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -270,8 +270,8 @@ static irqreturn_t atmio16d_interrupt(int irq, void *d)
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
static int atmio16d_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int atmio16d_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0, tmp;
|
||||
#ifdef DEBUG1
|
||||
@ -371,7 +371,7 @@ static int atmio16d_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevi
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int atmio16d_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int atmio16d_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
struct comedi_cmd *cmd = &s->async->cmd;
|
||||
unsigned int timer, base_clock;
|
||||
@ -519,7 +519,7 @@ static int atmio16d_ai_cmd(struct comedi_device * dev, struct comedi_subdevice *
|
||||
}
|
||||
|
||||
/* This will cancel a running acquisition operation */
|
||||
static int atmio16d_ai_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int atmio16d_ai_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
reset_atmio16d(dev);
|
||||
|
||||
@ -527,8 +527,8 @@ static int atmio16d_ai_cancel(struct comedi_device * dev, struct comedi_subdevic
|
||||
}
|
||||
|
||||
/* Mode 0 is used to get a single conversion on demand */
|
||||
static int atmio16d_ai_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atmio16d_ai_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i, t;
|
||||
int chan;
|
||||
@ -586,8 +586,8 @@ static int atmio16d_ai_insn_read(struct comedi_device * dev, struct comedi_subde
|
||||
return i;
|
||||
}
|
||||
|
||||
static int atmio16d_ao_insn_read(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atmio16d_ao_insn_read(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
#ifdef DEBUG1
|
||||
@ -601,8 +601,8 @@ static int atmio16d_ao_insn_read(struct comedi_device * dev, struct comedi_subde
|
||||
return i;
|
||||
}
|
||||
|
||||
static int atmio16d_ao_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atmio16d_ao_insn_write(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int chan;
|
||||
@ -636,8 +636,8 @@ static int atmio16d_ao_insn_write(struct comedi_device * dev, struct comedi_subd
|
||||
return i;
|
||||
}
|
||||
|
||||
static int atmio16d_dio_insn_bits(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atmio16d_dio_insn_bits(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (insn->n != 2)
|
||||
return -EINVAL;
|
||||
@ -652,8 +652,8 @@ static int atmio16d_dio_insn_bits(struct comedi_device * dev, struct comedi_subd
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int atmio16d_dio_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int atmio16d_dio_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i;
|
||||
int mask;
|
||||
@ -706,7 +706,7 @@ static int atmio16d_dio_insn_config(struct comedi_device * dev, struct comedi_su
|
||||
options[12] - dac1 coding
|
||||
*/
|
||||
|
||||
static int atmio16d_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int atmio16d_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
unsigned int irq;
|
||||
unsigned long iobase;
|
||||
@ -841,7 +841,7 @@ static int atmio16d_attach(struct comedi_device * dev, struct comedi_devconfig *
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int atmio16d_detach(struct comedi_device * dev)
|
||||
static int atmio16d_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: atmio16d: remove\n", dev->minor);
|
||||
|
||||
|
@ -55,8 +55,8 @@ static struct pcmcia_device *pcmcia_cur_dev = NULL;
|
||||
|
||||
#define DIO700_SIZE 8 /* size of io region used by board */
|
||||
|
||||
static int dio700_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dio700_detach(struct comedi_device * dev);
|
||||
static int dio700_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dio700_detach(struct comedi_device *dev);
|
||||
|
||||
enum dio700_bustype { pcmcia_bustype };
|
||||
|
||||
@ -128,9 +128,9 @@ struct subdev_700_struct {
|
||||
#define CALLBACK_FUNC (((struct subdev_700_struct *)s->private)->cb_func)
|
||||
#define subdevpriv ((struct subdev_700_struct *)s->private)
|
||||
|
||||
static void do_config(struct comedi_device * dev, struct comedi_subdevice * s);
|
||||
static void do_config(struct comedi_device *dev, struct comedi_subdevice *s);
|
||||
|
||||
void subdev_700_interrupt(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
void subdev_700_interrupt(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
short d;
|
||||
|
||||
@ -155,8 +155,8 @@ static int subdev_700_cb(int dir, int port, int data, unsigned long arg)
|
||||
}
|
||||
}
|
||||
|
||||
static int subdev_700_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int subdev_700_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
if (data[0]) {
|
||||
s->state &= ~data[0];
|
||||
@ -173,8 +173,8 @@ static int subdev_700_insn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
return 2;
|
||||
}
|
||||
|
||||
static int subdev_700_insn_config(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int subdev_700_insn_config(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
|
||||
switch (data[0]) {
|
||||
@ -196,13 +196,13 @@ static int subdev_700_insn_config(struct comedi_device * dev, struct comedi_subd
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void do_config(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static void do_config(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{ /* use powerup defaults */
|
||||
return;
|
||||
}
|
||||
|
||||
static int subdev_700_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int subdev_700_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
unsigned int tmp;
|
||||
@ -276,21 +276,21 @@ static int subdev_700_cmdtest(struct comedi_device * dev, struct comedi_subdevic
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int subdev_700_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int subdev_700_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
/* FIXME */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int subdev_700_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int subdev_700_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
/* FIXME */
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int subdev_700_init(struct comedi_device * dev, struct comedi_subdevice * s, int (*cb) (int,
|
||||
int subdev_700_init(struct comedi_device *dev, struct comedi_subdevice *s, int (*cb) (int,
|
||||
int, int, unsigned long), unsigned long arg)
|
||||
{
|
||||
s->type = COMEDI_SUBD_DIO;
|
||||
@ -319,7 +319,7 @@ int subdev_700_init(struct comedi_device * dev, struct comedi_subdevice * s, int
|
||||
return 0;
|
||||
}
|
||||
|
||||
int subdev_700_init_irq(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
int subdev_700_init_irq(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
int (*cb) (int, int, int, unsigned long), unsigned long arg)
|
||||
{
|
||||
int ret;
|
||||
@ -337,7 +337,7 @@ int subdev_700_init_irq(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void subdev_700_cleanup(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
void subdev_700_cleanup(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
if (s->private) {
|
||||
if (subdevpriv->have_irq) {
|
||||
@ -352,7 +352,7 @@ EXPORT_SYMBOL(subdev_700_init_irq);
|
||||
EXPORT_SYMBOL(subdev_700_cleanup);
|
||||
EXPORT_SYMBOL(subdev_700_interrupt);
|
||||
|
||||
static int dio700_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dio700_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase = 0;
|
||||
@ -415,7 +415,7 @@ static int dio700_attach(struct comedi_device * dev, struct comedi_devconfig * i
|
||||
return 0;
|
||||
};
|
||||
|
||||
static int dio700_detach(struct comedi_device * dev)
|
||||
static int dio700_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: ni_daq_700: cs-remove\n", dev->minor);
|
||||
|
||||
|
@ -56,8 +56,8 @@ static struct pcmcia_device *pcmcia_cur_dev = NULL;
|
||||
|
||||
#define DIO24_SIZE 4 /* size of io region used by board */
|
||||
|
||||
static int dio24_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int dio24_detach(struct comedi_device * dev);
|
||||
static int dio24_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
static int dio24_detach(struct comedi_device *dev);
|
||||
|
||||
enum dio24_bustype { pcmcia_bustype };
|
||||
|
||||
@ -109,7 +109,7 @@ static struct comedi_driver driver_dio24 = {
|
||||
offset:sizeof(struct dio24_board_struct),
|
||||
};
|
||||
|
||||
static int dio24_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int dio24_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
unsigned long iobase = 0;
|
||||
@ -172,7 +172,7 @@ static int dio24_attach(struct comedi_device * dev, struct comedi_devconfig * it
|
||||
return 0;
|
||||
};
|
||||
|
||||
static int dio24_detach(struct comedi_device * dev)
|
||||
static int dio24_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: ni_daq_dio24: remove\n", dev->minor);
|
||||
|
||||
|
@ -448,7 +448,7 @@ static DEFINE_PCI_DEVICE_TABLE(labpc_pci_table) = {
|
||||
MODULE_DEVICE_TABLE(pci, labpc_pci_table);
|
||||
#endif /* CONFIG_COMEDI_PCI */
|
||||
|
||||
static inline int labpc_counter_load(struct comedi_device * dev,
|
||||
static inline int labpc_counter_load(struct comedi_device *dev,
|
||||
unsigned long base_address, unsigned int counter_number,
|
||||
unsigned int count, unsigned int mode)
|
||||
{
|
||||
@ -459,7 +459,7 @@ static inline int labpc_counter_load(struct comedi_device * dev,
|
||||
return i8254_load(base_address, 0, counter_number, count, mode);
|
||||
}
|
||||
|
||||
int labpc_common_attach(struct comedi_device * dev, unsigned long iobase,
|
||||
int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
|
||||
unsigned int irq, unsigned int dma_chan)
|
||||
{
|
||||
struct comedi_subdevice *s;
|
||||
@ -643,7 +643,7 @@ int labpc_common_attach(struct comedi_device * dev, unsigned long iobase,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int labpc_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
unsigned long iobase = 0;
|
||||
unsigned int irq = 0;
|
||||
@ -724,7 +724,7 @@ static int labpc_find_device(struct comedi_device *dev, int bus, int slot)
|
||||
}
|
||||
#endif
|
||||
|
||||
int labpc_common_detach(struct comedi_device * dev)
|
||||
int labpc_common_detach(struct comedi_device *dev)
|
||||
{
|
||||
printk("comedi%d: ni_labpc: detach\n", dev->minor);
|
||||
|
||||
@ -748,14 +748,14 @@ int labpc_common_detach(struct comedi_device * dev)
|
||||
return 0;
|
||||
};
|
||||
|
||||
static void labpc_clear_adc_fifo(const struct comedi_device * dev)
|
||||
static void labpc_clear_adc_fifo(const struct comedi_device *dev)
|
||||
{
|
||||
devpriv->write_byte(0x1, dev->iobase + ADC_CLEAR_REG);
|
||||
devpriv->read_byte(dev->iobase + ADC_FIFO_REG);
|
||||
devpriv->read_byte(dev->iobase + ADC_FIFO_REG);
|
||||
}
|
||||
|
||||
static int labpc_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int labpc_cancel(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
||||
@ -770,7 +770,7 @@ static int labpc_cancel(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static enum scan_mode labpc_ai_scan_mode(const struct comedi_cmd * cmd)
|
||||
static enum scan_mode labpc_ai_scan_mode(const struct comedi_cmd *cmd)
|
||||
{
|
||||
if (cmd->chanlist_len == 1)
|
||||
return MODE_SINGLE_CHAN;
|
||||
@ -793,8 +793,8 @@ static enum scan_mode labpc_ai_scan_mode(const struct comedi_cmd * cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int labpc_ai_chanlist_invalid(const struct comedi_device * dev,
|
||||
const struct comedi_cmd * cmd)
|
||||
static int labpc_ai_chanlist_invalid(const struct comedi_device *dev,
|
||||
const struct comedi_cmd *cmd)
|
||||
{
|
||||
int mode, channel, range, aref, i;
|
||||
|
||||
@ -865,7 +865,7 @@ static int labpc_ai_chanlist_invalid(const struct comedi_device * dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int labpc_use_continuous_mode(const struct comedi_cmd * cmd)
|
||||
static int labpc_use_continuous_mode(const struct comedi_cmd *cmd)
|
||||
{
|
||||
if (labpc_ai_scan_mode(cmd) == MODE_SINGLE_CHAN)
|
||||
return 1;
|
||||
@ -876,7 +876,7 @@ static int labpc_use_continuous_mode(const struct comedi_cmd * cmd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int labpc_ai_convert_period(const struct comedi_cmd * cmd)
|
||||
static unsigned int labpc_ai_convert_period(const struct comedi_cmd *cmd)
|
||||
{
|
||||
if (cmd->convert_src != TRIG_TIMER)
|
||||
return 0;
|
||||
@ -888,7 +888,7 @@ static unsigned int labpc_ai_convert_period(const struct comedi_cmd * cmd)
|
||||
return cmd->convert_arg;
|
||||
}
|
||||
|
||||
static void labpc_set_ai_convert_period(struct comedi_cmd * cmd, unsigned int ns)
|
||||
static void labpc_set_ai_convert_period(struct comedi_cmd *cmd, unsigned int ns)
|
||||
{
|
||||
if (cmd->convert_src != TRIG_TIMER)
|
||||
return;
|
||||
@ -902,7 +902,7 @@ static void labpc_set_ai_convert_period(struct comedi_cmd * cmd, unsigned int ns
|
||||
cmd->convert_arg = ns;
|
||||
}
|
||||
|
||||
static unsigned int labpc_ai_scan_period(const struct comedi_cmd * cmd)
|
||||
static unsigned int labpc_ai_scan_period(const struct comedi_cmd *cmd)
|
||||
{
|
||||
if (cmd->scan_begin_src != TRIG_TIMER)
|
||||
return 0;
|
||||
@ -914,7 +914,7 @@ static unsigned int labpc_ai_scan_period(const struct comedi_cmd * cmd)
|
||||
return cmd->scan_begin_arg;
|
||||
}
|
||||
|
||||
static void labpc_set_ai_scan_period(struct comedi_cmd * cmd, unsigned int ns)
|
||||
static void labpc_set_ai_scan_period(struct comedi_cmd *cmd, unsigned int ns)
|
||||
{
|
||||
if (cmd->scan_begin_src != TRIG_TIMER)
|
||||
return;
|
||||
@ -926,8 +926,8 @@ static void labpc_set_ai_scan_period(struct comedi_cmd * cmd, unsigned int ns)
|
||||
cmd->scan_begin_arg = ns;
|
||||
}
|
||||
|
||||
static int labpc_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_cmd * cmd)
|
||||
static int labpc_ai_cmdtest(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_cmd *cmd)
|
||||
{
|
||||
int err = 0;
|
||||
int tmp, tmp2;
|
||||
@ -1063,7 +1063,7 @@ static int labpc_ai_cmdtest(struct comedi_device * dev, struct comedi_subdevice
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int labpc_ai_cmd(struct comedi_device * dev, struct comedi_subdevice * s)
|
||||
static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
|
||||
{
|
||||
int channel, range, aref;
|
||||
unsigned long irq_flags;
|
||||
@ -1393,7 +1393,7 @@ static irqreturn_t labpc_interrupt(int irq, void *d)
|
||||
}
|
||||
|
||||
/* read all available samples from ai fifo */
|
||||
static int labpc_drain_fifo(struct comedi_device * dev)
|
||||
static int labpc_drain_fifo(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int lsb, msb;
|
||||
short data;
|
||||
@ -1427,7 +1427,7 @@ static int labpc_drain_fifo(struct comedi_device * dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void labpc_drain_dma(struct comedi_device * dev)
|
||||
static void labpc_drain_dma(struct comedi_device *dev)
|
||||
{
|
||||
struct comedi_subdevice *s = dev->read_subdev;
|
||||
struct comedi_async *async = s->async;
|
||||
@ -1480,7 +1480,7 @@ static void labpc_drain_dma(struct comedi_device * dev)
|
||||
async->events |= COMEDI_CB_BLOCK;
|
||||
}
|
||||
|
||||
static void handle_isa_dma(struct comedi_device * dev)
|
||||
static void handle_isa_dma(struct comedi_device *dev)
|
||||
{
|
||||
labpc_drain_dma(dev);
|
||||
|
||||
@ -1492,7 +1492,7 @@ static void handle_isa_dma(struct comedi_device * dev)
|
||||
|
||||
/* makes sure all data aquired by board is transfered to comedi (used
|
||||
* when aquisition is terminated by stop_src == TRIG_EXT). */
|
||||
static void labpc_drain_dregs(struct comedi_device * dev)
|
||||
static void labpc_drain_dregs(struct comedi_device *dev)
|
||||
{
|
||||
if (devpriv->current_transfer == isa_dma_transfer)
|
||||
labpc_drain_dma(dev);
|
||||
@ -1500,8 +1500,8 @@ static void labpc_drain_dregs(struct comedi_device * dev)
|
||||
labpc_drain_fifo(dev);
|
||||
}
|
||||
|
||||
static int labpc_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int labpc_ai_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int i, n;
|
||||
int chan, range;
|
||||
@ -1586,8 +1586,8 @@ static int labpc_ai_rinsn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
}
|
||||
|
||||
/* analog output insn */
|
||||
static int labpc_ao_winsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int labpc_ao_winsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int channel, range;
|
||||
unsigned long flags;
|
||||
@ -1627,24 +1627,24 @@ static int labpc_ao_winsn(struct comedi_device * dev, struct comedi_subdevice *
|
||||
}
|
||||
|
||||
/* analog output readback insn */
|
||||
static int labpc_ao_rinsn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int labpc_ao_rinsn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = devpriv->ao_value[CR_CHAN(insn->chanspec)];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int labpc_calib_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int labpc_calib_read_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = devpriv->caldac[CR_CHAN(insn->chanspec)];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int labpc_calib_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int labpc_calib_write_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int channel = CR_CHAN(insn->chanspec);
|
||||
|
||||
@ -1652,16 +1652,16 @@ static int labpc_calib_write_insn(struct comedi_device * dev, struct comedi_subd
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int labpc_eeprom_read_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int labpc_eeprom_read_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
data[0] = devpriv->eeprom_data[CR_CHAN(insn->chanspec)];
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int labpc_eeprom_write_insn(struct comedi_device * dev, struct comedi_subdevice * s,
|
||||
struct comedi_insn * insn, unsigned int * data)
|
||||
static int labpc_eeprom_write_insn(struct comedi_device *dev, struct comedi_subdevice *s,
|
||||
struct comedi_insn *insn, unsigned int *data)
|
||||
{
|
||||
int channel = CR_CHAN(insn->chanspec);
|
||||
int ret;
|
||||
@ -1704,7 +1704,7 @@ static unsigned int labpc_suggest_transfer_size(struct comedi_cmd cmd)
|
||||
}
|
||||
|
||||
/* figures out what counter values to use based on command */
|
||||
static void labpc_adc_timing(struct comedi_device * dev, struct comedi_cmd * cmd)
|
||||
static void labpc_adc_timing(struct comedi_device *dev, struct comedi_cmd *cmd)
|
||||
{
|
||||
const int max_counter_value = 0x10000; /* max value for 16 bit counter in mode 2 */
|
||||
const int min_counter_value = 2; /* min value for 16 bit counter in mode 2 */
|
||||
@ -1796,7 +1796,7 @@ static int labpc_dio_mem_callback(int dir, int port, int data,
|
||||
}
|
||||
|
||||
/* lowlevel write to eeprom/dac */
|
||||
static void labpc_serial_out(struct comedi_device * dev, unsigned int value,
|
||||
static void labpc_serial_out(struct comedi_device *dev, unsigned int value,
|
||||
unsigned int value_width)
|
||||
{
|
||||
int i;
|
||||
@ -1821,7 +1821,7 @@ static void labpc_serial_out(struct comedi_device * dev, unsigned int value,
|
||||
}
|
||||
|
||||
/* lowlevel read from eeprom */
|
||||
static unsigned int labpc_serial_in(struct comedi_device * dev)
|
||||
static unsigned int labpc_serial_in(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int value = 0;
|
||||
int i;
|
||||
@ -1850,7 +1850,7 @@ static unsigned int labpc_serial_in(struct comedi_device * dev)
|
||||
return value;
|
||||
}
|
||||
|
||||
static unsigned int labpc_eeprom_read(struct comedi_device * dev, unsigned int address)
|
||||
static unsigned int labpc_eeprom_read(struct comedi_device *dev, unsigned int address)
|
||||
{
|
||||
unsigned int value;
|
||||
const int read_instruction = 0x3; /* bits to tell eeprom to expect a read */
|
||||
@ -1879,7 +1879,7 @@ static unsigned int labpc_eeprom_read(struct comedi_device * dev, unsigned int a
|
||||
return value;
|
||||
}
|
||||
|
||||
static unsigned int labpc_eeprom_write(struct comedi_device * dev,
|
||||
static unsigned int labpc_eeprom_write(struct comedi_device *dev,
|
||||
unsigned int address, unsigned int value)
|
||||
{
|
||||
const int write_enable_instruction = 0x6;
|
||||
@ -1937,7 +1937,7 @@ static unsigned int labpc_eeprom_write(struct comedi_device * dev,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static unsigned int labpc_eeprom_read_status(struct comedi_device * dev)
|
||||
static unsigned int labpc_eeprom_read_status(struct comedi_device *dev)
|
||||
{
|
||||
unsigned int value;
|
||||
const int read_status_instruction = 0x5;
|
||||
@ -1965,7 +1965,7 @@ static unsigned int labpc_eeprom_read_status(struct comedi_device * dev)
|
||||
}
|
||||
|
||||
/* writes to 8 bit calibration dacs */
|
||||
static void write_caldac(struct comedi_device * dev, unsigned int channel,
|
||||
static void write_caldac(struct comedi_device *dev, unsigned int channel,
|
||||
unsigned int value)
|
||||
{
|
||||
if (value == devpriv->caldac[channel])
|
||||
|
@ -74,9 +74,9 @@ struct labpc_private {
|
||||
void (*write_byte) (unsigned int byte, unsigned long address);
|
||||
};
|
||||
|
||||
int labpc_common_attach(struct comedi_device * dev, unsigned long iobase,
|
||||
int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
|
||||
unsigned int irq, unsigned int dma);
|
||||
int labpc_common_detach(struct comedi_device * dev);
|
||||
int labpc_common_detach(struct comedi_device *dev);
|
||||
|
||||
extern const int labpc_1200_is_unipolar[];
|
||||
extern const int labpc_1200_ai_gain_bits[];
|
||||
|
@ -79,7 +79,7 @@ NI manuals:
|
||||
|
||||
static struct pcmcia_device *pcmcia_cur_dev = NULL;
|
||||
|
||||
static int labpc_attach(struct comedi_device * dev, struct comedi_devconfig * it);
|
||||
static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it);
|
||||
|
||||
static const struct labpc_board_struct labpc_cs_boards[] = {
|
||||
{
|
||||
@ -126,7 +126,7 @@ static struct comedi_driver driver_labpc_cs = {
|
||||
.offset = sizeof(struct labpc_board_struct),
|
||||
};
|
||||
|
||||
static int labpc_attach(struct comedi_device * dev, struct comedi_devconfig * it)
|
||||
static int labpc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
|
||||
{
|
||||
unsigned long iobase = 0;
|
||||
unsigned int irq = 0;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user