stw481x_get_pctl_reg(9)
π¦ stw481x_get_pctl_reg(9) π¦
hii bestie, welcome to the Kernel API Manual π we're talking about the iconic little function stw481x_get_pctl_reg(9) today, and yes it's giving kernel-internals main character energy.
πΈ NAME πΈ
stw481x_get_pctl_reg β get a power control register. That's the whole vibe, no cap.
β¨ SYNOPSIS β¨
int stw481x_get_pctl_reg (struct stw481x *stw481x , u8 reg );
like, it's an int function, and these are the exact types, periodt π«Ά
π ARGUMENTS π
stw481xβ handle to thestw481xchip. Your lil' chip handle, basically.regβ power control register to fetch. The specific one you're grabbing.
π§ DESCRIPTION π§
okay so the power control registers are a set of one-time-programmable registers in its own register space. The way you access them is by writing address bits to these two registers:
- bits
7,6,5ofPCTL_REG_LOcorrespond to the3LSBs of the address - bits
8,9ofPCTL_REG_HIcorrespond to the2MSBs of the address
so together that forms an address space of 5 bits, i.e. 32 registers, and 0x00 ... 0x1f can be obtained. slay β¨
π SEE ALSO π
- Kernel file
./drivers/mfd/stw481x.cβ go peek, iykyk π
xoxo gossip kernel girl π this gem came from ./drivers/mfd, dated October 2026 ππ
π¦ 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