#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/regmap.h>
#include <linux/slab.h>
#define SI570_REG_HS_N1 …
#define SI570_REG_N1_RFREQ0 …
#define SI570_REG_RFREQ1 …
#define SI570_REG_RFREQ2 …
#define SI570_REG_RFREQ3 …
#define SI570_REG_RFREQ4 …
#define SI570_REG_CONTROL …
#define SI570_REG_FREEZE_DCO …
#define SI570_DIV_OFFSET_7PPM …
#define HS_DIV_SHIFT …
#define HS_DIV_MASK …
#define HS_DIV_OFFSET …
#define N1_6_2_MASK …
#define N1_1_0_MASK …
#define RFREQ_37_32_MASK …
#define SI570_MIN_FREQ …
#define SI570_MAX_FREQ …
#define SI598_MAX_FREQ …
#define FDCO_MIN …
#define FDCO_MAX …
#define SI570_CNTRL_RECALL …
#define SI570_CNTRL_FREEZE_M …
#define SI570_CNTRL_NEWFREQ …
#define SI570_FREEZE_DCO …
struct clk_si570_info { … };
struct clk_si570 { … };
#define to_clk_si570(_hw) …
static int si570_get_divs(struct clk_si570 *data, u64 *rfreq,
unsigned int *n1, unsigned int *hs_div)
{ … }
static int si570_get_defaults(struct clk_si570 *data, u64 fout,
bool skip_recall)
{ … }
static int si570_update_rfreq(struct clk_si570 *data)
{ … }
static int si570_calc_divs(unsigned long frequency, struct clk_si570 *data,
u64 *out_rfreq, unsigned int *out_n1, unsigned int *out_hs_div)
{ … }
static unsigned long si570_recalc_rate(struct clk_hw *hw,
unsigned long parent_rate)
{ … }
static long si570_round_rate(struct clk_hw *hw, unsigned long rate,
unsigned long *parent_rate)
{ … }
static int si570_set_frequency(struct clk_si570 *data, unsigned long frequency)
{ … }
static int si570_set_frequency_small(struct clk_si570 *data,
unsigned long frequency)
{ … }
static int si570_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{ … }
static const struct clk_ops si570_clk_ops = …;
static bool si570_regmap_is_volatile(struct device *dev, unsigned int reg)
{ … }
static bool si570_regmap_is_writeable(struct device *dev, unsigned int reg)
{ … }
static const struct regmap_config si570_regmap_config = …;
static int si570_probe(struct i2c_client *client)
{ … }
static const struct clk_si570_info clk_si570_info = …;
static const struct clk_si570_info clk_si590_info = …;
static const struct i2c_device_id si570_id[] = …;
MODULE_DEVICE_TABLE(i2c, si570_id);
static const struct of_device_id clk_si570_of_match[] = …;
MODULE_DEVICE_TABLE(of, clk_si570_of_match);
static struct i2c_driver si570_driver = …;
module_i2c_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;