Lines Matching refs:table

45 static unsigned int _get_table_maxdiv(const struct clk_div_table *table,  in _get_table_maxdiv()  argument
51 for (clkt = table; clkt->div; clkt++) in _get_table_maxdiv()
57 static unsigned int _get_table_mindiv(const struct clk_div_table *table) in _get_table_mindiv() argument
62 for (clkt = table; clkt->div; clkt++) in _get_table_mindiv()
68 static unsigned int _get_maxdiv(const struct clk_div_table *table, u8 width, in _get_maxdiv() argument
75 if (table) in _get_maxdiv()
76 return _get_table_maxdiv(table, width); in _get_maxdiv()
80 static unsigned int _get_table_div(const struct clk_div_table *table, in _get_table_div() argument
85 for (clkt = table; clkt->div; clkt++) in _get_table_div()
91 static unsigned int _get_div(const struct clk_div_table *table, in _get_div() argument
100 if (table) in _get_div()
101 return _get_table_div(table, val); in _get_div()
105 static unsigned int _get_table_val(const struct clk_div_table *table, in _get_table_val() argument
110 for (clkt = table; clkt->div; clkt++) in _get_table_val()
116 static unsigned int _get_val(const struct clk_div_table *table, in _get_val() argument
125 if (table) in _get_val()
126 return _get_table_val(table, div); in _get_val()
132 const struct clk_div_table *table, in divider_recalc_rate() argument
137 div = _get_div(table, val, flags, width); in divider_recalc_rate()
158 return divider_recalc_rate(hw, parent_rate, val, divider->table, in clk_divider_recalc_rate()
162 static bool _is_valid_table_div(const struct clk_div_table *table, in _is_valid_table_div() argument
167 for (clkt = table; clkt->div; clkt++) in _is_valid_table_div()
173 static bool _is_valid_div(const struct clk_div_table *table, unsigned int div, in _is_valid_div() argument
178 if (table) in _is_valid_div()
179 return _is_valid_table_div(table, div); in _is_valid_div()
183 static int _round_up_table(const struct clk_div_table *table, int div) in _round_up_table() argument
188 for (clkt = table; clkt->div; clkt++) { in _round_up_table()
201 static int _round_down_table(const struct clk_div_table *table, int div) in _round_down_table() argument
204 int down = _get_table_mindiv(table); in _round_down_table()
206 for (clkt = table; clkt->div; clkt++) { in _round_down_table()
219 static int _div_round_up(const struct clk_div_table *table, in _div_round_up() argument
227 if (table) in _div_round_up()
228 div = _round_up_table(table, div); in _div_round_up()
233 static int _div_round_closest(const struct clk_div_table *table, in _div_round_closest() argument
246 } else if (table) { in _div_round_closest()
247 up = _round_up_table(table, up); in _div_round_closest()
248 down = _round_down_table(table, down); in _div_round_closest()
257 static int _div_round(const struct clk_div_table *table, in _div_round() argument
262 return _div_round_closest(table, parent_rate, rate, flags); in _div_round()
264 return _div_round_up(table, parent_rate, rate, flags); in _div_round()
276 static int _next_div(const struct clk_div_table *table, int div, in _next_div() argument
283 if (table) in _next_div()
284 return _round_up_table(table, div); in _next_div()
292 const struct clk_div_table *table, u8 width, in clk_divider_bestdiv() argument
302 maxdiv = _get_maxdiv(table, width, flags); in clk_divider_bestdiv()
306 bestdiv = _div_round(table, parent_rate, rate, flags); in clk_divider_bestdiv()
318 for (i = _next_div(table, 0, flags); i <= maxdiv; in clk_divider_bestdiv()
319 i = _next_div(table, i, flags)) { in clk_divider_bestdiv()
339 bestdiv = _get_maxdiv(table, width, flags); in clk_divider_bestdiv()
347 const struct clk_div_table *table, u8 width, in divider_determine_rate() argument
353 &req->best_parent_rate, table, width, flags); in divider_determine_rate()
362 const struct clk_div_table *table, u8 width, in divider_ro_determine_rate() argument
367 div = _get_div(table, val, flags, width); in divider_ro_determine_rate()
386 const struct clk_div_table *table, in divider_round_rate_parent() argument
396 ret = divider_determine_rate(hw, &req, table, width, flags); in divider_round_rate_parent()
408 const struct clk_div_table *table, u8 width, in divider_ro_round_rate_parent() argument
418 ret = divider_ro_determine_rate(hw, &req, table, width, flags, val); in divider_ro_round_rate_parent()
440 return divider_ro_round_rate(hw, rate, prate, divider->table, in clk_divider_round_rate()
445 return divider_round_rate(hw, rate, prate, divider->table, in clk_divider_round_rate()
461 return divider_ro_determine_rate(hw, req, divider->table, in clk_divider_determine_rate()
466 return divider_determine_rate(hw, req, divider->table, divider->width, in clk_divider_determine_rate()
471 const struct clk_div_table *table, u8 width, in divider_get_val() argument
478 if (!_is_valid_div(table, div, flags)) in divider_get_val()
481 value = _get_val(table, div, flags, width); in divider_get_val()
495 value = divider_get_val(rate, parent_rate, divider->table, in clk_divider_set_rate()
542 const struct clk_div_table *table, spinlock_t *lock) in __clk_hw_register_divider() argument
582 div->table = table; in __clk_hw_register_divider()
613 u8 clk_divider_flags, const struct clk_div_table *table, in clk_register_divider_table() argument
620 table, lock); in clk_register_divider_table()
668 const struct clk_div_table *table, spinlock_t *lock) in __devm_clk_hw_register_divider() argument
678 clk_divider_flags, table, lock); in __devm_clk_hw_register_divider()