8 #include <linux/export.h>
10 #include <linux/kernel.h>
12 #include <linux/slab.h>
13 #include <asm/unaligned.h>
16 #include "../ring_sw.h"
24 static int ade7758_spi_read_burst(
struct iio_dev *indio_dev)
31 dev_err(&st->
us->dev,
"problem when reading WFORM value\n");
36 static int ade7758_write_waveform_type(
struct device *
dev,
unsigned type)
60 static irqreturn_t ade7758_trigger_handler(
int irq,
void *
p)
69 if (ade7758_spi_read_burst(indio_dev) >= 0)
90 static int ade7758_ring_preenable(
struct iio_dev *indio_dev)
106 ade7758_write_waveform_type(&indio_dev->
dev,
113 .preenable = &ade7758_ring_preenable,
136 indio_dev->
setup_ops = &ade7758_ring_setup_ops;
139 &ade7758_trigger_handler,
142 "ade7759_consumer%d",
146 goto error_iio_sw_rb_free;
165 st->
ring_xfer[1].rx_buf = &st->rx_buf[1];
174 st->
ring_xfer[3].rx_buf = &st->rx_buf[5];
186 error_iio_sw_rb_free: