s3c_gpio_cfgpin(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… s3c_gpio_cfgpin(9) β€” Kernel API Manual πŸ’…

okay so bestie, welcome to the s3c_gpio_cfgpin(9) page from the Kernel API Manual β€” it’s giving β€œchange the function of a GPIO pin” main character energy ✨

🌸 NAME 🌸

s3c_gpio_cfgpin β€” Change the GPIO function of a pin.

  • @pin pin β€” The pin number to configure.
  • @to to β€” The configuration for the pin's function.

✨ SYNOPSIS ✨

int s3c_gpio_cfgpin (unsigned int pin , unsigned int to );

πŸŽ€ ARGUMENTS πŸŽ€

  • pin β€” -- undescribed --
  • to β€” -- undescribed --

not the man page being mysterious about both args 😭 that’s literally what it says, no cap.

πŸ¦‹ DESCRIPTION πŸ¦‹

Configure which function is actually connected to the external pin, such as an gpio input, output or some form of special function connected to an internal peripheral block.

The to parameter can be one of the generic S3C_GPIO_INPUT, S3C_GPIO_OUTPUT or S3C_GPIO_SFN to indicate one of the possible values that the helper will then generate the correct bit mask and shift for the configuration.

If a bank of GPIOs all needs to be set to special-function 2, then the following code will work:

for (gpio = start; gpio < end; gpio++) s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2));

The to parameter can also be a specific value already shifted to the correct position in the control register, although these are discouraged in newer kernels and are only being kept for compatibility.

bestie, heads up: those already-shifted control-register values are discouraged in newer kernels and are only being kept for compatibility 🫢

πŸ”₯ SEE ALSO πŸ”₯


That’s the whole vibe check, bestie πŸ’– This iconic page is from source/version ./arch/arm/mach-s3c, dated October 2026, and it’s literally s3c_gpio_cfgpin(9) β€” periodt πŸŽ€βœ¨

πŸ“¦ where this page comes from