modepin_gpio_dir_out(9)
π modepin_gpio_dir_out β like, the "make this pin an OUTPUT" function β¨
okay bestie, welcome to the Kernel API Manual π β yes, that Kernel API Manual, the one and only. today's main character is modepin_gpio_dir_out, and she has exactly one job: set the direction of the GPIO pin you point at to output. that's it. that's the whole vibe. no cap π«Ά
β¨ NAME β¨
modepin_gpio_dir_out β set the direction of the specified GPIO pin as output π
like literally, you hand her a pin, she makes it an output. iconic behaviour, honestly.
π¦ SYNOPSIS π¦
int modepin_gpio_dir_out (struct gpio_chip *chip , unsigned int pin ,
int state );
she returns an int, she takes a struct gpio_chip *chip, an unsigned int pin, and an int state. three arguments, zero drama. periodt π₯
πΈ ARGUMENTS πΈ
chipβ thegpio_chipinstance you're working on π§ like, the whole chip bestie, the device she lives inpinβ the gpio pin number within the device β¨ not the global one, the one inside this chip, okay?stateβ the value to be written to the specified pin π so she knows what to write
lowkey the most important part: these are the real argument names, so don't go renaming them in your head, iykyk π
π RETURN π
0 always. π
not "usually", not "on success" β always. she does not miss. she does not fail. she returns 0 and she moves on with her life. slay.
π SEE ALSO π
- Kernel file
./drivers/gpio/gpio-zynqmp-modepin.cβ go read the source, it's giving main character energy π modepin_gpio_get_value(9)β the "what's the value rn" bestiemodepin_gpio_set_value(9)β the "write a value" bestiemodepin_gpio_dir_in(9)β her opposite-direction sister π¦modepin_gpio_probe(9)β the origin story, the setup arc β
okay that's the whole page, bestie, you ate that ππ
mwah π β this came from the ./drivers/gpio corner of the world, dated October 2026, and it's modepin_gpio_dir_out(9) saying byeeee β¨π
π¦ 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