#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/device.h>
#include <linux/iio/iio.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
#include <linux/unaligned.h>
#define ADA4250_REG_GAIN_MUX …
#define ADA4250_REG_REFBUF_EN …
#define ADA4250_REG_RESET …
#define ADA4250_REG_SNSR_CAL_VAL …
#define ADA4250_REG_SNSR_CAL_CNFG …
#define ADA4250_REG_DIE_REV …
#define ADA4250_REG_CHIP_ID …
#define ADA4250_GAIN_MUX_MSK …
#define ADA4250_REFBUF_MSK …
#define ADA4250_RESET_MSK …
#define ADA4250_CAL_CFG_BIAS_MSK …
#define ADA4250_BIAS_SET_MSK …
#define ADA4250_RANGE_SET_MSK …
#define ADA4250_CHIP_ID …
#define ADA4250_RANGE1 …
#define ADA4250_RANGE4 …
enum ada4250_current_bias { … };
struct ada4250_state { … };
static const int calibbias_table[] = …;
static const int hwgain_table[] = …;
static const struct regmap_config ada4250_regmap_config = …;
static int ada4250_set_offset_uv(struct iio_dev *indio_dev,
const struct iio_chan_spec *chan,
int offset_uv)
{ … }
static int ada4250_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long info)
{ … }
static int ada4250_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long info)
{ … }
static int ada4250_read_avail(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
const int **vals, int *type, int *length,
long mask)
{ … }
static int ada4250_reg_access(struct iio_dev *indio_dev,
unsigned int reg,
unsigned int write_val,
unsigned int *read_val)
{ … }
static const struct iio_info ada4250_info = …;
static const struct iio_chan_spec ada4250_channels[] = …;
static void ada4250_reg_disable(void *data)
{ … }
static int ada4250_init(struct ada4250_state *st)
{ … }
static int ada4250_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id ada4250_id[] = …;
MODULE_DEVICE_TABLE(spi, ada4250_id);
static const struct of_device_id ada4250_of_match[] = …;
MODULE_DEVICE_TABLE(of, ada4250_of_match);
static struct spi_driver ada4250_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;