Lines Matching refs:desc
62 const struct mtk_pin_desc *desc; in mtk_pinmux_set_mux() local
66 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinmux_set_mux()
67 if (!desc->name) in mtk_pinmux_set_mux()
70 mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_MODE, in mtk_pinmux_set_mux()
82 const struct mtk_pin_desc *desc; in mtk_pinmux_gpio_request_enable() local
84 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinmux_gpio_request_enable()
85 if (!desc->name) in mtk_pinmux_gpio_request_enable()
88 return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_MODE, in mtk_pinmux_gpio_request_enable()
97 const struct mtk_pin_desc *desc; in mtk_pinmux_gpio_set_direction() local
99 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinmux_gpio_set_direction()
100 if (!desc->name) in mtk_pinmux_gpio_set_direction()
104 return mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, !input); in mtk_pinmux_gpio_set_direction()
113 const struct mtk_pin_desc *desc; in mtk_pinconf_get() local
115 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinconf_get()
116 if (!desc->name) in mtk_pinconf_get()
122 err = hw->soc->bias_get_combo(hw, desc, &pullup, &ret); in mtk_pinconf_get()
128 err = hw->soc->bias_disable_get(hw, desc, &ret); in mtk_pinconf_get()
137 err = hw->soc->bias_get_combo(hw, desc, &pullup, &ret); in mtk_pinconf_get()
145 err = hw->soc->bias_get(hw, desc, 1, &ret); in mtk_pinconf_get()
154 err = hw->soc->bias_get_combo(hw, desc, &pullup, &ret); in mtk_pinconf_get()
162 err = hw->soc->bias_get(hw, desc, 0, &ret); in mtk_pinconf_get()
170 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_SR, &val); in mtk_pinconf_get()
180 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_DIR, &val); in mtk_pinconf_get()
191 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_DIR, &val); in mtk_pinconf_get()
195 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_SMT, &val2); in mtk_pinconf_get()
205 err = hw->soc->drive_get(hw, desc, &ret); in mtk_pinconf_get()
217 err = mtk_hw_get_value(hw, desc, reg, &val); in mtk_pinconf_get()
230 err = hw->soc->adv_pull_get(hw, desc, pullup, &ret); in mtk_pinconf_get()
250 const struct mtk_pin_desc *desc; in mtk_pinconf_set() local
254 desc = (const struct mtk_pin_desc *)&hw->soc->pins[pin]; in mtk_pinconf_set()
255 if (!desc->name) in mtk_pinconf_set()
265 err = hw->soc->bias_set_combo(hw, desc, 0, MTK_DISABLE); in mtk_pinconf_set()
269 err = hw->soc->bias_disable_set(hw, desc); in mtk_pinconf_set()
278 err = hw->soc->bias_set_combo(hw, desc, 1, arg); in mtk_pinconf_set()
282 err = hw->soc->bias_set(hw, desc, 1); in mtk_pinconf_set()
291 err = hw->soc->bias_set_combo(hw, desc, 0, arg); in mtk_pinconf_set()
295 err = hw->soc->bias_set(hw, desc, 0); in mtk_pinconf_set()
303 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, in mtk_pinconf_set()
308 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, in mtk_pinconf_set()
316 mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_IES, in mtk_pinconf_set()
320 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, in mtk_pinconf_set()
326 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SR, in mtk_pinconf_set()
333 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, in mtk_pinconf_set()
338 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO, in mtk_pinconf_set()
348 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DIR, in mtk_pinconf_set()
353 err = mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_SMT, in mtk_pinconf_set()
360 err = hw->soc->drive_set(hw, desc, arg); in mtk_pinconf_set()
372 err = mtk_hw_set_value(hw, desc, reg, arg); in mtk_pinconf_set()
382 err = hw->soc->adv_pull_set(hw, desc, pullup, in mtk_pinconf_set()
482 const struct mtk_pin_desc *desc; in mtk_gpio_get() local
485 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_gpio_get()
486 if (!desc->name) in mtk_gpio_get()
489 err = mtk_hw_get_value(hw, desc, PINCTRL_PIN_REG_DI, &value); in mtk_gpio_get()
499 const struct mtk_pin_desc *desc; in mtk_gpio_set() local
501 desc = (const struct mtk_pin_desc *)&hw->soc->pins[gpio]; in mtk_gpio_set()
502 if (!desc->name) { in mtk_gpio_set()
507 mtk_hw_set_value(hw, desc, PINCTRL_PIN_REG_DO, !!value); in mtk_gpio_set()
526 const struct mtk_pin_desc *desc; in mtk_gpio_to_irq() local
531 desc = (const struct mtk_pin_desc *)&hw->soc->pins[offset]; in mtk_gpio_to_irq()
533 if (desc->eint.eint_n == (u16)EINT_NA) in mtk_gpio_to_irq()
536 return mtk_eint_find_irq(hw->eint, desc->eint.eint_n); in mtk_gpio_to_irq()
543 const struct mtk_pin_desc *desc; in mtk_gpio_set_config() local
546 desc = (const struct mtk_pin_desc *)&hw->soc->pins[offset]; in mtk_gpio_set_config()
547 if (!desc->name) in mtk_gpio_set_config()
552 desc->eint.eint_n == (u16)EINT_NA) in mtk_gpio_set_config()
557 return mtk_eint_set_debounce(hw->eint, desc->eint.eint_n, debounce); in mtk_gpio_set_config()