mctrl_gpio_init(9)
π NAME π
okay so this is mctrl_gpio_init(9) from the Kernel API Manual, and its whole job is literally initialize uart gpios. That's the name, that's the assignment, periodt. π
β¨ SYNOPSIS β¨
Here's the call, bestie β copy it exactly, no gremlin edits:
struct mctrl_gpios * mctrl_gpio_init (struct uart_port *port , unsigned
int idx );
π ARGUMENTS π
portβ the port you're initializing gpios for, bestie. π«Άidxβ index of the gpio in the port's device. Lowkey important.
π¦ DESCRIPTION π¦
okay so what it does: it will get the {cts,rts,...}-gpios from the device tree if they are present, request them, set direction etc, and return an allocated structure. The way it's giving "I got you" β¨
It uses devm_* functions, so there's no need to explicitly free β that's the whole point of devm_* here. π
β οΈ important vibe check: this sets up the irq handling, so make sure to not handle changes to the gpio input lines in your driver, too. Like, don't also go doing that, bestie β that's the caution fr fr. π
π SEE ALSO π
- Kernel file
./drivers/tty/serial/serial_mctrl_gpio.cπ mctrl_gpio_set(9)mctrl_gpio_to_gpiod(9)mctrl_gpio_get(9)mctrl_gpio_enable_ms(9)mctrl_gpio_disable_ms_sync(9)mctrl_gpio_disable_ms_no_sync(9)
made with π and group-chat energy Β· source/version: ./drivers/tty/serial Β· date: October 2026 Β· page: mctrl_gpio_init(9) π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms