Lines Matching refs:grp
109 struct mvebu_pinctrl *pctl, struct mvebu_pinctrl_group *grp, in mvebu_pinctrl_find_setting_by_val() argument
114 for (n = 0; n < grp->num_settings; n++) { in mvebu_pinctrl_find_setting_by_val()
115 if (config == grp->settings[n].val) { in mvebu_pinctrl_find_setting_by_val()
117 grp->settings[n].variant)) in mvebu_pinctrl_find_setting_by_val()
118 return &grp->settings[n]; in mvebu_pinctrl_find_setting_by_val()
126 struct mvebu_pinctrl *pctl, struct mvebu_pinctrl_group *grp, in mvebu_pinctrl_find_setting_by_name() argument
131 for (n = 0; n < grp->num_settings; n++) { in mvebu_pinctrl_find_setting_by_name()
132 if (strcmp(name, grp->settings[n].name) == 0) { in mvebu_pinctrl_find_setting_by_name()
134 grp->settings[n].variant)) in mvebu_pinctrl_find_setting_by_name()
135 return &grp->settings[n]; in mvebu_pinctrl_find_setting_by_name()
143 struct mvebu_pinctrl *pctl, struct mvebu_pinctrl_group *grp) in mvebu_pinctrl_find_gpio_setting() argument
147 for (n = 0; n < grp->num_settings; n++) { in mvebu_pinctrl_find_gpio_setting()
148 if (grp->settings[n].flags & in mvebu_pinctrl_find_gpio_setting()
151 grp->settings[n].variant)) in mvebu_pinctrl_find_gpio_setting()
152 return &grp->settings[n]; in mvebu_pinctrl_find_gpio_setting()
176 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; in mvebu_pinconf_group_get() local
178 if (!grp->ctrl) in mvebu_pinconf_group_get()
181 return grp->ctrl->mpp_get(grp->data, grp->pins[0], config); in mvebu_pinconf_group_get()
189 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; in mvebu_pinconf_group_set() local
192 if (!grp->ctrl) in mvebu_pinconf_group_set()
196 ret = grp->ctrl->mpp_set(grp->data, grp->pins[0], configs[i]); in mvebu_pinconf_group_set()
208 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; in mvebu_pinconf_group_dbg_show() local
216 curr = mvebu_pinctrl_find_setting_by_val(pctl, grp, config); in mvebu_pinconf_group_dbg_show()
234 if (grp->num_settings > 1) { in mvebu_pinconf_group_dbg_show()
236 for (n = 0; n < grp->num_settings; n++) { in mvebu_pinconf_group_dbg_show()
237 if (curr == &grp->settings[n]) in mvebu_pinconf_group_dbg_show()
242 !(pctl->variant & grp->settings[n].variant)) in mvebu_pinconf_group_dbg_show()
245 seq_printf(s, " %s", grp->settings[n].name); in mvebu_pinconf_group_dbg_show()
246 if (grp->settings[n].subname) in mvebu_pinconf_group_dbg_show()
247 seq_printf(s, "(%s)", grp->settings[n].subname); in mvebu_pinconf_group_dbg_show()
248 if (grp->settings[n].flags & in mvebu_pinconf_group_dbg_show()
251 if (grp->settings[n].flags & MVEBU_SETTING_GPI) in mvebu_pinconf_group_dbg_show()
253 if (grp->settings[n].flags & MVEBU_SETTING_GPO) in mvebu_pinconf_group_dbg_show()
299 struct mvebu_pinctrl_group *grp = &pctl->groups[gid]; in mvebu_pinmux_set() local
304 setting = mvebu_pinctrl_find_setting_by_name(pctl, grp, in mvebu_pinmux_set()
314 ret = mvebu_pinconf_group_set(pctldev, grp->gid, &config, 1); in mvebu_pinmux_set()
328 struct mvebu_pinctrl_group *grp; in mvebu_pinmux_gpio_request_enable() local
332 grp = mvebu_pinctrl_find_group_by_pid(pctl, offset); in mvebu_pinmux_gpio_request_enable()
333 if (!grp) in mvebu_pinmux_gpio_request_enable()
336 if (grp->ctrl->mpp_gpio_req) in mvebu_pinmux_gpio_request_enable()
337 return grp->ctrl->mpp_gpio_req(grp->data, offset); in mvebu_pinmux_gpio_request_enable()
339 setting = mvebu_pinctrl_find_gpio_setting(pctl, grp); in mvebu_pinmux_gpio_request_enable()
345 return mvebu_pinconf_group_set(pctldev, grp->gid, &config, 1); in mvebu_pinmux_gpio_request_enable()
352 struct mvebu_pinctrl_group *grp; in mvebu_pinmux_gpio_set_direction() local
355 grp = mvebu_pinctrl_find_group_by_pid(pctl, offset); in mvebu_pinmux_gpio_set_direction()
356 if (!grp) in mvebu_pinmux_gpio_set_direction()
359 if (grp->ctrl->mpp_gpio_dir) in mvebu_pinmux_gpio_set_direction()
360 return grp->ctrl->mpp_gpio_dir(grp->data, offset, input); in mvebu_pinmux_gpio_set_direction()
362 setting = mvebu_pinctrl_find_gpio_setting(pctl, grp); in mvebu_pinmux_gpio_set_direction()
439 struct mvebu_pinctrl_group *grp = in mvebu_pinctrl_dt_node_to_map() local
442 if (!grp) { in mvebu_pinctrl_dt_node_to_map()
447 if (!mvebu_pinctrl_find_setting_by_name(pctl, grp, function)) { in mvebu_pinctrl_dt_node_to_map()
517 struct mvebu_pinctrl_group *grp = &pctl->groups[n]; in mvebu_pinctrl_build_functions() local
518 for (s = 0; s < grp->num_settings; s++) { in mvebu_pinctrl_build_functions()
523 !(pctl->variant & grp->settings[s].variant)) in mvebu_pinctrl_build_functions()
528 grp->settings[s].name); in mvebu_pinctrl_build_functions()
544 struct mvebu_pinctrl_group *grp = &pctl->groups[n]; in mvebu_pinctrl_build_functions() local
545 for (s = 0; s < grp->num_settings; s++) { in mvebu_pinctrl_build_functions()
551 !(pctl->variant & grp->settings[s].variant)) in mvebu_pinctrl_build_functions()
555 grp->settings[s].name); in mvebu_pinctrl_build_functions()
571 *groups = grp->name; in mvebu_pinctrl_build_functions()
699 struct mvebu_pinctrl_group *grp; in mvebu_pinctrl_probe() local
729 grp = mvebu_pinctrl_find_group_by_pid(pctl, mode->pid); in mvebu_pinctrl_probe()
730 if (!grp) { in mvebu_pinctrl_probe()
736 grp->settings = mode->settings; in mvebu_pinctrl_probe()
737 grp->num_settings = num_settings; in mvebu_pinctrl_probe()