s3c_gpio_cfgpin(9)
π
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.
@pinpin β The pin number to configure.@toto β 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 π₯
- Kernel file
./arch/arm/mach-s3c/gpio-cfg.h - struct
samsung_gpio_cfg(9) s3c_gpio_cfgpin_range(9)s3c_gpio_setpull(9)s3c_gpio_cfgall_range(9)
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
- 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