Lines Matching full:soc

4  * bindings for MediaTek SoC.
110 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinmux_gpio_request_enable()
113 hw->soc->gpio_m); in mtk_pinmux_gpio_request_enable()
123 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinmux_gpio_set_direction()
137 if (pin >= hw->soc->npins) in mtk_pinconf_get()
140 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinconf_get()
146 if (!hw->soc->bias_get_combo) in mtk_pinconf_get()
148 err = hw->soc->bias_get_combo(hw, desc, &pullup, &ret); in mtk_pinconf_get()
201 if (!hw->soc->drive_get) in mtk_pinconf_get()
204 if (hw->soc->adv_drive_get) { in mtk_pinconf_get()
205 err = hw->soc->adv_drive_get(hw, desc, &ret); in mtk_pinconf_get()
216 err = hw->soc->drive_get(hw, desc, &ret); in mtk_pinconf_get()
219 if (!hw->soc->adv_drive_get) in mtk_pinconf_get()
222 err = hw->soc->adv_drive_get(hw, desc, &ret); in mtk_pinconf_get()
240 if (!hw->soc->adv_pull_get) in mtk_pinconf_get()
243 err = hw->soc->adv_pull_get(hw, desc, pullup, &ret); in mtk_pinconf_get()
246 if (!hw->soc->adv_drive_get) in mtk_pinconf_get()
248 err = hw->soc->adv_drive_get(hw, desc, &ret); in mtk_pinconf_get()
266 if (pin >= hw->soc->npins) in mtk_pinconf_set()
269 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinconf_set()
273 if (!hw->soc->bias_set_combo) in mtk_pinconf_set()
275 err = hw->soc->bias_set_combo(hw, desc, 0, MTK_DISABLE); in mtk_pinconf_set()
278 if (!hw->soc->bias_set_combo) in mtk_pinconf_set()
280 err = hw->soc->bias_set_combo(hw, desc, 1, arg); in mtk_pinconf_set()
283 if (!hw->soc->bias_set_combo) in mtk_pinconf_set()
285 err = hw->soc->bias_set_combo(hw, desc, 0, arg); in mtk_pinconf_set()
316 if (!hw->soc->drive_set) in mtk_pinconf_set()
318 err = hw->soc->drive_set(hw, desc, arg); in mtk_pinconf_set()
321 if (!hw->soc->adv_drive_set) in mtk_pinconf_set()
327 err = hw->soc->adv_drive_set(hw, desc, err); in mtk_pinconf_set()
337 if (!hw->soc->adv_pull_set) in mtk_pinconf_set()
339 err = hw->soc->adv_pull_set(hw, desc, in mtk_pinconf_set()
344 if (!hw->soc->adv_drive_set) in mtk_pinconf_set()
346 err = hw->soc->adv_drive_set(hw, desc, arg); in mtk_pinconf_set()
358 for (i = 0; i < hw->soc->ngrps; i++) { in mtk_pctrl_find_group_by_pin()
371 const struct mtk_pin_desc *pin = hw->soc->pins + pin_num; in mtk_pctrl_find_function_by_pin()
388 for (i = 0; i < hw->soc->npins; i++) { in mtk_pctrl_is_function_valid()
389 const struct mtk_pin_desc *pin = hw->soc->pins + i; in mtk_pctrl_is_function_valid()
494 if (pin >= hw->soc->npins || in mtk_pctrl_dt_subnode_to_map()
563 return hw->soc->ngrps; in mtk_pctrl_get_groups_count()
591 if (gpio >= hw->soc->npins) in mtk_hw_get_value_wrap()
594 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_hw_get_value_wrap()
631 if (gpio >= hw->soc->npins) in mtk_pctrl_show_one_pin()
637 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_pctrl_show_one_pin()
639 if (pinmux >= hw->soc->nfuncs) in mtk_pctrl_show_one_pin()
640 pinmux -= hw->soc->nfuncs; in mtk_pctrl_show_one_pin()
644 if (hw->soc->pull_type) in mtk_pctrl_show_one_pin()
645 try_all_type = hw->soc->pull_type[desc->number]; in mtk_pctrl_show_one_pin()
739 *num_groups = hw->soc->ngrps; in mtk_pmx_get_func_groups()
765 desc = (const struct mtk_pin_desc *)&hw->soc->pins[grp->pin]; in mtk_pmx_set_mux()
815 if (hw->soc->adv_drive_set && !drive_strength_uA_found && in mtk_pconf_group_set()
817 hw->soc->adv_drive_set(hw, &hw->soc->pins[grp->pin], 0); in mtk_pconf_group_set()
843 if (gpio >= hw->soc->npins) in mtk_gpio_get_direction()
853 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_gpio_get_direction()
871 if (gpio >= hw->soc->npins) in mtk_gpio_get()
874 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_gpio_get()
888 if (gpio >= hw->soc->npins) in mtk_gpio_set()
891 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_gpio_set()
900 if (gpio >= hw->soc->npins) in mtk_gpio_direction_input()
911 if (gpio >= hw->soc->npins) in mtk_gpio_direction_output()
927 desc = (const struct mtk_pin_desc *)&hw->soc->pins[offset]; in mtk_gpio_to_irq()
942 desc = (const struct mtk_pin_desc *)&hw->soc->pins[offset]; in mtk_gpio_set_config()
971 chip->ngpio = hw->soc->npins; in mtk_build_gpiochip()
986 hw->groups = devm_kmalloc_array(&pdev->dev, hw->soc->ngrps, in mtk_pctrl_build_state()
992 hw->grp_names = devm_kmalloc_array(&pdev->dev, hw->soc->ngrps, in mtk_pctrl_build_state()
997 for (i = 0; i < hw->soc->npins; i++) { in mtk_pctrl_build_state()
998 const struct mtk_pin_desc *pin = hw->soc->pins + i; in mtk_pctrl_build_state()
1023 hw->soc = device_get_match_data(dev); in mtk_paris_pinctrl_probe()
1024 if (!hw->soc) in mtk_paris_pinctrl_probe()
1029 if (!hw->soc->nbase_names) in mtk_paris_pinctrl_probe()
1031 "SoC should be assigned at least one register base\n"); in mtk_paris_pinctrl_probe()
1033 hw->base = devm_kmalloc_array(&pdev->dev, hw->soc->nbase_names, in mtk_paris_pinctrl_probe()
1038 for (i = 0; i < hw->soc->nbase_names; i++) { in mtk_paris_pinctrl_probe()
1040 hw->soc->base_names[i]); in mtk_paris_pinctrl_probe()
1045 hw->nbase = hw->soc->nbase_names; in mtk_paris_pinctrl_probe()
1057 pins = devm_kmalloc_array(&pdev->dev, hw->soc->npins, sizeof(*pins), in mtk_paris_pinctrl_probe()
1062 for (i = 0; i < hw->soc->npins; i++) { in mtk_paris_pinctrl_probe()
1063 pins[i].number = hw->soc->pins[i].number; in mtk_paris_pinctrl_probe()
1064 pins[i].name = hw->soc->pins[i].name; in mtk_paris_pinctrl_probe()
1067 /* Setup pins descriptions per SoC types */ in mtk_paris_pinctrl_probe()
1069 mtk_desc.npins = hw->soc->npins; in mtk_paris_pinctrl_probe()