#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include "rsnd.h"
#define CLKA …
#define CLKB …
#define CLKC …
#define CLKI …
#define CLKINMAX …
#define CLKOUT …
#define CLKOUT1 …
#define CLKOUT2 …
#define CLKOUT3 …
#define CLKOUTMAX …
#define BRRx_MASK(x) …
static struct rsnd_mod_ops adg_ops = …;
#define ADG_HZ_441 …
#define ADG_HZ_48 …
#define ADG_HZ_SIZE …
struct rsnd_adg { … };
#define for_each_rsnd_clkin(pos, adg, i) …
#define for_each_rsnd_clkout(pos, adg, i) …
#define rsnd_priv_to_adg(priv) …
static const char * const clkin_name_gen4[] = …;
static const char * const clkin_name_gen2[] = …;
static const char * const clkout_name_gen2[] = …;
static u32 rsnd_adg_calculate_brgx(unsigned long div)
{ … }
static u32 rsnd_adg_ssi_ws_timing_gen2(struct rsnd_dai_stream *io)
{ … }
static void __rsnd_adg_get_timesel_ratio(struct rsnd_priv *priv,
struct rsnd_dai_stream *io,
unsigned int target_rate,
unsigned int *target_val,
unsigned int *target_en)
{ … }
static void rsnd_adg_get_timesel_ratio(struct rsnd_priv *priv,
struct rsnd_dai_stream *io,
unsigned int in_rate,
unsigned int out_rate,
u32 *in, u32 *out, u32 *en)
{ … }
int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_mod *cmd_mod,
struct rsnd_dai_stream *io)
{ … }
int rsnd_adg_set_src_timesel_gen2(struct rsnd_mod *src_mod,
struct rsnd_dai_stream *io,
unsigned int in_rate,
unsigned int out_rate)
{ … }
static void rsnd_adg_set_ssi_clk(struct rsnd_mod *ssi_mod, u32 val)
{ … }
int rsnd_adg_clk_query(struct rsnd_priv *priv, unsigned int rate)
{ … }
int rsnd_adg_ssi_clk_stop(struct rsnd_mod *ssi_mod)
{ … }
int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *ssi_mod, unsigned int rate)
{ … }
void rsnd_adg_clk_control(struct rsnd_priv *priv, int enable)
{ … }
static struct clk *rsnd_adg_create_null_clk(struct rsnd_priv *priv,
const char * const name,
const char *parent)
{ … }
static struct clk *rsnd_adg_null_clk_get(struct rsnd_priv *priv)
{ … }
static void rsnd_adg_null_clk_clean(struct rsnd_priv *priv)
{ … }
static int rsnd_adg_get_clkin(struct rsnd_priv *priv)
{ … }
static void rsnd_adg_unregister_clkout(struct rsnd_priv *priv)
{ … }
static int rsnd_adg_get_clkout(struct rsnd_priv *priv)
{ … }
#if defined(DEBUG) || defined(CONFIG_DEBUG_FS)
__printf(3, 4)
static void dbg_msg(struct device *dev, struct seq_file *m,
const char *fmt, ...)
{ … }
void rsnd_adg_clk_dbg_info(struct rsnd_priv *priv, struct seq_file *m)
{ … }
#else
#define rsnd_adg_clk_dbg_info …
#endif
int rsnd_adg_probe(struct rsnd_priv *priv)
{ … }
void rsnd_adg_remove(struct rsnd_priv *priv)
{ … }