Lines Matching refs:gpio_cfg
32 mxc_gpio_cfg_t gpio_cfg; in pinctrl_configure_pin() local
43 gpio_cfg.port = (mxc_gpio_regs_t *)gpios[port]; in pinctrl_configure_pin()
44 gpio_cfg.mask = BIT(pin); in pinctrl_configure_pin()
47 gpio_cfg.pad = MXC_GPIO_PAD_PULL_UP; in pinctrl_configure_pin()
49 gpio_cfg.pad = MXC_GPIO_PAD_PULL_DOWN; in pinctrl_configure_pin()
51 gpio_cfg.pad = MXC_GPIO_PAD_NONE; in pinctrl_configure_pin()
55 gpio_cfg.func = MXC_GPIO_FUNC_IN; in pinctrl_configure_pin()
57 gpio_cfg.func = MXC_GPIO_FUNC_OUT; in pinctrl_configure_pin()
60 gpio_cfg.func = (mxc_gpio_func_t)(afx + 1); in pinctrl_configure_pin()
64 gpio_cfg.vssel = MXC_GPIO_VSSEL_VDDIOH; in pinctrl_configure_pin()
66 gpio_cfg.vssel = MXC_GPIO_VSSEL_VDDIO; in pinctrl_configure_pin()
69 gpio_cfg.drvstr = (pincfg >> MAX32_DRV_STRENGTH_SHIFT) & MAX32_DRV_STRENGTH_MASK; in pinctrl_configure_pin()
71 if (MXC_GPIO_Config(&gpio_cfg) != 0) { in pinctrl_configure_pin()
77 MXC_GPIO_OutSet(gpio_cfg.port, BIT(pin)); in pinctrl_configure_pin()
79 MXC_GPIO_OutClr(gpio_cfg.port, BIT(pin)); in pinctrl_configure_pin()