linux/drivers/clk/clk-si521xx.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * Driver for Skyworks Si521xx PCIe clock generator driver
 *
 * The following series can be supported:
 *   - Si52144 - 4x DIFF
 *   - Si52146 - 6x DIFF
 *   - Si52147 - 9x DIFF
 * Currently tested:
 *   - Si52144
 *
 * Copyright (C) 2022 Marek Vasut <[email protected]>
 */

#include <linux/bitfield.h>
#include <linux/bitrev.h>
#include <linux/clk-provider.h>
#include <linux/i2c.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/regmap.h>

/* OE1 and OE2 register */
#define SI521XX_REG_OE(n)
#define SI521XX_REG_ID
#define SI521XX_REG_ID_PROG
#define SI521XX_REG_ID_VENDOR
#define SI521XX_REG_BC
#define SI521XX_REG_DA
#define SI521XX_REG_DA_AMP_SEL
#define SI521XX_REG_DA_AMP_MASK
#define SI521XX_REG_DA_AMP_MIN
#define SI521XX_REG_DA_AMP_DEFAULT
#define SI521XX_REG_DA_AMP_MAX
#define SI521XX_REG_DA_AMP_STEP
#define SI521XX_REG_DA_AMP(UV)
#define SI521XX_REG_DA_UNKNOWN

/* Count of populated OE bits in control register ref, 1 and 2 */
#define SI521XX_OE_MAP(cr1, cr2)
#define SI521XX_OE_MAP_GET_OE(oe, map)

#define SI521XX_DIFF_MULT
#define SI521XX_DIFF_DIV

/* Supported Skyworks Si521xx models. */
enum si521xx_model {};

struct si521xx;

struct si_clk {};

struct si521xx {};

/*
 * Si521xx i2c regmap
 */
static const struct regmap_range si521xx_readable_ranges[] =;

static const struct regmap_access_table si521xx_readable_table =;

static const struct regmap_range si521xx_writeable_ranges[] =;

static const struct regmap_access_table si521xx_writeable_table =;

static int si521xx_regmap_i2c_write(void *context, unsigned int reg,
				    unsigned int val)
{}

static int si521xx_regmap_i2c_read(void *context, unsigned int reg,
				   unsigned int *val)
{}

static const struct regmap_config si521xx_regmap_config =;

static unsigned long si521xx_diff_recalc_rate(struct clk_hw *hw,
					      unsigned long parent_rate)
{}

static long si521xx_diff_round_rate(struct clk_hw *hw, unsigned long rate,
				    unsigned long *prate)
{}

static int si521xx_diff_set_rate(struct clk_hw *hw, unsigned long rate,
				 unsigned long parent_rate)
{}

#define to_si521xx_clk(_hw)

static int si521xx_diff_prepare(struct clk_hw *hw)
{}

static void si521xx_diff_unprepare(struct clk_hw *hw)
{}

static const struct clk_ops si521xx_diff_clk_ops =;

static int si521xx_get_common_config(struct si521xx *si)
{}

static void si521xx_update_config(struct si521xx *si)
{}

static void si521xx_diff_idx_to_reg_bit(const u16 chip_info, const int idx,
					struct si_clk *clk)
{}

static struct clk_hw *
si521xx_of_clk_get(struct of_phandle_args *clkspec, void *data)
{}

static int si521xx_probe(struct i2c_client *client)
{}

static int __maybe_unused si521xx_suspend(struct device *dev)
{}

static int __maybe_unused si521xx_resume(struct device *dev)
{}

static const struct i2c_device_id si521xx_id[] =;
MODULE_DEVICE_TABLE(i2c, si521xx_id);

static const struct of_device_id clk_si521xx_of_match[] =;
MODULE_DEVICE_TABLE(of, clk_si521xx_of_match);

static SIMPLE_DEV_PM_OPS(si521xx_pm_ops, si521xx_suspend, si521xx_resume);

static struct i2c_driver si521xx_driver =;
module_i2c_driver();

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();