#include <linux/bits.h>
#include <linux/clk-provider.h>
#include <linux/debugfs.h>
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/mfd/syscon.h>
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <dt-bindings/clock/starfive,jh7110-crg.h>
#define JH7110_PLL_OSC_RATE …
#define JH7110_PLL0_PD_OFFSET …
#define JH7110_PLL0_DACPD_SHIFT …
#define JH7110_PLL0_DACPD_MASK …
#define JH7110_PLL0_DSMPD_SHIFT …
#define JH7110_PLL0_DSMPD_MASK …
#define JH7110_PLL0_FBDIV_OFFSET …
#define JH7110_PLL0_FBDIV_SHIFT …
#define JH7110_PLL0_FBDIV_MASK …
#define JH7110_PLL0_FRAC_OFFSET …
#define JH7110_PLL0_PREDIV_OFFSET …
#define JH7110_PLL1_PD_OFFSET …
#define JH7110_PLL1_DACPD_SHIFT …
#define JH7110_PLL1_DACPD_MASK …
#define JH7110_PLL1_DSMPD_SHIFT …
#define JH7110_PLL1_DSMPD_MASK …
#define JH7110_PLL1_FBDIV_OFFSET …
#define JH7110_PLL1_FBDIV_SHIFT …
#define JH7110_PLL1_FBDIV_MASK …
#define JH7110_PLL1_FRAC_OFFSET …
#define JH7110_PLL1_PREDIV_OFFSET …
#define JH7110_PLL2_PD_OFFSET …
#define JH7110_PLL2_DACPD_SHIFT …
#define JH7110_PLL2_DACPD_MASK …
#define JH7110_PLL2_DSMPD_SHIFT …
#define JH7110_PLL2_DSMPD_MASK …
#define JH7110_PLL2_FBDIV_OFFSET …
#define JH7110_PLL2_FBDIV_SHIFT …
#define JH7110_PLL2_FBDIV_MASK …
#define JH7110_PLL2_FRAC_OFFSET …
#define JH7110_PLL2_PREDIV_OFFSET …
#define JH7110_PLL_FRAC_SHIFT …
#define JH7110_PLL_FRAC_MASK …
#define JH7110_PLL_POSTDIV1_SHIFT …
#define JH7110_PLL_POSTDIV1_MASK …
#define JH7110_PLL_PREDIV_SHIFT …
#define JH7110_PLL_PREDIV_MASK …
enum jh7110_pll_mode { … };
struct jh7110_pll_preset { … };
struct jh7110_pll_info { … };
#define _JH7110_PLL(_idx, _name, _presets) …
#define JH7110_PLL(idx, name, presets) …
struct jh7110_pll_data { … };
struct jh7110_pll_priv { … };
struct jh7110_pll_regvals { … };
static const struct jh7110_pll_preset jh7110_pll0_presets[] = …;
static const struct jh7110_pll_preset jh7110_pll1_presets[] = …;
static const struct jh7110_pll_preset jh7110_pll2_presets[] = …;
static const struct jh7110_pll_info jh7110_plls[JH7110_PLLCLK_END] = …;
static struct jh7110_pll_data *jh7110_pll_data_from(struct clk_hw *hw)
{ … }
static struct jh7110_pll_priv *jh7110_pll_priv_from(struct jh7110_pll_data *pll)
{ … }
static void jh7110_pll_regvals_get(struct regmap *regmap,
const struct jh7110_pll_info *info,
struct jh7110_pll_regvals *ret)
{ … }
static unsigned long jh7110_pll_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
{ … }
static int jh7110_pll_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
{ … }
static int jh7110_pll_set_rate(struct clk_hw *hw, unsigned long rate,
unsigned long parent_rate)
{ … }
#ifdef CONFIG_DEBUG_FS
static int jh7110_pll_registers_read(struct seq_file *s, void *unused)
{ … }
static int jh7110_pll_registers_open(struct inode *inode, struct file *f)
{ … }
static const struct file_operations jh7110_pll_registers_ops = …;
static void jh7110_pll_debug_init(struct clk_hw *hw, struct dentry *dentry)
{ … }
#else
#define jh7110_pll_debug_init …
#endif
static const struct clk_ops jh7110_pll_ops = …;
static struct clk_hw *jh7110_pll_get(struct of_phandle_args *clkspec, void *data)
{ … }
static int jh7110_pll_probe(struct platform_device *pdev)
{ … }
static const struct of_device_id jh7110_pll_match[] = …;
MODULE_DEVICE_TABLE(of, jh7110_pll_match);
static struct platform_driver jh7110_pll_driver = …;
builtin_platform_driver_probe(…);