Lines Matching refs:index
53 int index;
342 static int of_parse_clkspec(const struct device_node *np, int index,
347 static inline int of_parse_clkspec(const struct device_node *np, int index,
363 * @p_index: parent index to search for
399 int index = core->parents[p_index].index;
406 if (np && (name || index >= 0) &&
407 !of_parse_clkspec(np, index, name, &clkspec)) {
427 static void clk_core_fill_parent_index(struct clk_core *core, u8 index)
429 struct clk_parent_map *entry = &core->parents[index];
435 parent = clk_core_get(core, index);
454 u8 index)
456 if (!core || index >= core->num_parents || !core->parents)
459 if (!core->parents[index].core)
460 clk_core_fill_parent_index(core, index);
462 return core->parents[index].core;
466 clk_hw_get_parent_by_index(const struct clk_hw *hw, unsigned int index)
470 parent = clk_core_get_parent_by_index(hw->core, index);
1953 * clk_hw_get_parent_index - return the index of the parent clock
1956 * Fetches and returns the index of parent clock. Returns -EINVAL if the given
2237 /* try finding the new parent index */
2716 u8 index = 0;
2719 index = core->ops->get_parent(core->hw);
2721 return clk_core_get_parent_by_index(core, index);
2786 /* try finding the new parent index */
3430 * 4. Fetch parent clock's clock-output-name if DT index was set
3444 if (core->parents[i].index >= 0)
3445 name = of_clk_get_parent_name(core->of_node, core->parents[i].index);
4099 parent->index = -1;
4109 parent->index = parent_data[i].index;
4344 static int clk_nodrv_set_parent(struct clk_hw *hw, u8 index)
4812 pr_err("%s: invalid clock index %u\n", __func__, idx);
4827 pr_err("%s: invalid index %u\n", __func__, idx);
5013 * @index: index of phandle to parse clock out of. If index < 0, @name is used
5014 * @name: clock name to find and parse. If name is NULL, the index is used
5018 * phandle and cells for the index or name that is desired. The resulting clock
5020 * parsing error. The @index argument is ignored if @name is non-NULL.
5048 static int of_parse_clkspec(const struct device_node *np, int index,
5057 * "clock-names" property. If it cannot be found, then index
5062 index = of_property_match_string(np, "clock-names", name);
5064 index, out_args);
5067 if (name && index >= 0)
5078 index = 0;
5137 struct clk_hw *of_clk_get_hw(struct device_node *np, int index,
5144 ret = of_parse_clkspec(np, index, con_id, &clkspec);
5155 int index, const char *dev_id,
5158 struct clk_hw *hw = of_clk_get_hw(np, index, con_id);
5163 struct clk *of_clk_get(struct device_node *np, int index)
5165 return __of_clk_get(np, index, np->full_name, NULL);
5205 const char *of_clk_get_parent_name(const struct device_node *np, int index)
5216 rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index,
5221 index = clkspec.args_count ? clkspec.args[0] : 0;
5224 /* if there is an indices property, use it to transfer the index
5228 if (index == pv) {
5229 index = count;
5239 index,
5330 * @index: clock index
5345 int of_clk_detect_critical(struct device_node *np, int index,
5356 if (index == idx)