Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 325156
b: refs/heads/master
c: 293b048
h: refs/heads/master
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Sep 11, 2012
1 parent ce50320 commit 747e66a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 42 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: 499a76dc830d32fa8a0c56360b89d4596789f85e
refs/heads/master: 293b048a1677162a1c23cdaa441525c2602705f2
43 changes: 2 additions & 41 deletions trunk/drivers/staging/comedi/drivers/adl_pci9111.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,8 @@ static const struct comedi_lrange pci9111_ai_range = {
}
};

/* Private data structure */

struct pci9111_private_data {
unsigned long lcr_io_base; /* Local configuration register base
* address */
unsigned long lcr_io_base;

int stop_counter;
int stop_is_none;
Expand All @@ -144,18 +141,14 @@ struct pci9111_private_data {
unsigned int chunk_counter;
unsigned int chunk_num_samples;

int ao_readback; /* Last written analog output data */
int ao_readback;

unsigned int div1;
unsigned int div2;

short ai_bounce_buffer[2 * PCI9111_FIFO_HALF_SIZE];
};

/* ------------------------------------------------------------------ */
/* PLX9050 SECTION */
/* ------------------------------------------------------------------ */

#define PLX9050_REGISTER_INTERRUPT_CONTROL 0x4c

#define PLX9050_LINTI1_ENABLE (1 << 0)
Expand Down Expand Up @@ -191,12 +184,6 @@ static void plx9050_interrupt_control(unsigned long io_base,
outb(flags, io_base + PLX9050_REGISTER_INTERRUPT_CONTROL);
}

/* ------------------------------------------------------------------ */
/* MISCELLANEOUS SECTION */
/* ------------------------------------------------------------------ */

/* 8254 timer */

static void pci9111_timer_set(struct comedi_device *dev)
{
struct pci9111_private_data *dev_private = dev->private;
Expand Down Expand Up @@ -317,19 +304,12 @@ static void pci9111_fifo_reset(struct comedi_device *dev)
outb(0, int_ctrl_reg);
}

/* ------------------------------------------------------------------ */
/* HARDWARE TRIGGERED ANALOG INPUT SECTION */
/* ------------------------------------------------------------------ */

/* Cancel analog input autoscan */

static int pci9111_ai_cancel(struct comedi_device *dev,
struct comedi_subdevice *s)
{
struct pci9111_private_data *dev_private = dev->private;

/* Disable interrupts */

plx9050_interrupt_control(dev_private->lcr_io_base, true, true, true,
true, false);

Expand Down Expand Up @@ -514,8 +494,6 @@ static int 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 *s)
{
Expand Down Expand Up @@ -630,10 +608,6 @@ static void pci9111_ai_munge(struct comedi_device *dev,
array[i] = ((array[i] >> shift) & maxdata) ^ invert;
}

/* ------------------------------------------------------------------ */
/* INTERRUPT SECTION */
/* ------------------------------------------------------------------ */

static irqreturn_t pci9111_interrupt(int irq, void *p_device)
{
struct comedi_device *dev = p_device;
Expand Down Expand Up @@ -773,12 +747,6 @@ static irqreturn_t pci9111_interrupt(int irq, void *p_device)
return IRQ_HANDLED;
}

/* ------------------------------------------------------------------ */
/* INSTANT ANALOG INPUT OUTPUT SECTION */
/* ------------------------------------------------------------------ */

/* analog instant input */

static int pci9111_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn, unsigned int *data)
Expand Down Expand Up @@ -891,18 +859,11 @@ static int pci9111_do_insn_bits(struct comedi_device *dev,
return insn->n;
}

/* ------------------------------------------------------------------ */
/* INITIALISATION SECTION */
/* ------------------------------------------------------------------ */

/* Reset device */

static int pci9111_reset(struct comedi_device *dev)
{
struct pci9111_private_data *dev_private = dev->private;

/* Set trigger source to software */

plx9050_interrupt_control(dev_private->lcr_io_base, true, true, true,
true, false);

Expand Down

0 comments on commit 747e66a

Please sign in to comment.