#include <linux/bitfield.h>
#include <linux/bits.h>
#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/iio/iio.h>
#include <linux/module.h>
#include <linux/mod_devicetable.h>
#include <linux/spi/spi.h>
#include <asm/unaligned.h>
#define ADRF6780_REG_CONTROL …
#define ADRF6780_REG_ALARM_READBACK …
#define ADRF6780_REG_ALARM_MASKS …
#define ADRF6780_REG_ENABLE …
#define ADRF6780_REG_LINEARIZE …
#define ADRF6780_REG_LO_PATH …
#define ADRF6780_REG_ADC_CONTROL …
#define ADRF6780_REG_ADC_OUTPUT …
#define ADRF6780_PARITY_EN_MSK …
#define ADRF6780_SOFT_RESET_MSK …
#define ADRF6780_CHIP_ID_MSK …
#define ADRF6780_CHIP_ID …
#define ADRF6780_CHIP_REVISION_MSK …
#define ADRF6780_PARITY_ERROR_MSK …
#define ADRF6780_TOO_FEW_ERRORS_MSK …
#define ADRF6780_TOO_MANY_ERRORS_MSK …
#define ADRF6780_ADDRESS_RANGE_ERROR_MSK …
#define ADRF6780_VGA_BUFFER_EN_MSK …
#define ADRF6780_DETECTOR_EN_MSK …
#define ADRF6780_LO_BUFFER_EN_MSK …
#define ADRF6780_IF_MODE_EN_MSK …
#define ADRF6780_IQ_MODE_EN_MSK …
#define ADRF6780_LO_X2_EN_MSK …
#define ADRF6780_LO_PPF_EN_MSK …
#define ADRF6780_LO_EN_MSK …
#define ADRF6780_UC_BIAS_EN_MSK …
#define ADRF6780_RDAC_LINEARIZE_MSK …
#define ADRF6780_LO_SIDEBAND_MSK …
#define ADRF6780_Q_PATH_PHASE_ACCURACY_MSK …
#define ADRF6780_I_PATH_PHASE_ACCURACY_MSK …
#define ADRF6780_VDET_OUTPUT_SELECT_MSK …
#define ADRF6780_ADC_START_MSK …
#define ADRF6780_ADC_EN_MSK …
#define ADRF6780_ADC_CLOCK_EN_MSK …
#define ADRF6780_ADC_STATUS_MSK …
#define ADRF6780_ADC_VALUE_MSK …
struct adrf6780_state { … };
static int __adrf6780_spi_read(struct adrf6780_state *st, unsigned int reg,
unsigned int *val)
{ … }
static int adrf6780_spi_read(struct adrf6780_state *st, unsigned int reg,
unsigned int *val)
{ … }
static int __adrf6780_spi_write(struct adrf6780_state *st,
unsigned int reg,
unsigned int val)
{ … }
static int adrf6780_spi_write(struct adrf6780_state *st, unsigned int reg,
unsigned int val)
{ … }
static int __adrf6780_spi_update_bits(struct adrf6780_state *st,
unsigned int reg, unsigned int mask,
unsigned int val)
{ … }
static int adrf6780_spi_update_bits(struct adrf6780_state *st, unsigned int reg,
unsigned int mask, unsigned int val)
{ … }
static int adrf6780_read_adc_raw(struct adrf6780_state *st, unsigned int *read_val)
{ … }
static int adrf6780_read_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int *val, int *val2, long info)
{ … }
static int adrf6780_write_raw(struct iio_dev *indio_dev,
struct iio_chan_spec const *chan,
int val, int val2, long info)
{ … }
static int adrf6780_reg_access(struct iio_dev *indio_dev,
unsigned int reg,
unsigned int write_val,
unsigned int *read_val)
{ … }
static const struct iio_info adrf6780_info = …;
#define ADRF6780_CHAN_ADC(_channel) …
#define ADRF6780_CHAN_RDAC(_channel) …
#define ADRF6780_CHAN_IQ_PHASE(_channel, rf_comp) …
static const struct iio_chan_spec adrf6780_channels[] = …;
static int adrf6780_reset(struct adrf6780_state *st)
{ … }
static int adrf6780_init(struct adrf6780_state *st)
{ … }
static void adrf6780_properties_parse(struct adrf6780_state *st)
{ … }
static void adrf6780_powerdown(void *data)
{ … }
static int adrf6780_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id adrf6780_id[] = …;
MODULE_DEVICE_TABLE(spi, adrf6780_id);
static const struct of_device_id adrf6780_of_match[] = …;
MODULE_DEVICE_TABLE(of, adrf6780_of_match);
static struct spi_driver adrf6780_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;