sppctl_master_get(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 sppctl_master_get(9) 🌸

okay bestie, welcome to the Kernel API Manual πŸ’– this one's a lil function called sppctl_master_get and honestly? it's giving "small but crucial." let's get into it ✨


πŸ’… NAME

sppctl_master_get β€” gets you a bit of the MASTER register. that's it, that's the whole vibe πŸŽ€


✨ SYNOPSIS

int sppctl_master_get (struct gpio_chip *chip , unsigned int offset );

returns an int, takes a struct gpio_chip * and an unsigned int. slay πŸ’…


πŸ¦‹ ARGUMENTS

  • chip β€” -- undescribed -- 😭 the docs literally left it blank, so we're not gonna make stuff up. it's a mystery, an enigma, a main character with no backstory.
  • offset β€” -- undescribed -- 🫢 same situation. also undescribed. no cap, the original really just said that.

πŸ‘‘ DESCRIPTION

ok so listen. there are 8 MASTER registers, and each one has 16 mask-bits and 16 control-bits. the upper 16-bit of the MASTER registers? those are the mask-bits. the lower 16-bit? those are the control-bits. 🧚

do the math with me: that's 128 mask-bits and 128 control-bits total. iconic capacity honestly. πŸ”₯

they're arranged like this:

register  |  mask-bits  | control-bits
-----------+-------------+--------------
master[0] |  (15 :   0) |  (15 :   0)
master[1] |  (31 :  16) |  (31 :  16)
master[2] |  (47 :  32) |  (47 :  32)
:         |      :      |      :
master[7] | (127 : 112) | (127 : 112)

now WHY do the mask-bits exist? bestie. they're the bodyguards πŸ’€ they protect control-bits from write-in accidentally. so before you write a value into a control-bit, please please please set the corresponding mask-bit first. it's like putting your phone in a case before you drop it β€” except here the drop is a bad write. 🌈

and each control-bit? it sets the type of a GPIO pin when the FIRST bit is 1. 🎯 like this:

  • 0 β†’ an IOP pin
  • 1 β†’ a GPIO pin

periodt. ⭐


πŸ” SEE ALSO

go look at the kernel file ./drivers/pinctrl/sunplus/sppctl.c and also these besties πŸ’œ


and that's the page!! πŸ“ from the ./drivers/pinctrl/sunplus section of the kernel world, dated October 2026, and yes she's still out here being sppctl_master_get(9) πŸ’– mwah, go get those bits πŸ‘‘βœ¨

πŸ“¦ where this page comes from