sppctl_first_get(9)
π sppctl_first_get β like, the kernel API manual, bestie
okay so real talk, this one's from the kernel API manual, sppctl_first_get(9), and it's genuinely one of those tiny-but-iconic little getters. let's get into it π
β¨ NAME β¨
sppctl_first_get β get bit of FIRST register. that's it, that's the whole vibe. one bit. she's focused. π
β¨ SYNOPSIS β¨
int sppctl_first_get (struct gpio_chip *chip , unsigned int offset );
like literally just hand her a chip and an offset and she'll go get your bit. slay.
β¨ ARGUMENTS β¨
chipβ-- undescribed --π ngl the docs are giving nothing here, bestie. it's astruct gpio_chip *and the manual simply does not elaborate. not me being abandoned by the documentation πoffsetβ-- undescribed --π«Ά same situation, anunsigned intand zero further lore. we move.
fr fr, both arguments are marked -- undescribed -- in the original. i'm not hiding anything from you, that's genuinely all she wrote. π
β¨ DESCRIPTION β¨
okay so here's the tea π there are 4 FIRST registers, and each one has 32 control-bits. do the math with me: 4 * 32 = 128 control-bits total. look at us doing arithmetic, main character energy π
the control-bits are arranged as shown below:
registers | control-bits
-----------+--------------
first[0] | (31 : 0)
first[1] | (63 : 32)
first[2] | (95 : 64)
first[3] | (127 : 96)
so yeah, first[0] holds bits 31 down to 0, first[1] grabs 63 through 32, first[2] is living in 95 : 64, and first[3] is out there at 127 : 96. four registers, one giant 128-bit situation, all mapped out. π¦
and what does each control-bit do? each control-bit sets type of a GPIO pin. that's the whole job, no cap. the values:
0: a fully-pinmux pin1: a GPIO or IOP pin
literally a single bit decides a pin's entire identity. that's so much power for one little bit, i'm obsessed ππ₯
β¨ SEE ALSO β¨
go read the kernel file ./drivers/pinctrl/sunplus/sppctl.c if you wanna see the source of truth π and then go say hi to the rest of the squad:
they're all in their pinctrl sunplus era and honestly? a friend group π
aaaand that's the page!! this one lives under ./drivers/pinctrl/sunplus, dated October 2026, and she's out here doing sppctl_first_get(9) things. take care of her, she's small but she's everything ππ§β
π¦ 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