Lines Matching refs:gpio
354 struct gpio *gpio) in stm32_gpio_configure() argument
360 unsigned int shift_1b = gpio->pin; in stm32_gpio_configure()
361 unsigned int shift_2b = SHIFT_U32(gpio->pin, 1); in stm32_gpio_configure()
365 if (gpio->dt_flags & GPIO_PULL_UP) in stm32_gpio_configure()
367 else if (gpio->dt_flags & GPIO_PULL_DOWN) in stm32_gpio_configure()
372 if (gpio->dt_flags & GPIO_LINE_OPEN_DRAIN) in stm32_gpio_configure()
395 static void stm32_gpio_put_gpio(struct gpio_chip *chip, struct gpio *gpio) in stm32_gpio_put_gpio() argument
408 state->gpio_pinctrl.pin == gpio->pin) { in stm32_gpio_put_gpio()
412 release_rif_semaphore_if_acquired(bank, gpio->pin); in stm32_gpio_put_gpio()
414 free(gpio); in stm32_gpio_put_gpio()
817 struct gpio **out_gpio) in stm32_gpio_get_dt()
824 struct gpio *gpio = NULL; in stm32_gpio_get_dt() local
830 res = gpio_dt_alloc_pin(pargs, &gpio); in stm32_gpio_get_dt()
834 if (gpio->pin >= bank->ngpios) { in stm32_gpio_get_dt()
836 free(gpio); in stm32_gpio_get_dt()
840 if (gpio->dt_flags & GPIO_STM32_NSEC) in stm32_gpio_get_dt()
845 free(gpio); in stm32_gpio_get_dt()
851 reg_state->gpio_pinctrl.pin == gpio->pin) { in stm32_gpio_get_dt()
853 consumer_name, bank->bank_id + 'A', gpio->pin); in stm32_gpio_get_dt()
855 free(gpio); in stm32_gpio_get_dt()
860 if (!pin_is_accessible(bank, gpio->pin)) { in stm32_gpio_get_dt()
862 consumer_name, bank->bank_id + 'A', gpio->pin); in stm32_gpio_get_dt()
866 res = acquire_rif_semaphore_if_needed(bank, gpio->pin); in stm32_gpio_get_dt()
869 bank->bank_id + 'A', gpio->pin, consumer_name); in stm32_gpio_get_dt()
875 consumer_name, bank->bank_id + 'A', gpio->pin); in stm32_gpio_get_dt()
879 if (gpio_secure != pin_is_secure(bank, gpio->pin)) { in stm32_gpio_get_dt()
882 bank->bank_id + 'A', gpio->pin, in stm32_gpio_get_dt()
883 pin_is_secure(bank, gpio->pin) ? "secure" : "non-secure", in stm32_gpio_get_dt()
889 state->gpio_pinctrl.pin = gpio->pin; in stm32_gpio_get_dt()
895 gpio->chip = &bank->gpio_chip; in stm32_gpio_get_dt()
897 *out_gpio = gpio; in stm32_gpio_get_dt()