Lines Matching refs:desc
108 const struct mtk_pin_desc *desc; in mtk_pinmux_gpio_request_enable() local
110 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinmux_gpio_request_enable()
112 return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_MODE, in mtk_pinmux_gpio_request_enable()
121 const struct mtk_pin_desc *desc; in mtk_pinmux_gpio_set_direction() local
123 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinmux_gpio_set_direction()
126 return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, !input); in mtk_pinmux_gpio_set_direction()
135 const struct mtk_pin_desc *desc; in mtk_pinconf_get() local
140 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinconf_get()
148 err = hw->soc->bias_get_combo(hw, desc, &pullup, &ret); in mtk_pinconf_get()
165 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_SR, &ret); in mtk_pinconf_get()
168 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_IES, &ret); in mtk_pinconf_get()
173 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_DIR, &ret); in mtk_pinconf_get()
182 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_DO, &ret); in mtk_pinconf_get()
185 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_DIR, &ret); in mtk_pinconf_get()
196 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_SMT, &ret); 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()
222 err = hw->soc->adv_drive_get(hw, desc, &ret); in mtk_pinconf_get()
236 err = mtk_hw_get_value(hw, desc, reg, &ret); in mtk_pinconf_get()
243 err = hw->soc->adv_pull_get(hw, desc, pullup, &ret); in mtk_pinconf_get()
248 err = hw->soc->adv_drive_get(hw, desc, &ret); in mtk_pinconf_get()
262 const struct mtk_pin_desc *desc; in mtk_pinconf_set() local
269 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinconf_set()
275 err = hw->soc->bias_set_combo(hw, desc, 0, MTK_DISABLE); in mtk_pinconf_set()
280 err = hw->soc->bias_set_combo(hw, desc, 1, arg); in mtk_pinconf_set()
285 err = hw->soc->bias_set_combo(hw, desc, 0, arg); in mtk_pinconf_set()
289 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_IES, !!arg); in mtk_pinconf_set()
293 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SR, !!arg); in mtk_pinconf_set()
296 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO, in mtk_pinconf_set()
301 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, in mtk_pinconf_set()
309 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, !arg); in mtk_pinconf_set()
313 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, !!arg); in mtk_pinconf_set()
318 err = hw->soc->drive_set(hw, desc, arg); in mtk_pinconf_set()
327 err = hw->soc->adv_drive_set(hw, desc, err); in mtk_pinconf_set()
333 err = mtk_hw_set_value(hw, desc, reg, arg); in mtk_pinconf_set()
339 err = hw->soc->adv_pull_set(hw, desc, in mtk_pinconf_set()
346 err = hw->soc->adv_drive_set(hw, desc, arg); in mtk_pinconf_set()
590 const struct mtk_pin_desc *desc; in mtk_hw_get_value_wrap() local
596 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_hw_get_value_wrap()
598 err = mtk_hw_get_value(hw, desc, field, &value); in mtk_hw_get_value_wrap()
630 const struct mtk_pin_desc *desc; in mtk_pctrl_show_one_pin() local
639 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_pctrl_show_one_pin()
644 mtk_pinconf_bias_get_combo(hw, desc, &pullup, &pullen); in mtk_pctrl_show_one_pin()
647 try_all_type = hw->soc->pull_type[desc->number]; in mtk_pctrl_show_one_pin()
753 const struct mtk_pin_desc *desc; in mtk_pmx_set_mux() local
767 desc = (const struct mtk_pin_desc *)&hw->soc->pins[grp->pin]; in mtk_pmx_set_mux()
768 mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_MODE, desc_func->muxval); in mtk_pmx_set_mux()
844 const struct mtk_pin_desc *desc; in mtk_gpio_get_direction() local
857 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_gpio_get_direction()
859 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_DIR, &value); in mtk_gpio_get_direction()
872 const struct mtk_pin_desc *desc; in mtk_gpio_get() local
878 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_gpio_get()
880 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_DI, &value); in mtk_gpio_get()
890 const struct mtk_pin_desc *desc; in mtk_gpio_set() local
895 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_gpio_set()
897 mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO, !!value); in mtk_gpio_set()
926 const struct mtk_pin_desc *desc; in mtk_gpio_to_irq() local
931 desc = (const struct mtk_pin_desc *)&hw->soc->pins[offset]; in mtk_gpio_to_irq()
933 if (desc->eint.eint_n == EINT_NA) in mtk_gpio_to_irq()
936 return mtk_eint_find_irq(hw->eint, desc->eint.eint_n); in mtk_gpio_to_irq()
943 const struct mtk_pin_desc *desc; in mtk_gpio_set_config() local
946 desc = (const struct mtk_pin_desc *)&hw->soc->pins[offset]; in mtk_gpio_set_config()
950 desc->eint.eint_n == EINT_NA) in mtk_gpio_set_config()
955 return mtk_eint_set_debounce(hw->eint, desc->eint.eint_n, debounce); in mtk_gpio_set_config()