}
EXPORT_SYMBOL_GPL(__clk_determine_rate);
+++++/**
+++++ * clk_hw_round_rate() - round the given rate for a hw clk
+++++ * @hw: the hw clk for which we are rounding a rate
+++++ * @rate: the rate which is to be rounded
+++++ *
+++++ * Takes in a rate as input and rounds it to a rate that the clk can actually
+++++ * use.
+++++ *
+++++ * Context: prepare_lock must be held.
+++++ * For clk providers to call from within clk_ops such as .round_rate,
+++++ * .determine_rate.
+++++ *
+++++ * Return: returns rounded rate of hw clk if clk supports round_rate operation
+++++ * else returns the parent rate.
+++++ */
unsigned long clk_hw_round_rate(struct clk_hw *hw, unsigned long rate)
{
int ret;
}
#define clk_rate_mode 0644
+++++
+++++ static int clk_prepare_enable_set(void *data, u64 val)
+++++ {
+++++ struct clk_core *core = data;
+++++ int ret = 0;
+++++
+++++ if (val)
+++++ ret = clk_prepare_enable(core->hw->clk);
+++++ else
+++++ clk_disable_unprepare(core->hw->clk);
+++++
+++++ return ret;
+++++ }
+++++
+++++ static int clk_prepare_enable_get(void *data, u64 *val)
+++++ {
+++++ struct clk_core *core = data;
+++++
+++++ *val = core->enable_count && core->prepare_count;
+++++ return 0;
+++++ }
+++++
+++++ DEFINE_DEBUGFS_ATTRIBUTE(clk_prepare_enable_fops, clk_prepare_enable_get,
+++++ clk_prepare_enable_set, "%llu\n");
+++++
#else
#define clk_rate_set NULL
#define clk_rate_mode 0444
debugfs_create_u32("clk_notifier_count", 0444, root, &core->notifier_count);
debugfs_create_file("clk_duty_cycle", 0444, root, core,
&clk_duty_cycle_fops);
+++++ #ifdef CLOCK_ALLOW_WRITE_DEBUGFS
+++++ debugfs_create_file("clk_prepare_enable", 0644, root, core,
+++++ &clk_prepare_enable_fops);
+++++ #endif
if (core->num_parents > 0)
debugfs_create_file("clk_parent", 0444, root, core,
/**
* devm_clk_unregister - resource managed clk_unregister()
+++++ * @dev: device that is unregistering the clock data
* @clk: clock to unregister
*
* Deallocate a clock allocated with devm_clk_register(). Normally
* @node: Pointer to device tree node of clock provider
* @get: Get clock callback. Returns NULL or a struct clk for the
* given clock specifier
+++++ * @get_hw: Get clk_hw callback. Returns NULL, ERR_PTR or a
+++++ * struct clk_hw for the given clock specifier
* @data: context pointer to be passed into @get callback
*/
struct of_clk_provider {