linux/drivers/clk/clk-mux.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2011 Sascha Hauer, Pengutronix <[email protected]>
 * Copyright (C) 2011 Richard Zhao, Linaro <[email protected]>
 * Copyright (C) 2011-2012 Mike Turquette, Linaro Ltd <[email protected]>
 *
 * Simple multiplexer clock implementation
 */

#include <linux/clk-provider.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/err.h>

/*
 * DOC: basic adjustable multiplexer clock that cannot gate
 *
 * Traits of this clock:
 * prepare - clk_prepare only ensures that parents are prepared
 * enable - clk_enable only ensures that parents are enabled
 * rate - rate is only affected by parent switching.  No clk_set_rate support
 * parent - parent is adjustable through clk_set_parent
 */

static inline u32 clk_mux_readl(struct clk_mux *mux)
{}

static inline void clk_mux_writel(struct clk_mux *mux, u32 val)
{}

int clk_mux_val_to_index(struct clk_hw *hw, const u32 *table, unsigned int flags,
			 unsigned int val)
{}
EXPORT_SYMBOL_GPL();

unsigned int clk_mux_index_to_val(const u32 *table, unsigned int flags, u8 index)
{}
EXPORT_SYMBOL_GPL();

static u8 clk_mux_get_parent(struct clk_hw *hw)
{}

static int clk_mux_set_parent(struct clk_hw *hw, u8 index)
{}

static int clk_mux_determine_rate(struct clk_hw *hw,
				  struct clk_rate_request *req)
{}

const struct clk_ops clk_mux_ops =;
EXPORT_SYMBOL_GPL();

const struct clk_ops clk_mux_ro_ops =;
EXPORT_SYMBOL_GPL();

struct clk_hw *__clk_hw_register_mux(struct device *dev, struct device_node *np,
		const char *name, u8 num_parents,
		const char * const *parent_names,
		const struct clk_hw **parent_hws,
		const struct clk_parent_data *parent_data,
		unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
		u8 clk_mux_flags, const u32 *table, spinlock_t *lock)
{}
EXPORT_SYMBOL_GPL();

static void devm_clk_hw_release_mux(struct device *dev, void *res)
{}

struct clk_hw *__devm_clk_hw_register_mux(struct device *dev, struct device_node *np,
		const char *name, u8 num_parents,
		const char * const *parent_names,
		const struct clk_hw **parent_hws,
		const struct clk_parent_data *parent_data,
		unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
		u8 clk_mux_flags, const u32 *table, spinlock_t *lock)
{}
EXPORT_SYMBOL_GPL();

struct clk *clk_register_mux_table(struct device *dev, const char *name,
		const char * const *parent_names, u8 num_parents,
		unsigned long flags, void __iomem *reg, u8 shift, u32 mask,
		u8 clk_mux_flags, const u32 *table, spinlock_t *lock)
{}
EXPORT_SYMBOL_GPL();

void clk_unregister_mux(struct clk *clk)
{}
EXPORT_SYMBOL_GPL();

void clk_hw_unregister_mux(struct clk_hw *hw)
{}
EXPORT_SYMBOL_GPL();