Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 354067
b: refs/heads/master
c: 4154207
h: refs/heads/master
i:
  354065: a77b994
  354063: f86fbce
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Jan 18, 2013
1 parent 3f51785 commit 79e73f9
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 29 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 903b6c94bb51808d9619d9c17179202ff1a808f4
refs/heads/master: 41542073f5c21c724fdb004a568bffb0f217d7b8
11 changes: 0 additions & 11 deletions trunk/drivers/staging/comedi/drivers/addi-data/hwdrv_apci2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour
/* DIGITAL INPUT-OUTPUT DEFINE */

#define APCI2200_DIGITAL_OP 4
#define APCI2200_DIGITAL_IP 0

/* TIMER COUNTER WATCHDOG DEFINES */

Expand All @@ -60,16 +59,6 @@ You should also find the complete GPL in the COPYING file accompanying this sour
#define APCI2200_WATCHDOG_RELOAD_VALUE 4
#define APCI2200_WATCHDOG_STATUS 16

static int apci2200_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
data[1] = inw(dev->iobase + APCI2200_DIGITAL_IP);

return insn->n;
}

static int apci2200_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
Expand Down
39 changes: 22 additions & 17 deletions trunk/drivers/staging/comedi/drivers/addi_apci_2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,35 @@

#include "addi-data/hwdrv_apci2200.c"

/*
* I/O Register Map
*/
#define APCI2200_DI_REG 0x00

static const struct addi_board apci2200_boardtypes[] = {
{
.pc_DriverName = "apci2200",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
.i_DeviceId = 0x1005,
.i_NbrDiChannel = 8,
.i_NbrDoChannel = 16,
.i_Timer = 1,
.di_bits = apci2200_di_insn_bits,
.do_bits = apci2200_do_insn_bits,
.timer_config = i_APCI2200_ConfigWatchdog,
.timer_write = i_APCI2200_StartStopWriteWatchdog,
.timer_read = i_APCI2200_ReadWatchdog,
},
};

static int apci2200_di_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
data[1] = inw(dev->iobase + APCI2200_DI_REG);

return insn->n;
}

static int apci2200_reset(struct comedi_device *dev)
{
outw(0x0, dev->iobase + APCI2200_DIGITAL_OP);
Expand Down Expand Up @@ -92,21 +105,13 @@ static int apci2200_auto_attach(struct comedi_device *dev,

/* Allocate and Initialise DI Subdevice Structures */
s = &dev->subdevices[2];
if (this_board->i_NbrDiChannel) {
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE | SDF_GROUND | SDF_COMMON;
s->n_chan = this_board->i_NbrDiChannel;
s->maxdata = 1;
s->len_chanlist = this_board->i_NbrDiChannel;
s->range_table = &range_digital;
s->io_bits = 0; /* all bits input */
s->insn_config = this_board->di_config;
s->insn_read = this_board->di_read;
s->insn_write = this_board->di_write;
s->insn_bits = this_board->di_bits;
} else {
s->type = COMEDI_SUBD_UNUSED;
}
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE;
s->n_chan = 8;
s->maxdata = 1;
s->range_table = &range_digital;
s->insn_bits = apci2200_di_insn_bits;

/* Allocate and Initialise DO Subdevice Structures */
s = &dev->subdevices[3];
if (this_board->i_NbrDoChannel) {
Expand Down

0 comments on commit 79e73f9

Please sign in to comment.