#include <linux/align.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/spi/spi.h>
#include <linux/err.h>
#include <linux/module.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.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/iio/adc/ad_sigma_delta.h>
#include <linux/unaligned.h>
#define AD_SD_COMM_CHAN_MASK …
#define AD_SD_REG_COMM …
#define AD_SD_REG_DATA …
void ad_sd_set_comm(struct ad_sigma_delta *sigma_delta, uint8_t comm)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int ad_sd_write_reg(struct ad_sigma_delta *sigma_delta, unsigned int reg,
unsigned int size, unsigned int val)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static int ad_sd_read_reg_raw(struct ad_sigma_delta *sigma_delta,
unsigned int reg, unsigned int size, uint8_t *val)
{ … }
int ad_sd_read_reg(struct ad_sigma_delta *sigma_delta,
unsigned int reg, unsigned int size, unsigned int *val)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int ad_sd_reset(struct ad_sigma_delta *sigma_delta,
unsigned int reset_length)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int ad_sd_calibrate(struct ad_sigma_delta *sigma_delta,
unsigned int mode, unsigned int channel)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int ad_sd_calibrate_all(struct ad_sigma_delta *sigma_delta,
const struct ad_sd_calib_data *cb, unsigned int n)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int ad_sigma_delta_single_conversion(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan, int *val)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static int ad_sd_buffer_postenable(struct iio_dev *indio_dev)
{ … }
static int ad_sd_buffer_postdisable(struct iio_dev *indio_dev)
{ … }
static irqreturn_t ad_sd_trigger_handler(int irq, void *p)
{ … }
static bool ad_sd_validate_scan_mask(struct iio_dev *indio_dev, const unsigned long *mask)
{ … }
static const struct iio_buffer_setup_ops ad_sd_buffer_setup_ops = …;
static irqreturn_t ad_sd_data_rdy_trig_poll(int irq, void *private)
{ … }
int ad_sd_validate_trigger(struct iio_dev *indio_dev, struct iio_trigger *trig)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
static int devm_ad_sd_probe_trigger(struct device *dev, struct iio_dev *indio_dev)
{ … }
int devm_ad_sd_setup_buffer_and_trigger(struct device *dev, struct iio_dev *indio_dev)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
int ad_sd_init(struct ad_sigma_delta *sigma_delta, struct iio_dev *indio_dev,
struct spi_device *spi, const struct ad_sigma_delta_info *info)
{ … }
EXPORT_SYMBOL_NS_GPL(…);
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;