Loading drivers/clk/clk.c +15 −0 Original line number Diff line number Diff line Loading @@ -2329,6 +2329,21 @@ int clk_set_flags(struct clk *clk, unsigned long flags) } EXPORT_SYMBOL_GPL(clk_set_flags); unsigned long clk_list_frequency(struct clk *clk, unsigned int index) { int ret = 0; if (!clk || !clk->core->ops->list_rate) return -EINVAL; clk_prepare_lock(); ret = clk->core->ops->list_rate(clk->core->hw, index, ULONG_MAX); clk_prepare_unlock(); return ret; } EXPORT_SYMBOL_GPL(clk_list_frequency); /*** debugfs support ***/ #ifdef CONFIG_DEBUG_FS Loading include/linux/clk.h +10 −0 Original line number Diff line number Diff line Loading @@ -430,6 +430,16 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id); */ int clk_set_flags(struct clk *clk, unsigned long flags); /** * clk_list_frequnecy - enumerate supported frequencies * @clk: clock source * @index: identify frequency to list * * Returns a non-negative integer frequency for success * or negative errno in case of failure. */ unsigned long clk_list_frequency(struct clk *clk, unsigned int index); #else /* !CONFIG_HAVE_CLK */ static inline struct clk *clk_get(struct device *dev, const char *id) Loading Loading
drivers/clk/clk.c +15 −0 Original line number Diff line number Diff line Loading @@ -2329,6 +2329,21 @@ int clk_set_flags(struct clk *clk, unsigned long flags) } EXPORT_SYMBOL_GPL(clk_set_flags); unsigned long clk_list_frequency(struct clk *clk, unsigned int index) { int ret = 0; if (!clk || !clk->core->ops->list_rate) return -EINVAL; clk_prepare_lock(); ret = clk->core->ops->list_rate(clk->core->hw, index, ULONG_MAX); clk_prepare_unlock(); return ret; } EXPORT_SYMBOL_GPL(clk_list_frequency); /*** debugfs support ***/ #ifdef CONFIG_DEBUG_FS Loading
include/linux/clk.h +10 −0 Original line number Diff line number Diff line Loading @@ -430,6 +430,16 @@ struct clk *clk_get_sys(const char *dev_id, const char *con_id); */ int clk_set_flags(struct clk *clk, unsigned long flags); /** * clk_list_frequnecy - enumerate supported frequencies * @clk: clock source * @index: identify frequency to list * * Returns a non-negative integer frequency for success * or negative errno in case of failure. */ unsigned long clk_list_frequency(struct clk *clk, unsigned int index); #else /* !CONFIG_HAVE_CLK */ static inline struct clk *clk_get(struct device *dev, const char *id) Loading