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