#include <linux/bitfield.h>
#include <linux/clk.h>
#include <linux/device.h>
#include <linux/err.h>
#include <linux/gcd.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/regmap.h>
#include <linux/sysfs.h>
#include <linux/spi/spi.h>
#include <linux/iio/iio.h>
#define ADF4371_REG(x) …
#define ADF4371_ADDR_ASC_MSK …
#define ADF4371_ADDR_ASC(x) …
#define ADF4371_ADDR_ASC_R_MSK …
#define ADF4371_ADDR_ASC_R(x) …
#define ADF4371_RESET_CMD …
#define ADF4371_FRAC2WORD_L_MSK …
#define ADF4371_FRAC2WORD_L(x) …
#define ADF4371_FRAC1WORD_MSK …
#define ADF4371_FRAC1WORD(x) …
#define ADF4371_FRAC2WORD_H_MSK …
#define ADF4371_FRAC2WORD_H(x) …
#define ADF4371_MOD2WORD_MSK …
#define ADF4371_MOD2WORD(x) …
#define ADF4371_RF_DIV_SEL_MSK …
#define ADF4371_RF_DIV_SEL(x) …
#define ADF4371_MUTE_LD_MSK …
#define ADF4371_MUTE_LD(x) …
#define ADF4371_TIMEOUT_MSK …
#define ADF4371_TIMEOUT(x) …
#define ADF4371_VCO_ALC_TOUT_MSK …
#define ADF4371_VCO_ALC_TOUT(x) …
#define ADF4371_MIN_VCO_FREQ …
#define ADF4371_MAX_VCO_FREQ …
#define ADF4371_MAX_OUT_RF8_FREQ …
#define ADF4371_MIN_OUT_RF8_FREQ …
#define ADF4371_MAX_OUT_RF16_FREQ …
#define ADF4371_MIN_OUT_RF16_FREQ …
#define ADF4371_MAX_OUT_RF32_FREQ …
#define ADF4371_MIN_OUT_RF32_FREQ …
#define ADF4371_MAX_FREQ_PFD …
#define ADF4371_MAX_FREQ_REFIN …
#define ADF4371_MODULUS1 …
#define ADF4371_MAX_MODULUS2 …
#define ADF4371_CHECK_RANGE(freq, range) …
enum { … };
enum { … };
enum adf4371_variant { … };
struct adf4371_pwrdown { … };
static const char * const adf4371_ch_names[] = …;
static const struct adf4371_pwrdown adf4371_pwrdown_ch[4] = …;
static const struct reg_sequence adf4371_reg_defaults[] = …;
static const struct regmap_config adf4371_regmap_config = …;
struct adf4371_chip_info { … };
struct adf4371_state { … };
static unsigned long long adf4371_pll_fract_n_get_rate(struct adf4371_state *st,
u32 channel)
{ … }
static void adf4371_pll_fract_n_compute(unsigned long long vco,
unsigned long long pfd,
unsigned int *integer,
unsigned int *fract1,
unsigned int *fract2,
unsigned int *mod2)
{ … }
static int adf4371_set_freq(struct adf4371_state *st, unsigned long long freq,
unsigned int channel)
{ … }
static ssize_t adf4371_read(struct iio_dev *indio_dev,
uintptr_t private,
const struct iio_chan_spec *chan,
char *buf)
{ … }
static ssize_t adf4371_write(struct iio_dev *indio_dev,
uintptr_t private,
const struct iio_chan_spec *chan,
const char *buf, size_t len)
{ … }
#define _ADF4371_EXT_INFO(_name, _ident) …
static const struct iio_chan_spec_ext_info adf4371_ext_info[] = …;
#define ADF4371_CHANNEL(index) …
static const struct iio_chan_spec adf4371_chan[] = …;
static const struct adf4371_chip_info adf4371_chip_info[] = …;
static int adf4371_reg_access(struct iio_dev *indio_dev,
unsigned int reg,
unsigned int writeval,
unsigned int *readval)
{ … }
static const struct iio_info adf4371_info = …;
static int adf4371_setup(struct adf4371_state *st)
{ … }
static int adf4371_probe(struct spi_device *spi)
{ … }
static const struct spi_device_id adf4371_id_table[] = …;
MODULE_DEVICE_TABLE(spi, adf4371_id_table);
static const struct of_device_id adf4371_of_match[] = …;
MODULE_DEVICE_TABLE(of, adf4371_of_match);
static struct spi_driver adf4371_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;