cy8c95x0_regmap_read_bits(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… cy8c95x0_regmap_read_bits(9) β€” like, the Kernel API Manual, bestie ✨

okay so picture this: you're deep in the kernel, in pinctrl land, and you need to read a register. but not just any register β€” one that lives behind a mux. and there's caching. and state. and honestly it's a whole thing. this function is the friend who handles all of that for you so you don't have to 🫢

no cap, it's the kernel API manual page for cy8c95x0_regmap_read_bits, and it's lowkey iconic.


✨ NAME ✨

cy8c95x0_regmap_read_bits β€” reads a register using the regmap cache πŸ’–

πŸŽ€ SYNOPSIS πŸŽ€

int cy8c95x0_regmap_read_bits (struct cy8c95x0_pinctrl *chip , unsigned
int reg , unsigned int port , unsigned int mask , unsigned int *val );

🌸 ARGUMENTS 🌸

  • chip β€” the pinctrl you're working on, bestie. that's the main character right there πŸ‘‘
  • reg β€” the register you wanna read from. it can be a direct access register or a muxed register, so like… both vibes are valid ✨
  • port β€” the port used for muxed registers, or for quick path direct access registers. otherwise it's just… unused. sitting there. doing nothing πŸ’€
  • mask β€” the bitmask to apply 🎯
  • val β€” the value that gets read from hardware or from the cache. this is where the good stuff lands πŸ“

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does it actually do? it handles register reads from both the direct access registers and the muxed registers, while caching all register accesses. internally it takes care of keeping the PORTSEL register in the correct state, and it protects the access to muxed registers. the way that it just… handles it 😭

⚠️ okay this part is important, fr fr: the caller must only use this function to read registers behind the PORTSEL mux. that's not a suggestion, that's the rule πŸ’…

🌈 RETURN 🌈

0 for a successful request β€” slay. otherwise you get a corresponding error value, and, well, vibe check failed πŸ˜”

⭐ SEE ALSO ⭐

go read those too, iykyk πŸ’œ


and that's the page, bestie πŸŽ€ this little gem lives under ./drivers/pinctrl, dated October 2026, in the Kernel API Manual β€” mwah, no notes, periodt πŸ’…βœ¨

πŸ“¦ where this page comes from