#include <linux/iio/iio.h>
#include <linux/iio/buffer.h>
#include <linux/iio/trigger.h>
#include <linux/iio/trigger_consumer.h>
#include <linux/iio/triggered_buffer.h>
#include <linux/pci.h>
#include <linux/dma/amd_xdma.h>
#include "mgb4_core.h"
#include "mgb4_trigger.h"
struct trigger_data { … };
static int trigger_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan, int *val,
int *val2, long mask)
{ … }
static int trigger_set_state(struct iio_trigger *trig, bool state)
{ … }
static const struct iio_trigger_ops trigger_ops = …;
static const struct iio_info trigger_info = …;
#define TRIGGER_CHANNEL(_si) …
static const struct iio_chan_spec trigger_channels[] = …;
static irqreturn_t trigger_handler(int irq, void *p)
{ … }
static int probe_trigger(struct iio_dev *indio_dev, int irq)
{ … }
static void remove_trigger(struct iio_dev *indio_dev, int irq)
{ … }
struct iio_dev *mgb4_trigger_create(struct mgb4_dev *mgbdev)
{ … }
void mgb4_trigger_free(struct iio_dev *indio_dev)
{ … }