Lines Matching full:soc
4 * pinctrl-bindings.txt for MediaTek SoC.
66 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinmux_set_mux()
87 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinmux_gpio_request_enable()
92 hw->soc->gpio_m); in mtk_pinmux_gpio_request_enable()
102 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinmux_gpio_set_direction()
118 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinconf_get()
124 if (hw->soc->bias_get_combo) { in mtk_pinconf_get()
125 err = hw->soc->bias_get_combo(hw, desc, &pullup, &ret); in mtk_pinconf_get()
130 } else if (hw->soc->bias_disable_get) { in mtk_pinconf_get()
131 err = hw->soc->bias_disable_get(hw, desc, &ret); in mtk_pinconf_get()
139 if (hw->soc->bias_get_combo) { in mtk_pinconf_get()
140 err = hw->soc->bias_get_combo(hw, desc, &pullup, &ret); in mtk_pinconf_get()
147 } else if (hw->soc->bias_get) { in mtk_pinconf_get()
148 err = hw->soc->bias_get(hw, desc, 1, &ret); in mtk_pinconf_get()
156 if (hw->soc->bias_get_combo) { in mtk_pinconf_get()
157 err = hw->soc->bias_get_combo(hw, desc, &pullup, &ret); in mtk_pinconf_get()
164 } else if (hw->soc->bias_get) { in mtk_pinconf_get()
165 err = hw->soc->bias_get(hw, desc, 0, &ret); in mtk_pinconf_get()
207 if (hw->soc->drive_get) { in mtk_pinconf_get()
208 err = hw->soc->drive_get(hw, desc, &ret); in mtk_pinconf_get()
229 if (hw->soc->adv_pull_get) { in mtk_pinconf_get()
233 err = hw->soc->adv_pull_get(hw, desc, pullup, &ret); in mtk_pinconf_get()
257 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinconf_set()
267 if (hw->soc->bias_set_combo) { in mtk_pinconf_set()
268 err = hw->soc->bias_set_combo(hw, desc, 0, MTK_DISABLE); in mtk_pinconf_set()
271 } else if (hw->soc->bias_disable_set) { in mtk_pinconf_set()
272 err = hw->soc->bias_disable_set(hw, desc); in mtk_pinconf_set()
280 if (hw->soc->bias_set_combo) { in mtk_pinconf_set()
281 err = hw->soc->bias_set_combo(hw, desc, 1, arg); in mtk_pinconf_set()
284 } else if (hw->soc->bias_set) { in mtk_pinconf_set()
285 err = hw->soc->bias_set(hw, desc, 1); in mtk_pinconf_set()
293 if (hw->soc->bias_set_combo) { in mtk_pinconf_set()
294 err = hw->soc->bias_set_combo(hw, desc, 0, arg); in mtk_pinconf_set()
297 } else if (hw->soc->bias_set) { in mtk_pinconf_set()
298 err = hw->soc->bias_set(hw, desc, 0); in mtk_pinconf_set()
318 if (hw->soc->ies_present) { in mtk_pinconf_set()
362 if (hw->soc->drive_set) { in mtk_pinconf_set()
363 err = hw->soc->drive_set(hw, desc, arg); in mtk_pinconf_set()
381 if (hw->soc->adv_pull_set) { in mtk_pinconf_set()
385 err = hw->soc->adv_pull_set(hw, desc, pullup, in mtk_pinconf_set()
488 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_gpio_get()
504 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_gpio_set()
529 desc = (const struct mtk_pin_desc *)&hw->soc->pins[offset]; in mtk_gpio_to_irq()
544 desc = (const struct mtk_pin_desc *)&hw->soc->pins[offset]; in mtk_gpio_set_config()
574 chip->ngpio = hw->soc->npins; in mtk_build_gpiochip()
603 for (i = 0; i < hw->soc->ngrps; i++) { in mtk_build_groups()
604 const struct group_desc *group = hw->soc->grps + i; in mtk_build_groups()
622 for (i = 0; i < hw->soc->nfuncs ; i++) { in mtk_build_functions()
623 const struct function_desc *function = hw->soc->funcs + i; in mtk_build_functions()
640 const struct mtk_pin_soc *soc) in mtk_moore_pinctrl_probe() argument
651 hw->soc = soc; in mtk_moore_pinctrl_probe()
654 if (!hw->soc->nbase_names) in mtk_moore_pinctrl_probe()
656 "SoC should be assigned at least one register base\n"); in mtk_moore_pinctrl_probe()
658 hw->base = devm_kmalloc_array(&pdev->dev, hw->soc->nbase_names, in mtk_moore_pinctrl_probe()
663 for (i = 0; i < hw->soc->nbase_names; i++) { in mtk_moore_pinctrl_probe()
665 hw->soc->base_names[i]); in mtk_moore_pinctrl_probe()
670 hw->nbase = hw->soc->nbase_names; in mtk_moore_pinctrl_probe()
675 pins = devm_kmalloc_array(&pdev->dev, hw->soc->npins, sizeof(*pins), in mtk_moore_pinctrl_probe()
680 for (i = 0; i < hw->soc->npins; i++) { in mtk_moore_pinctrl_probe()
681 pins[i].number = hw->soc->pins[i].number; in mtk_moore_pinctrl_probe()
682 pins[i].name = hw->soc->pins[i].name; in mtk_moore_pinctrl_probe()
685 /* Setup pins descriptions per SoC types */ in mtk_moore_pinctrl_probe()
687 mtk_desc.npins = hw->soc->npins; in mtk_moore_pinctrl_probe()
699 /* Setup groups descriptions per SoC types */ in mtk_moore_pinctrl_probe()
704 /* Setup functions descriptions per SoC types */ in mtk_moore_pinctrl_probe()