sppctl_first_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 a struct gpio_chip * and the manual simply does not elaborate. not me being abandoned by the documentation 😭
  • offset β€” -- undescribed -- 🫢 same situation, an unsigned int and 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 pin
  • 1: 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