mctrl_gpio_init(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– 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 🌈


made with πŸ’– and group-chat energy Β· source/version: ./drivers/tty/serial Β· date: October 2026 Β· page: mctrl_gpio_init(9) πŸŽ€

πŸ“¦ where this page comes from