Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363751
b: refs/heads/master
c: e4632a7
h: refs/heads/master
i:
  363749: d4e14ea
  363747: 06b946a
  363743: c4b9517
v: v3
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Mar 25, 2013
1 parent 4e93349 commit 7237fa5
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 22 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: 90d54ff27e5d5cf0df6eb3cf351a8b2e26d94367
refs/heads/master: e4632a71faed3bcb0c77b19560e7369db0f5182e
52 changes: 31 additions & 21 deletions trunk/drivers/staging/comedi/drivers/s626.c
Original file line number Diff line number Diff line change
Expand Up @@ -1101,32 +1101,42 @@ static int s626_ai_insn_config(struct comedi_device *dev,
return -EINVAL;
}

/* static int s626_ai_rinsn(struct comedi_device *dev,struct comedi_subdevice *s,struct comedi_insn *insn,unsigned int *data) */
/* { */
/* struct s626_private *devpriv = dev->private; */
/* register uint8_t i; */
/* register int32_t *readaddr; */
#ifdef unused_code
static int s626_ai_rinsn(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
unsigned int *data)
{
struct s626_private *devpriv = dev->private;
register uint8_t i;
register int32_t *readaddr;

/* Trigger ADC scan loop start by setting RPS Signal 0. */
/* MC_ENABLE( P_MC2, MC2_ADC_RPS ); */
/* Trigger ADC scan loop start (set RPS Signal 0) */
MC_ENABLE(P_MC2, MC2_ADC_RPS);

/* Wait until ADC scan loop is finished (RPS Signal 0 reset). */
/* while ( MC_TEST( P_MC2, MC2_ADC_RPS ) ); */
/* Wait until ADC scan loop is finished (RPS Signal 0 reset) */
while (MC_TEST(P_MC2, MC2_ADC_RPS))
;

/* Init ptr to DMA buffer that holds new ADC data. We skip the
* first uint16_t in the buffer because it contains junk data from
* the final ADC of the previous poll list scan.
*/
/* readaddr = (uint32_t *)devpriv->ANABuf.LogicalBase + 1; */
/*
* Init ptr to DMA buffer that holds new ADC data. We skip the
* first uint16_t in the buffer because it contains junk data from
* the final ADC of the previous poll list scan.
*/
readaddr = (uint32_t *)devpriv->ANABuf.LogicalBase + 1;

/* Convert ADC data to 16-bit integer values and copy to application buffer. */
/* for ( i = 0; i < devpriv->AdcItems; i++ ) { */
/* *data = s626_ai_reg_to_uint( *readaddr++ ); */
/* data++; */
/* } */
/*
* Convert ADC data to 16-bit integer values and
* copy to application buffer.
*/
for (i = 0; i < devpriv->AdcItems; i++) {
*data = s626_ai_reg_to_uint(*readaddr++);
data++;
}

/* return i; */
/* } */
return i;
}
#endif

static int s626_ai_insn_read(struct comedi_device *dev,
struct comedi_subdevice *s,
Expand Down

0 comments on commit 7237fa5

Please sign in to comment.