Lines Matching refs:index

57 	int			index;
437 static int of_parse_clkspec(const struct device_node *np, int index,
442 static inline int of_parse_clkspec(const struct device_node *np, int index,
458 * @p_index: parent index to search for
494 int index = core->parents[p_index].index;
501 if (np && (name || index >= 0) &&
502 !of_parse_clkspec(np, index, name, &clkspec)) {
522 static void clk_core_fill_parent_index(struct clk_core *core, u8 index)
524 struct clk_parent_map *entry = &core->parents[index];
537 parent = clk_core_get(core, index);
548 u8 index)
550 if (!core || index >= core->num_parents || !core->parents)
553 if (!core->parents[index].core)
554 clk_core_fill_parent_index(core, index);
556 return core->parents[index].core;
560 clk_hw_get_parent_by_index(const struct clk_hw *hw, unsigned int index)
564 parent = clk_core_get_parent_by_index(hw->core, index);
1811 * clk_hw_get_parent_index - return the index of the parent clock
1814 * Fetches and returns the index of parent clock. Returns -EINVAL if the given
2094 /* try finding the new parent index */
2555 u8 index = 0;
2558 index = core->ops->get_parent(core->hw);
2560 return clk_core_get_parent_by_index(core, index);
2639 /* try finding the new parent index */
3271 * 4. Fetch parent clock's clock-output-name if DT index was set
3285 if (core->parents[i].index >= 0)
3286 name = of_clk_get_parent_name(core->of_node, core->parents[i].index);
3879 parent->index = -1;
3889 parent->index = parent_data[i].index;
4127 static int clk_nodrv_set_parent(struct clk_hw *hw, u8 index)
4555 pr_err("%s: invalid clock index %u\n", __func__, idx);
4570 pr_err("%s: invalid index %u\n", __func__, idx);
4768 * @index: index of phandle to parse clock out of. If index < 0, @name is used
4769 * @name: clock name to find and parse. If name is NULL, the index is used
4773 * phandle and cells for the index or name that is desired. The resulting clock
4775 * parsing error. The @index argument is ignored if @name is non-NULL.
4803 static int of_parse_clkspec(const struct device_node *np, int index,
4812 * "clock-names" property. If it cannot be found, then index
4817 index = of_property_match_string(np, "clock-names", name);
4819 index, out_args);
4822 if (name && index >= 0)
4833 index = 0;
4892 struct clk_hw *of_clk_get_hw(struct device_node *np, int index,
4899 ret = of_parse_clkspec(np, index, con_id, &clkspec);
4910 int index, const char *dev_id,
4913 struct clk_hw *hw = of_clk_get_hw(np, index, con_id);
4918 struct clk *of_clk_get(struct device_node *np, int index)
4920 return __of_clk_get(np, index, np->full_name, NULL);
4960 const char *of_clk_get_parent_name(const struct device_node *np, int index)
4971 rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", index,
4976 index = clkspec.args_count ? clkspec.args[0] : 0;
4979 /* if there is an indices property, use it to transfer the index
4983 if (index == pv) {
4984 index = count;
4994 index,
5085 * @index: clock index
5100 int of_clk_detect_critical(struct device_node *np, int index,
5111 if (index == idx)