#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/property.h>
#include <linux/slab.h>
#include <linux/sysfs.h>
#include <linux/spi/spi.h>
#include <linux/regulator/consumer.h>
#include <linux/err.h>
#include <linux/gcd.h>
#include <linux/gpio/consumer.h>
#include <asm/div64.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/iio/iio.h>
#include <linux/iio/sysfs.h>
#include <linux/iio/frequency/adf4350.h>
enum { … };
struct adf4350_state { … };
#define to_adf4350_state(_hw) …
static struct adf4350_platform_data default_pdata = …;
static int adf4350_sync_config(struct adf4350_state *st)
{ … }
static int adf4350_reg_access(struct iio_dev *indio_dev,
unsigned reg, unsigned writeval,
unsigned *readval)
{ … }
static int adf4350_tune_r_cnt(struct adf4350_state *st, unsigned short r_cnt)
{ … }
static int adf4350_set_freq(struct adf4350_state *st, unsigned long long freq)
{ … }
static ssize_t adf4350_write(struct iio_dev *indio_dev,
uintptr_t private,
const struct iio_chan_spec *chan,
const char *buf, size_t len)
{ … }
static ssize_t adf4350_read(struct iio_dev *indio_dev,
uintptr_t private,
const struct iio_chan_spec *chan,
char *buf)
{ … }
#define _ADF4350_EXT_INFO(_name, _ident) …
static const struct iio_chan_spec_ext_info adf4350_ext_info[] = …;
static const struct iio_chan_spec adf4350_chan = …;
static const struct iio_info adf4350_info = …;
static void adf4350_clk_del_provider(void *data)
{ … }
static unsigned long adf4350_clk_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{ … }
static int adf4350_clk_set_rate(struct clk_hw *hw,
unsigned long rate,
unsigned long parent_rate)
{ … }
static int adf4350_clk_prepare(struct clk_hw *hw)
{ … }
static void adf4350_clk_unprepare(struct clk_hw *hw)
{ … }
static int adf4350_clk_is_enabled(struct clk_hw *hw)
{ … }
static const struct clk_ops adf4350_clk_ops = …;
static int adf4350_clk_register(struct adf4350_state *st)
{ … }
static struct adf4350_platform_data *adf4350_parse_dt(struct device *dev)
{ … }
static void adf4350_power_down(void *data)
{ … }
static int adf4350_probe(struct spi_device *spi)
{ … }
static const struct of_device_id adf4350_of_match[] = …;
MODULE_DEVICE_TABLE(of, adf4350_of_match);
static const struct spi_device_id adf4350_id[] = …;
MODULE_DEVICE_TABLE(spi, adf4350_id);
static struct spi_driver adf4350_driver = …;
module_spi_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;