sppctl_master_get(9)
πΈ 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 pin1β 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
- 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