gpiod_direction_output_raw(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… gpiod_direction_output_raw(9) πŸ’…

okay bestie, welcome to the Kernel API Manual entry for gpiod_direction_output_raw β€” yes, this is the one that sets a GPIO’s direction to output. Main character energy for a tiny pin. πŸ¦‹


🌸 NAME 🌸

gpiod_direction_output_raw β€” set the GPIO direction to output.


✨ SYNOPSIS ✨

int gpiod_direction_output_raw (struct gpio_desc *desc , int value );

πŸŽ€ ARGUMENTS πŸŽ€

  • desc β€” the GPIO you’re setting to output. πŸ’…
  • value β€” the initial output value of the GPIO. πŸ“

πŸ’… DESCRIPTION πŸ’…

okay so: this sets the direction of the passed GPIO to output. That’s the kind of setup where gpiod_set_value can be called safely on it.

Important detail, no skipping: the initial value of the output must be specified as a raw value on the physical line β€” without regard for the ACTIVE_LOW status. Like, raw raw. πŸ’€


πŸ”₯ RETURN πŸ”₯

0 on success, or a negative errno on failure. Slay when it’s zero, sad little bug when it’s negative. 😭


πŸ¦‹ SEE ALSO πŸ¦‹

This is the link-up. Kernel file ./drivers/gpio/gpiolib.c and all these (9) besties:


okay that’s the whole page, bestie. signed off from ./drivers/gpio, dated October 2026, for gpiod_direction_output_raw(9) β€” mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from