Lines Matching refs:func

35 	struct mtmips_pmx_func **func;  member
71 *pins = p->groups[group].func[0].pins; in mtmips_get_group_pins()
72 *num_pins = p->groups[group].func[0].pin_count; in mtmips_get_group_pins()
93 unsigned int func) in mtmips_pmx_func_name() argument
97 return p->func[func]->name; in mtmips_pmx_func_name()
101 unsigned int func, in mtmips_pmx_group_get_groups() argument
107 if (p->func[func]->group_count == 1) in mtmips_pmx_group_get_groups()
108 *groups = &p->group_names[p->func[func]->groups[0]]; in mtmips_pmx_group_get_groups()
112 *num_groups = p->func[func]->group_count; in mtmips_pmx_group_get_groups()
118 unsigned int func, unsigned int group) in mtmips_pmx_group_enable() argument
134 p->func[func]->enabled = 1; in mtmips_pmx_group_enable()
145 for (i = 0; i < p->groups[group].func[0].pin_count; i++) in mtmips_pmx_group_enable()
146 p->gpio[p->groups[group].func[0].pins[i]] = 1; in mtmips_pmx_group_enable()
149 if (func == 0) { in mtmips_pmx_group_enable()
152 for (i = 0; i < p->func[func]->pin_count; i++) in mtmips_pmx_group_enable()
153 p->gpio[p->func[func]->pins[i]] = 0; in mtmips_pmx_group_enable()
154 mode |= p->func[func]->value << shift; in mtmips_pmx_group_enable()
220 p->func = devm_kcalloc(p->dev, p->func_count, in mtmips_pinctrl_index()
221 sizeof(*p->func), GFP_KERNEL); in mtmips_pinctrl_index()
224 if (!p->func || !gpio_func.groups) in mtmips_pinctrl_index()
232 p->func[c] = &gpio_func; in mtmips_pinctrl_index()
238 p->func[c] = &p->groups[i].func[j]; in mtmips_pinctrl_index()
239 p->func[c]->groups = devm_kzalloc(p->dev, sizeof(int), in mtmips_pinctrl_index()
241 if (!p->func[c]->groups) in mtmips_pinctrl_index()
243 p->func[c]->groups[0] = i; in mtmips_pinctrl_index()
244 p->func[c]->group_count = 1; in mtmips_pinctrl_index()
262 if (!p->func[i]->pin_count) in mtmips_pinctrl_pins()
265 p->func[i]->pins = devm_kcalloc(p->dev, in mtmips_pinctrl_pins()
266 p->func[i]->pin_count, in mtmips_pinctrl_pins()
269 if (!p->func[i]->pins) in mtmips_pinctrl_pins()
271 for (j = 0; j < p->func[i]->pin_count; j++) in mtmips_pinctrl_pins()
272 p->func[i]->pins[j] = p->func[i]->pin_first + j; in mtmips_pinctrl_pins()
274 pin = p->func[i]->pin_first + p->func[i]->pin_count; in mtmips_pinctrl_pins()
289 if (!p->func[i]->pin_count) in mtmips_pinctrl_pins()
292 for (j = 0; j < p->func[i]->pin_count; j++) in mtmips_pinctrl_pins()
293 p->gpio[p->func[i]->pins[j]] = 0; in mtmips_pinctrl_pins()