samsung_gpio_pm_2bit_resume(9)
π samsung_gpio_pm_2bit_resume β from the Kernel API Manual, bestie β¨
okay so picture this: it's samsung_gpio_pm_2bit_resume(9) and she's the function that gets your GPIO bank back on its feet after a lil nap π€ β full breakdown below, no cap π«Ά
β¨ NAME β¨
samsung_gpio_pm_2bit_resume β restore the given GPIO bank, slay π
π¦ SYNOPSIS π¦
void samsung_gpio_pm_2bit_resume (struct samsung_gpio_chip *chip );
π ARGUMENTS π
chipβ the chip information to resume. that's the whole vibe she needs to wake up πΈ
π DESCRIPTION π
So she restores one of the GPIO banks that was saved during suspend β¨. Easy, right? NOT. This is not as simple as once thought, because there's a real possibility of glitches depending on the order that the CON and DAT registers are set in π β yes the order literally matters, iykyk.
The three states the pin can be in are {IN,OUT,SFN}, which gives us 9 combinations of changes to check π₯. Three of these, if the pin stays in the same configuration, can be discounted (we don't need those, they're giving "nothing to see here" energy π
). That leaves us with the following, and honestly? iconic:
{ IN => OUT }β ChangeDATfirst{ IN => SFN }β ChangeCONfirst{ OUT => SFN }β ChangeCONfirst, so new data will not glitch{ OUT => IN }β ChangeCONfirst, so new data will not glitch{ SFN => IN }β ChangeCONfirst{ SFN => OUT }β ChangeDATfirst, so new data will not glitch [1]
We do not currently deal with the UP registers, because these control weak resistors π β so a small delay in change should not need to bring these into the calculations. she's just not in her era yet, and that's fine π.
[1] this assumes that writing to a pinDATwhilst inSFNwill set the state for when it is next output β
π SEE ALSO π
Kernel file ./arch/arm/mach-s3c/pm-gpio.c plus the whole friend group π«Ά: samsung_pm_save_gpio(9), samsung_pm_save_gpios(9), samsung_pm_resume_gpio(9)
and that's the tea π β this one's from ./arch/arm/mach-s3c, dated October 2026, and it's literally the samsung_gpio_pm_2bit_resume(9) page. go off, kernel documentation β¨ππ
π¦ 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