Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 338006
b: refs/heads/master
c: ca65463
h: refs/heads/master
v: v3
  • Loading branch information
Lars-Peter Clausen authored and Jonathan Cameron committed Nov 19, 2012
1 parent 4afa730 commit ee14fad
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 10 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: ec04cb048d79cd778c06e28f34395a46d774800d
refs/heads/master: ca654638f2b4b00f948d2126dd544d2e35d2b880
2 changes: 1 addition & 1 deletion trunk/drivers/staging/iio/adc/ad7298.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct ad7298_state {
* DMA (thus cache coherency maintenance) requires the
* transfer buffers to live in their own cache lines.
*/
unsigned short rx_buf[8] ____cacheline_aligned;
unsigned short rx_buf[12] ____cacheline_aligned;
unsigned short tx_buf[2];
};

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/staging/iio/adc/ad7298_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
.sign = 'u', \
.realbits = 12, \
.storagebits = 16, \
.endianness = IIO_BE, \
}, \
}

Expand Down
11 changes: 3 additions & 8 deletions trunk/drivers/staging/iio/adc/ad7298_ring.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,24 +76,19 @@ static irqreturn_t ad7298_trigger_handler(int irq, void *p)
struct iio_dev *indio_dev = pf->indio_dev;
struct ad7298_state *st = iio_priv(indio_dev);
s64 time_ns = 0;
__u16 buf[16];
int b_sent, i;
int b_sent;

b_sent = spi_sync(st->spi, &st->ring_msg);
if (b_sent)
goto done;

if (indio_dev->scan_timestamp) {
time_ns = iio_get_time_ns();
memcpy((u8 *)buf + indio_dev->scan_bytes - sizeof(s64),
memcpy((u8 *)st->rx_buf + indio_dev->scan_bytes - sizeof(s64),
&time_ns, sizeof(time_ns));
}

for (i = 0; i < bitmap_weight(indio_dev->active_scan_mask,
indio_dev->masklength); i++)
buf[i] = be16_to_cpu(st->rx_buf[i]);

iio_push_to_buffers(indio_dev, (u8 *)buf);
iio_push_to_buffers(indio_dev, (u8 *)st->rx_buf);

done:
iio_trigger_notify_done(indio_dev->trig);
Expand Down

0 comments on commit ee14fad

Please sign in to comment.