#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/iio/iio.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/notifier.h>
#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/spi/spi.h>
#include <linux/units.h>
#include <linux/unaligned.h>
#define ADMV1013_REG_SPI_CONTROL …
#define ADMV1013_REG_ALARM …
#define ADMV1013_REG_ALARM_MASKS …
#define ADMV1013_REG_ENABLE …
#define ADMV1013_REG_LO_AMP_I …
#define ADMV1013_REG_LO_AMP_Q …
#define ADMV1013_REG_OFFSET_ADJUST_I …
#define ADMV1013_REG_OFFSET_ADJUST_Q …
#define ADMV1013_REG_QUAD …
#define ADMV1013_REG_VVA_TEMP_COMP …
#define ADMV1013_PARITY_EN_MSK …
#define ADMV1013_SPI_SOFT_RESET_MSK …
#define ADMV1013_CHIP_ID_MSK …
#define ADMV1013_CHIP_ID …
#define ADMV1013_REVISION_ID_MSK …
#define ADMV1013_PARITY_ERROR_MSK …
#define ADMV1013_TOO_FEW_ERRORS_MSK …
#define ADMV1013_TOO_MANY_ERRORS_MSK …
#define ADMV1013_ADDRESS_RANGE_ERROR_MSK …
#define ADMV1013_VGA_PD_MSK …
#define ADMV1013_MIXER_PD_MSK …
#define ADMV1013_QUAD_PD_MSK …
#define ADMV1013_BG_PD_MSK …
#define ADMV1013_MIXER_IF_EN_MSK …
#define ADMV1013_DET_EN_MSK …
#define ADMV1013_LOAMP_PH_ADJ_FINE_MSK …
#define ADMV1013_MIXER_VGATE_MSK …
#define ADMV1013_MIXER_OFF_ADJ_P_MSK …
#define ADMV1013_MIXER_OFF_ADJ_N_MSK …
#define ADMV1013_QUAD_SE_MODE_MSK …
#define ADMV1013_QUAD_FILTERS_MSK …
#define ADMV1013_VVA_TEMP_COMP_MSK …
#define ADMV1013_READ …
#define ADMV1013_REG_ADDR_READ_MSK …
#define ADMV1013_REG_ADDR_WRITE_MSK …
#define ADMV1013_REG_DATA_MSK …
enum { … };
enum { … };
enum { … };
struct admv1013_state { … };
static int __admv1013_spi_read(struct admv1013_state *st, unsigned int reg,
unsigned int *val)
{ … }
static int admv1013_spi_read(struct admv1013_state *st, unsigned int reg,
unsigned int *val)
{ … }
static int __admv1013_spi_write(struct admv1013_state *st,
unsigned int reg,
unsigned int val)
{ … }
static int admv1013_spi_write(struct admv1013_state *st, unsigned int reg,
unsigned int val)
{ … }
static int __admv1013_spi_update_bits(struct admv1013_state *st, unsigned int reg,
unsigned int mask, unsigned int val)
{ … }
static int admv1013_spi_update_bits(struct admv1013_state *st, unsigned int reg,
unsigned int mask, unsigned int val)
{ … }
static int admv1013_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long info)
{ … }
static int admv1013_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long info)
{ … }
static ssize_t admv1013_read(struct iio_dev *indio_dev,
uintptr_t private,
const struct iio_chan_spec *chan,
char *buf)
{ … }
static ssize_t admv1013_write(struct iio_dev *indio_dev,
uintptr_t private,
const struct iio_chan_spec *chan,
const char *buf, size_t len)
{ … }
static int admv1013_update_quad_filters(struct admv1013_state *st)
{ … }
static int admv1013_update_mixer_vgate(struct admv1013_state *st, int vcm)
{ … }
static int admv1013_reg_access(struct iio_dev *indio_dev,
unsigned int reg,
unsigned int write_val,
unsigned int *read_val)
{ … }
static const struct iio_info admv1013_info = …;
static const char * const admv1013_vcc_regs[] = …;
static int admv1013_freq_change(struct notifier_block *nb, unsigned long action, void *data)
{ … }
#define _ADMV1013_EXT_INFO(_name, _shared, _ident) …
static const struct iio_chan_spec_ext_info admv1013_ext_info[] = …;
#define ADMV1013_CHAN_PHASE(_channel, _channel2, _admv1013_ext_info) …
#define ADMV1013_CHAN_CALIB(_channel, rf_comp) …
static const struct iio_chan_spec admv1013_channels[] = …;
static int admv1013_init(struct admv1013_state *st, int vcm_uv)
{ … }
static void admv1013_powerdown(void *data)
{ … }
static int admv1013_properties_parse(struct admv1013_state *st)
{ … }
static int admv1013_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id admv1013_id[] = …;
MODULE_DEVICE_TABLE(spi, admv1013_id);
static const struct of_device_id admv1013_of_match[] = …;
MODULE_DEVICE_TABLE(of, admv1013_of_match);
static struct spi_driver admv1013_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;